:root {
  color-scheme: light;
  --paper: #f7f5b8;
  --paper-soft: #fbf9d9;
  --surface: #fffde9;
  --surface-strong: #fffef3;
  --ink: #272c28;
  --muted: #5f685e;
  --faint: #8d9489;
  --line: rgba(39, 44, 40, .14);
  --line-strong: rgba(39, 44, 40, .28);
  --accent: #a4c713;
  --accent-dark: #7e9f10;
  --accent-soft: #dfe99b;
  --green: #579e90;
  --green-soft: #dcefe7;
  --blue: #579e90;
  --blue-soft: #dcefe7;
  --shadow: 0 18px 50px rgba(39, 44, 40, .08);
  --radius: 14px;
  --tab-height: 72px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

.phone-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 16px calc(var(--tab-height) + 22px);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
}

.brand h1,
.page-title {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 760;
  line-height: 1.15;
}

.brand p,
.subtitle,
.muted,
.card-copy,
.field-help {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.credit-pill,
.state-pill,
.mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(223, 233, 155, .72);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.credit-pill {
  color: var(--ink);
}

.panel {
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, .88);
  box-shadow: var(--shadow);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 760;
}

.progress-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.step {
  min-height: 52px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-soft);
}

.step strong {
  display: block;
  font-size: 13px;
}

.step span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.step.is-active {
  border-color: var(--accent-dark);
  background: rgba(164, 199, 19, .24);
}

.upload-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 164px;
  overflow: hidden;
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(47, 42, 34, .035) 1px, transparent 1px),
    linear-gradient(rgba(47, 42, 34, .035) 1px, transparent 1px),
    #fafafa;
  background-size: 22px 22px;
  color: var(--muted);
  text-align: center;
}

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

.upload-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 22px;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--green-soft);
  color: var(--ink);
  font-weight: 900;
}

.upload-preview {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 164px;
  object-fit: contain;
  background: #2f2a22;
}

.upload-card.has-image .upload-empty {
  display: none;
}

.upload-card.has-image .upload-preview {
  display: block;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.quick-chip,
.choice-chip {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
  text-align: left;
}

.quick-chip:active,
.choice-chip.is-selected {
  border-color: var(--accent-dark);
  background: rgba(164, 199, 19, .2);
}

.input-panel {
  position: relative;
  z-index: 8;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 254, 243, .96);
  box-shadow: 0 16px 40px rgba(39, 44, 40, .12);
}

.prompt-box {
  width: 100%;
  min-height: 76px;
  max-height: 160px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-strong);
  color: var(--ink);
  outline: none;
  resize: vertical;
}

.prompt-box:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(87, 158, 144, .18);
}

.input-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  margin-top: 10px;
}

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

.btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.detail-actions .btn {
  width: 100%;
  min-height: 52px;
  padding-inline: 20px;
  font-size: 16px;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(164, 199, 19, .26);
}

.btn-primary:hover {
  background: #b4d72b;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: #d5d8b8;
  color: #7e8478;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  border-color: rgba(39, 44, 40, .18);
  background: rgba(255, 254, 243, .96);
  color: var(--ink);
}

.btn-quiet {
  min-height: 36px;
  padding: 0 10px;
  border-color: var(--line);
  background: transparent;
  color: var(--green);
  font-size: 12px;
}

.icon-btn {
  width: 42px;
  flex: 0 0 auto;
  border-color: rgba(39, 44, 40, .16);
  background: rgba(255, 254, 243, .96);
  color: var(--ink);
}

.result-pair,
.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.result-pair.result-single {
  grid-template-columns: 1fr;
}

.source-grid {
  margin-bottom: 10px;
}

.image-card {
  display: flex;
  flex-direction: column;
  min-height: 154px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-soft);
}

.image-card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  background: #f4efe7;
}

.image-card-result-only img {
  min-height: 260px;
}

.image-card-result-only {
  min-height: 320px;
}

.image-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.task-progress {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, .78);
}

.task-progress-track {
  position: relative;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(39, 44, 40, .08);
}

.task-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, var(--green) 100%);
  transition: width .32s ease;
}

.task-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-progress-meta strong {
  font-size: 15px;
  color: var(--ink);
}

.task-progress-meta span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.task-progress[data-task-progress-state="failed"] .task-progress-fill {
  background: linear-gradient(90deg, #b96f5b 0%, #d99f92 100%);
}

.task-progress[data-task-progress-state="succeeded"] .task-progress-fill {
  background: linear-gradient(90deg, var(--green) 0%, var(--accent) 100%);
}

.list {
  display: grid;
  gap: 10px;
}

.list-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 94px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.list-thumb {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 900;
}

.list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-card h3,
.plan-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 760;
}

.list-card p,
.plan-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.plan-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(39, 44, 40, .05);
}

.plan-card.is-recommended {
  border-color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 254, 243, .98) 0%, rgba(247, 245, 184, .84) 100%);
}

.plan-card.is-featured {
  transform: translateY(-4px);
}

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

.plan-helper {
  min-height: 38px;
}

.detail-media-actions {
  justify-content: flex-end;
}

.price {
  color: var(--accent-dark);
  font-size: 22px;
  font-weight: 820;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 430px);
  height: var(--tab-height);
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, .96);
  backdrop-filter: blur(16px);
}

.bottom-nav a {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.bottom-nav a.is-active {
  color: var(--accent-dark);
}

.bottom-nav svg {
  width: 21px;
  height: 21px;
}

.notice {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--blue-soft);
  color: #40546a;
  font-size: 12px;
  line-height: 1.45;
}

.empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.overview-tile {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 254, 243, .92);
}

.overview-tile span {
  color: var(--muted);
  font-size: 12px;
}

.overview-tile strong {
  color: var(--ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.overview-tile.is-emphasis {
  background: linear-gradient(180deg, rgba(164, 199, 19, .28) 0%, rgba(255, 254, 243, .92) 100%);
  border-color: rgba(39, 44, 40, .18);
}

.profile-notice {
  margin-top: 10px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 900;
}

@media (min-width: 760px) {
  .phone-shell {
    width: min(100% - 32px, 980px);
    padding-bottom: 34px;
  }

  .desktop-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }

  .input-panel {
    position: sticky;
    bottom: 18px;
    backdrop-filter: blur(14px);
  }

  .bottom-nav {
    display: none;
  }
}

/* GPT-style generation homepage */
.gpt-home {
  background: linear-gradient(180deg, #f7f5b8 0%, #fbf9d9 100%);
}

.gpt-home .chat-shell {
  display: grid;
  grid-template-columns: 332px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #f7f5b8 0%, #fbf9d9 100%);
  color: #171717;
  transition: grid-template-columns .24s ease;
}

.gpt-home .chat-shell.settings-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.settings-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 332px;
  min-width: 0;
  height: 100vh;
  overflow: auto;
  padding: 20px 16px 22px 18px;
  border-right: 1px solid rgba(39, 44, 40, .12);
  background: rgba(255, 254, 243, .72);
  transition: width .24s ease, padding .24s ease, transform .24s ease;
}

.gpt-home .settings-sidebar .sidebar-section:first-of-type {
  display: none;
}

.settings-sidebar.is-collapsed {
  width: 76px;
  padding-inline: 12px;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
}

.sidebar-head strong,
.sidebar-label {
  display: block;
  color: #171717;
  font-size: 13px;
  font-weight: 780;
}

.sidebar-head span,
.sidebar-help {
  display: block;
  margin-top: 4px;
  color: #737373;
  font-size: 12px;
  line-height: 1.5;
}

.sidebar-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(39, 44, 40, .14);
  border-radius: 10px;
  background: rgba(255, 254, 243, .96);
  color: #171717;
  font-size: 22px;
  line-height: 1;
}

.settings-sidebar.is-collapsed .sidebar-head div,
.settings-sidebar.is-collapsed .sidebar-section {
  display: none;
}

.settings-sidebar.is-collapsed .sidebar-head {
  justify-content: center;
}

.settings-sidebar.is-collapsed .sidebar-toggle {
  transform: rotate(180deg);
}

.sidebar-section {
  padding: 14px;
  border: 1px solid rgba(39, 44, 40, .12);
  border-radius: 18px;
  background: rgba(255, 254, 243, .92);
  box-shadow: 0 10px 28px rgba(39, 44, 40, .05);
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 9px;
}

.mode-option {
  min-height: 38px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #ffffff;
  color: #404040;
  font-weight: 720;
}

.mode-option.is-active {
  border-color: var(--accent-dark);
  background: var(--accent);
  color: var(--ink);
}

.compact-upload {
  min-height: 150px;
  margin-top: 9px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .04) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, .04) 1px, transparent 1px),
    #fafafa;
  background-size: 20px 20px;
}

.preset-list,
.choice-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

#imageSettings {
  order: -1;
}

.plain-select {
  width: 100%;
  min-height: 42px;
  margin-top: 9px;
  padding: 0 38px 0 12px;
  border: 1px solid #d4d4d4;
  border-radius: 10px;
  background: #ffffff;
  color: #171717;
  font: inherit;
  font-weight: 680;
  outline: none;
}

.plain-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(87, 158, 144, .18);
}

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

.size-choice {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(39, 44, 40, .14);
  border-radius: 14px;
  background: rgba(255, 254, 243, .96);
  color: var(--ink);
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.size-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(87, 158, 144, .35);
  box-shadow: 0 10px 24px rgba(39, 44, 40, .08);
}

.size-choice strong {
  font-size: 14px;
  font-weight: 760;
}

.size-choice span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.size-choice.is-selected {
  border-color: var(--green);
  background: rgba(87, 158, 144, .12);
  box-shadow: 0 12px 28px rgba(87, 158, 144, .12);
}

.size-choice-custom {
  grid-column: 1 / -1;
}

.custom-size-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(39, 44, 40, .14);
  border-radius: 14px;
  background: rgba(255, 254, 243, .96);
  opacity: .82;
  transition: opacity .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.custom-size-panel.is-open {
  opacity: 1;
  border-color: rgba(87, 158, 144, .35);
  box-shadow: 0 10px 24px rgba(39, 44, 40, .08);
}

.custom-size-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.custom-size-field {
  display: grid;
  gap: 6px;
}

.custom-size-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.custom-size-field input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0 10px;
  border: 1px solid rgba(39, 44, 40, .14);
  border-radius: 12px;
  background: rgba(255, 254, 243, .96);
  color: var(--ink);
  outline: none;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.custom-size-field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(87, 158, 144, .18);
}

.custom-size-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.sidebar-section .custom-size-help {
  word-break: break-word;
}

.quality-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
}

.quality-button {
  display: grid;
  gap: 3px;
  min-height: 64px;
  padding: 10px;
  border: 1px solid #d4d4d4;
  border-radius: 12px;
  background: #ffffff;
  color: #171717;
  text-align: left;
}

.quality-button strong {
  font-size: 15px;
  font-weight: 780;
}

.quality-button span {
  color: #737373;
  font-size: 12px;
  line-height: 1.35;
}

.quality-button.is-selected {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.quality-button.is-selected span {
  color: rgba(247, 245, 184, .88);
}

.preset-list button {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 11px;
  background: #ffffff;
  color: #262626;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
}

.preset-list button:hover,
.preset-list button.is-selected {
  border-color: var(--accent-dark);
  background: rgba(164, 199, 19, .16);
}

.fixed-preference {
  display: grid;
  gap: 4px;
  margin-top: 9px;
  padding: 11px 12px;
  border: 1px solid var(--green);
  border-radius: 12px;
  background: rgba(87, 158, 144, .12);
}

.fixed-preference strong {
  font-size: 14px;
}

.fixed-preference span {
  color: #737373;
  font-size: 12px;
  line-height: 1.45;
}

.chat-main {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  height: 100vh;
  min-height: 0;
  background: linear-gradient(180deg, #fbf9d9 0%, #f7f5b8 100%);
}

.chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 18px 28px 16px;
  border-bottom: 1px solid rgba(39, 44, 40, .1);
  background: rgba(255, 254, 243, .82);
  backdrop-filter: blur(12px);
}

.chat-topbar > *,
.settings-sidebar,
.chat-main {
  min-width: 0;
}

.chat-topbar .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.brand-mark.mono {
  font-size: 13px;
  letter-spacing: 0;
}

.chat-topbar .brand {
  display: grid;
  gap: 4px;
}

.chat-topbar .brand h1 {
  font-size: 34px;
  font-weight: 780;
}

.chat-topbar .brand p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

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

.history-top-button {
  min-width: 112px;
  min-height: 44px;
  padding-inline: 20px;
  font-size: 14px;
}

.chat-scroll {
  display: grid;
  grid-auto-rows: min-content;
  align-content: start;
  gap: 14px;
  min-width: 0;
  overflow: auto;
  padding: 28px clamp(24px, 4vw, 56px) 14px;
}

.welcome-card {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 24px 24px 22px;
  border: 1px solid rgba(39, 44, 40, .12);
  border-radius: 22px;
  background: linear-gradient(180deg, #fffef3 0%, #f7f5b8 100%);
  box-shadow: 0 18px 48px rgba(39, 44, 40, .06);
}

.welcome-mark {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border: 1px solid #e5e5e5;
  border-radius: 13px;
  background: #f7f7f7;
  color: #171717;
  font-weight: 820;
}

.welcome-card h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.14;
}

.welcome-card p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.welcome-card p[hidden] {
  display: none !important;
}

.welcome-card::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 18px;
  background: linear-gradient(90deg, rgba(39, 44, 40, .14) 0%, rgba(39, 44, 40, .02) 100%);
}

.preview-panel {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 20px;
  border: 1px solid rgba(39, 44, 40, .12);
  border-radius: 22px;
  background: rgba(255, 254, 243, .96);
  box-shadow: 0 18px 48px rgba(39, 44, 40, .06);
}

.gpt-home #imagePreviewPanel {
  display: none !important;
}

.preview-headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.preview-headline span {
  color: #737373;
  font-size: 12px;
}

.image-preview-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.preview-slot {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(39, 44, 40, .12);
  border-radius: 18px;
  background: rgba(255, 255, 255, .42);
  color: #737373;
  text-align: center;
}

.preview-task-meta {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(39, 44, 40, .12);
  border-radius: 16px;
  background: rgba(255, 254, 243, .92);
  backdrop-filter: blur(12px);
  text-align: left;
}

.preview-task-meta strong {
  color: var(--ink);
  font-size: 14px;
}

.preview-task-meta span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.preview-task-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preview-slot img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111111;
}

.preview-slot.has-image > span {
  display: none;
}

.preview-slot.has-image > img {
  display: block;
}

.muted-slot {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .035) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, .035) 1px, transparent 1px),
    #fafafa;
  background-size: 22px 22px;
}

.tips-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: min(760px, 100%);
  margin: 0 auto;
}

.tips-row button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  background: #ffffff;
  color: #404040;
  font-size: 13px;
}

.chat-composer {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto 18px;
  padding: 12px 12px 10px;
  border: 1px solid rgba(39, 44, 40, .14);
  border-radius: 20px;
  background: rgba(255, 254, 243, .97);
  box-shadow: 0 16px 40px rgba(39, 44, 40, .1);
}

.chat-composer.is-dragover {
  border-color: var(--green);
  box-shadow: 0 18px 46px rgba(87, 158, 144, .18);
}

.chat-input {
  display: block;
  width: 100%;
  min-height: 92px;
  max-height: 180px;
  padding: 12px 14px;
  border: none;
  outline: none;
  resize: none;
  color: #171717;
  background: transparent;
  font-size: 15px;
  line-height: 1.65;
}

.composer-attachments {
  display: grid;
  gap: 8px;
  padding: 0 2px 10px;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.attachment-thumb {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 220px;
  max-width: 300px;
  padding: 8px 38px 8px 8px;
  border: 1px solid rgba(39, 44, 40, .12);
  border-radius: 18px;
  background: rgba(87, 158, 144, .12);
  flex: 0 0 auto;
}

.attachment-thumb img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: #111111;
}

.attachment-thumb-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.attachment-thumb-meta strong,
.attachment-thumb-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-thumb-meta strong {
  color: var(--ink);
  font-size: 12px;
}

.attachment-thumb-meta span {
  color: var(--muted);
  font-size: 12px;
}

.attachment-hint {
  display: none !important;
}

.attachment-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(39, 44, 40, .12);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.home-inline-result {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(39, 44, 40, .12);
  border-radius: 18px;
  background: rgba(255, 254, 243, .92);
}

.home-inline-result-media img {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 16px;
  object-fit: cover;
  background: #f0efe2;
}

.home-inline-result-body {
  display: grid;
  gap: 6px;
}

.home-inline-result-body strong {
  color: var(--ink);
  font-size: 14px;
}

.home-inline-result-body span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px 0;
  color: #737373;
  font-size: 12px;
}

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

.composer-actions .btn {
  min-height: 38px;
  padding-inline: 14px;
}

@media (max-width: 900px) {
  .gpt-home .chat-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .settings-sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    width: auto;
    height: auto;
    max-height: 44vh;
    overflow: auto;
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
  }

  .settings-sidebar.is-collapsed {
    width: auto;
  }

  .gpt-home .chat-shell.settings-collapsed {
    grid-template-columns: 1fr;
  }

  .chat-main {
    height: calc(100vh - 58px);
    min-height: 640px;
  }

  .chat-topbar {
    padding-inline: 16px;
  }

  .top-actions .btn-secondary {
    display: none;
  }

  .chat-scroll {
    padding: 22px 14px 18px;
  }

  .image-preview-line {
    grid-template-columns: 1fr;
  }

  .chat-composer {
    width: calc(100% - 20px);
    margin-bottom: 12px;
  }
}

.plain-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

.plain-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(87, 158, 144, .18);
}

.auth-box {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.account-mini {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.account-mini strong {
  font-size: 15px;
}

.account-mini span {
  color: var(--muted);
  font-size: 12px;
}

.choice-card {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 74px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.choice-card strong {
  font-size: 14px;
}

.choice-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.choice-card.is-selected,
.choice-chip.is-selected {
  border-color: var(--accent-dark);
  background: rgba(164, 199, 19, .18);
}

.cost-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.cost-summary span {
  display: grid;
  align-content: space-between;
  min-height: 58px;
  padding: 11px 13px;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  background: #f8f8f8;
  color: var(--muted);
  font-size: 12px;
}

.cost-summary strong {
  color: var(--ink);
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 760;
}

.gpt-home .welcome-card {
  display: none !important;
}

.inline-message {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--muted);
  line-height: 1.4;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 160;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(39, 44, 40, .72);
  backdrop-filter: blur(8px);
}

.image-lightbox-dialog {
  position: absolute;
  inset: 40px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(247, 245, 184, .18);
  border-radius: 24px;
  background: rgba(255, 254, 243, .98);
  box-shadow: 0 24px 80px rgba(39, 44, 40, .28);
}

.image-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 58px;
}

.image-lightbox-stage {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(39, 44, 40, .12);
  border-radius: 18px;
  background: rgba(247, 245, 184, .34);
}

.image-lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(39, 44, 40, .14);
  border-radius: 12px;
  background: rgba(255, 254, 243, .96);
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

body.lightbox-open {
  overflow: hidden;
}

.inline-message[data-type="error"],
.field-help[data-type="error"],
.sidebar-help[data-type="error"],
.card-copy[data-type="error"] {
  color: #b42318;
}

.inline-message[data-type="success"],
.field-help[data-type="success"],
.sidebar-help[data-type="success"],
.card-copy[data-type="success"] {
  color: #1f7a4d;
}

.full-btn {
  width: 100%;
  margin-top: 12px;
}

.mini-empty {
  min-height: 260px;
  border: 0;
  border-radius: 0;
  background: #fafafa;
}

[hidden] {
  display: none !important;
}

body.has-app-nav {
  --app-nav-collapsed: 72px;
  --app-nav-expanded: 238px;
  padding-left: 72px;
  transition: padding-left .24s ease;
}

body.has-app-nav.nav-drawer-open {
  padding-left: var(--app-nav-expanded);
}

.bottom-nav {
  display: none !important;
}

.app-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  width: 72px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: rgba(39, 44, 40, .96);
  box-shadow: 10px 0 30px rgba(39, 44, 40, .18);
  backdrop-filter: blur(18px);
  transition: width .28s ease, box-shadow .28s ease, background .28s ease;
}

.app-nav.is-open {
  width: 238px;
  box-shadow: 22px 0 60px rgba(39, 44, 40, .22);
}

.app-nav-toggle {
  display: grid;
  gap: 4px;
  width: 42px;
  height: 42px;
  margin: 16px 15px 12px;
  padding: 12px 10px;
  border: 1px solid rgba(247, 245, 184, .16);
  border-radius: 14px;
  background: rgba(247, 245, 184, .1);
}

.app-nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 99px;
  background: var(--paper);
  transition: transform .22s ease, opacity .22s ease;
}

.app-nav.is-open .app-nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.app-nav.is-open .app-nav-toggle span:nth-child(2) {
  opacity: 0;
}

.app-nav.is-open .app-nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.app-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 210px;
  padding: 0 15px 14px;
}

.app-nav-brand span,
.app-nav-link span,
.app-nav-foot {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .2s ease, transform .2s ease;
  white-space: nowrap;
}

.app-nav.is-open .app-nav-brand span,
.app-nav.is-open .app-nav-link span,
.app-nav.is-open .app-nav-foot {
  opacity: 1;
  transform: translateX(0);
}

.app-nav-links {
  display: grid;
  gap: 8px;
  padding: 8px 10px;
}

.app-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  width: 218px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 15px;
  color: rgba(247, 245, 184, .88);
  font-weight: 760;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.app-nav-link:hover {
  transform: translateX(2px);
}

.app-nav-link b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
}

.nav-use b,
.section-use {
  background: rgba(164, 199, 19, .22);
}

.nav-history b,
.section-history {
  background: rgba(87, 158, 144, .2);
}

.nav-plans b,
.section-plans {
  background: rgba(247, 245, 184, .2);
}

.nav-profile b,
.section-profile {
  background: rgba(164, 199, 19, .14);
}

.app-nav-link.is-active {
  border-color: rgba(164, 199, 19, .55);
  background: rgba(164, 199, 19, .18);
  color: #f7f5b8;
}

.app-nav-foot {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 16px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(247, 245, 184, .08);
  color: rgba(247, 245, 184, .72);
  font-size: 12px;
  font-weight: 720;
}

.sidebar-section,
.panel,
.welcome-card,
.preview-panel,
.plan-card,
.list-card {
  position: relative;
}

.sidebar-section::before,
.panel::before,
.welcome-card::before,
.preview-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: #d4d4d4;
}

.sidebar-section:nth-of-type(1)::before,
.welcome-card::before {
  background: #a4c713;
}

.sidebar-section:nth-of-type(2)::before,
.preview-panel::before {
  background: #579e90;
}

.sidebar-section:nth-of-type(3)::before,
.panel:nth-of-type(1)::before {
  background: #272c28;
}

.sidebar-section:nth-of-type(4)::before,
.panel:nth-of-type(2)::before {
  background: #a4c713;
}

.sidebar-section:nth-of-type(5)::before,
.panel:nth-of-type(3)::before {
  background: #579e90;
}

.gpt-home .sidebar-section::before,
.gpt-home .welcome-card::before,
.gpt-home .preview-panel::before {
  display: none;
}

.plan-card:nth-child(4n + 1) {
  border-left: 4px solid #a4c713;
}

.plan-card:nth-child(4n + 2) {
  border-left: 4px solid #579e90;
}

.plan-card:nth-child(4n + 3) {
  border-left: 4px solid #272c28;
}

.plan-card:nth-child(4n) {
  border-left: 4px solid #a4c713;
}

.list-card:nth-child(4n + 1) .list-thumb {
  background: rgba(164, 199, 19, .18);
}

.list-card:nth-child(4n + 2) .list-thumb {
  background: rgba(87, 158, 144, .2);
}

.list-card:nth-child(4n + 3) .list-thumb {
  background: rgba(247, 245, 184, .84);
}

.list-card:nth-child(4n) .list-thumb {
  background: rgba(39, 44, 40, .12);
}

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(164, 199, 19, .18), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(87, 158, 144, .18), transparent 24%),
    #f7f5b8;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
  gap: 18px;
  width: min(100% - 32px, 980px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  align-items: center;
}

.auth-intro,
.auth-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 254, 243, .94);
  box-shadow: var(--shadow);
}

.auth-intro {
  min-height: 520px;
  padding: 28px;
  background:
    radial-gradient(circle at 82% 18%, rgba(87, 158, 144, .18), transparent 24%),
    linear-gradient(180deg, rgba(255, 254, 243, .98) 0%, rgba(247, 245, 184, .82) 100%);
}

.auth-panel {
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 254, 243, .98) 0%, rgba(255, 255, 255, .9) 100%);
}

.auth-logo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-top: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7f7f7;
  font-weight: 900;
}

.auth-intro h1 {
  margin: 22px 0 0;
  max-width: 520px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.04;
  letter-spacing: 0;
}

.auth-intro p {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.auth-feature-grid div {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .54);
}

.auth-feature-grid strong,
.auth-feature-grid span {
  display: block;
}

.auth-feature-grid span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.brand-mark,
.chat-topbar .brand-mark,
.app-nav-brand strong,
.app-nav-link b,
.auth-logo {
  display: inline-flex !important;
  place-items: initial !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.brand-mark,
.app-nav-brand strong,
.auth-logo {
  color: var(--ink) !important;
  font-size: 18px;
  line-height: 1;
}

.auth-logo {
  margin-top: 52px;
}

.app-nav-link b {
  font-size: 18px;
}

/* Remove text-leading badge boxes across content pages. */
.brand-mark,
.avatar,
.auth-logo {
  display: none !important;
}

.brand {
  gap: 0;
}

.profile-head {
  gap: 0;
}

.list-card:has(.list-thumb:not(:has(img))) {
  grid-template-columns: minmax(0, 1fr);
}

.list-thumb:not(:has(img)) {
  display: none !important;
}

.panel::before {
  display: none !important;
}

@media (max-width: 640px) {
  body {
    background: #ffffff;
  }

  .phone-shell {
    width: 100%;
    padding: 14px 14px calc(var(--tab-height) + 18px);
  }

  .app-header,
  .section-title,
  .preview-headline {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .button-row,
  .auth-actions {
    grid-template-columns: 1fr;
  }

  .result-pair,
  .image-grid,
  .quality-toggle,
  .mode-switch {
    grid-template-columns: 1fr;
  }

  .list-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .list-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .card-actions {
    flex-direction: column;
  }

  .card-actions .btn {
    width: 100%;
  }

  .cost-summary {
    grid-template-columns: 1fr;
  }

  .composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .auth-shell {
    grid-template-columns: 1fr;
    width: min(100% - 24px, 430px);
    padding: 18px 0;
  }

  .auth-intro,
  .auth-panel {
    padding: 18px;
    border-radius: 16px;
    box-shadow: none;
  }

  .auth-intro {
    min-height: auto;
  }

  .auth-logo {
    margin-top: 18px;
  }

  .auth-intro h1 {
    font-size: 30px;
  }

  .auth-feature-grid {
    grid-template-columns: 1fr;
  }

  .profile-overview {
    grid-template-columns: 1fr 1fr;
  }

  .image-lightbox-dialog {
    inset: 16px;
    padding: 14px;
  }

  body.has-app-nav {
    --app-nav-collapsed: 56px;
    --app-nav-expanded: min(82vw, 286px);
    padding-left: var(--app-nav-collapsed);
  }

  .app-nav {
    display: block;
    width: var(--app-nav-collapsed);
  }

  body.has-app-nav.nav-drawer-open {
    padding-left: var(--app-nav-expanded);
  }

  .gpt-home .chat-shell {
    display: block;
    min-height: 100vh;
    background: #ffffff;
  }

  .settings-sidebar {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 12px 14px 0;
    border-right: none;
    border-bottom: none;
    background: transparent;
  }

  .settings-sidebar.is-collapsed {
    width: 100%;
    padding: 12px 14px 0;
  }

  .settings-sidebar.is-collapsed .sidebar-head div,
  .settings-sidebar.is-collapsed .sidebar-section {
    display: block;
  }

  .settings-sidebar.is-collapsed .sidebar-head {
    justify-content: space-between;
  }

  .settings-sidebar.is-collapsed .sidebar-toggle {
    transform: none;
  }

  .sidebar-section,
  .welcome-card,
  .preview-panel,
  .chat-composer,
  .panel,
  .list-card,
  .plan-card {
    border-radius: 16px;
    box-shadow: none;
  }

  .sidebar-section,
  .welcome-card,
  .preview-panel,
  .chat-composer,
  .panel,
  .list-card,
  .plan-card,
  .auth-intro,
  .auth-panel {
    border-color: #ececec;
  }

  .chat-main {
    height: auto;
    min-height: 0;
    display: block;
    background: #ffffff;
  }

  .app-nav.is-open {
    width: var(--app-nav-expanded);
  }

  .chat-topbar {
    display: none;
  }

  .top-actions .btn-secondary {
    display: none;
  }

  .chat-scroll {
    display: block;
    padding: 10px 14px 10px;
  }

  .welcome-card,
  .preview-panel {
    width: 100%;
    padding: 14px;
    margin-bottom: 10px;
  }

  .welcome-card h2 {
    font-size: 22px;
  }

  .image-preview-line {
    grid-template-columns: 1fr;
  }

  .preview-slot {
    min-height: 180px;
  }

  .chat-composer {
    position: static;
    width: calc(100% - 28px);
    margin: 0 14px calc(var(--tab-height) + 12px);
    border-radius: 16px;
  }

  .chat-input {
    min-height: 112px;
  }

  .image-card img {
    max-height: 360px;
  }

  .image-card-result-only img,
  .mini-empty {
    min-height: 200px;
  }
}

@media (max-width: 420px) {
  .page-title,
  .brand h1 {
    font-size: 20px;
  }

  .credit-pill,
  .state-pill,
  .mini-pill {
    min-height: 32px;
    font-size: 12px;
  }

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

  .chat-composer {
    width: calc(100% - 24px);
    margin: 0 12px calc(var(--tab-height) + 10px);
    padding: 8px;
  }

  .preview-slot {
    min-height: 156px;
  }

  .image-card img {
    max-height: 300px;
  }
}
