:root {
  --bg: #050713;
  --bg-2: #11102a;
  --surface: rgba(13, 18, 35, 0.72);
  --surface-strong: rgba(7, 10, 22, 0.86);
  --surface-soft: rgba(255, 255, 255, 0.08);
  --ink: #f8fbff;
  --muted: rgba(232, 240, 255, 0.68);
  --line: rgba(137, 222, 255, 0.22);
  --line-strong: rgba(255, 111, 66, 0.55);
  --accent: #ff3d63;
  --accent-2: #ff8a2a;
  --cyan: #37e8ff;
  --violet: #7a5cff;
  --danger: #ff4b4b;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(120deg, rgba(255, 107, 48, 0.28), transparent 34%),
    linear-gradient(300deg, rgba(64, 208, 255, 0.24), transparent 31%),
    radial-gradient(circle at 72% 12%, rgba(127, 92, 255, 0.32), transparent 28%),
    linear-gradient(180deg, #090916 0%, #050713 52%, #03040a 100%);
  background-attachment: fixed;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  content: "";
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(112deg, transparent 0 42px, rgba(255, 138, 42, 0.06) 44px 46px),
    repeating-linear-gradient(-18deg, transparent 0 86px, rgba(55, 232, 255, 0.055) 88px 90px);
  pointer-events: none;
  content: "";
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.app-shell {
  width: min(1580px, 100%);
  margin: 0 auto;
  padding: 24px 24px 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.brand-title {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 6px;
  color: #fff;
  font-size: clamp(1.8rem, 3.2vw, 3.4rem);
  line-height: 1.05;
  text-shadow: 0 0 22px rgba(255, 61, 99, 0.42);
}

.mobile-title-line {
  display: none;
}

.desktop-title {
  display: inline;
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.subtitle {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.status-panel {
  flex: 0 0 auto;
  min-width: 146px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  text-align: right;
  box-shadow: var(--shadow), inset 0 0 32px rgba(55, 232, 255, 0.08);
  backdrop-filter: blur(18px);
}

#visibleCount {
  color: #fff;
  font-size: 1.9rem;
  font-weight: 950;
  text-shadow: 0 0 18px rgba(255, 61, 99, 0.7);
}

.status-separator,
.status-label,
#totalCount {
  color: var(--muted);
  font-weight: 800;
}

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

.catalog-area,
.selection-panel {
  min-width: 0;
}

.toolbar,
.brand-filter-section,
.selection-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(18px);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) auto minmax(150px, 0.42fr) minmax(150px, 0.42fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
}

.search-field,
.select-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.search-field span,
.select-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(2, 5, 14, 0.62);
  color: var(--ink);
  outline: none;
}

input {
  padding: 0 12px;
}

select {
  padding: 0 34px 0 10px;
}

input::placeholder {
  color: rgba(232, 240, 255, 0.48);
}

input:focus,
select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(55, 232, 255, 0.16);
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  gap: 4px;
  min-height: 42px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.segment {
  min-width: 58px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.segment.active {
  background: linear-gradient(135deg, var(--accent-2), var(--accent), var(--violet));
  color: #fff;
  box-shadow: 0 0 18px rgba(255, 61, 99, 0.36);
}

.brand-filter-section {
  position: relative;
  z-index: 24;
  margin-top: 14px;
  padding: 14px;
  overflow: visible;
}

.section-heading,
.catalog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-selector {
  position: relative;
  margin-top: 12px;
}

.brand-selector-button {
  width: min(460px, 100%);
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 138, 42, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 138, 42, 0.22), rgba(255, 61, 99, 0.13), rgba(55, 232, 255, 0.08)),
    rgba(5, 8, 18, 0.82);
  color: #fff;
  font-weight: 950;
  text-align: left;
  box-shadow: 0 0 22px rgba(255, 61, 99, 0.16);
}

.brand-selector-button::after {
  float: right;
  color: var(--cyan);
  content: "▾";
}

.brand-selector-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 80;
  width: min(920px, calc(100vw - 48px));
  max-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(55, 232, 255, 0.25);
  border-radius: 8px;
  background: rgba(7, 10, 22, 0.96);
  box-shadow: var(--shadow), 0 0 34px rgba(55, 232, 255, 0.12);
  backdrop-filter: blur(18px);
}

.brand-selector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-selector-head strong {
  font-size: 0.92rem;
}

.brand-option-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr));
  gap: 8px;
  max-height: 450px;
  overflow: auto;
  padding: 10px;
}

.brand-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 900;
  text-align: left;
}

.brand-option span {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.brand-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-name-en,
.brand-name-cn {
  display: inline;
}

.brand-name-cn::before {
  content: " - ";
}

.brand-option em {
  display: inline-grid;
  min-width: 30px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--cyan);
  font-style: normal;
  font-size: 0.78rem;
}

.brand-option.active {
  border-color: rgba(255, 138, 42, 0.82);
  background: linear-gradient(135deg, rgba(255, 138, 42, 0.92), rgba(255, 61, 99, 0.78), rgba(122, 92, 255, 0.8));
  box-shadow: 0 0 18px rgba(255, 61, 99, 0.26);
}

.brand-option.active em {
  background: rgba(0, 0, 0, 0.24);
  color: #fff;
}

.catalog-head {
  margin: 18px 0 12px;
}

.active-filter-text {
  max-width: min(580px, 58vw);
  overflow: hidden;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 12px;
}

.car-card {
  position: relative;
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    rgba(7, 10, 22, 0.82);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.car-card:hover {
  border-color: rgba(55, 232, 255, 0.62);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34), 0 0 22px rgba(55, 232, 255, 0.12);
  transform: translateY(-2px);
}

.car-card.selected {
  border-color: rgba(255, 138, 42, 0.95);
  box-shadow: 0 0 0 1px rgba(255, 61, 99, 0.42), 0 0 24px rgba(255, 61, 99, 0.34);
}

.car-card.selected::after {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 138, 42, 0.16), transparent 42%, rgba(55, 232, 255, 0.12));
  pointer-events: none;
  content: "";
}

.selected-check {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: none;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  font-weight: 950;
  box-shadow: 0 0 16px rgba(255, 61, 99, 0.72);
}

.car-card.selected .selected-check {
  display: grid;
}

.car-media-wrap {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
}

.car-media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.car-info {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.car-title {
  min-width: 0;
}

.car-title strong,
.selected-item strong {
  display: block;
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.car-title strong {
  font-size: 0.93rem;
}

.car-title span,
.selected-item span,
.car-title em,
.selected-item em {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.preview-button,
.select-pill {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
}

.preview-button {
  border: 1px solid rgba(55, 232, 255, 0.25);
  background: rgba(55, 232, 255, 0.08);
  color: var(--cyan);
}

.select-pill {
  min-width: 48px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

.car-card.selected .select-pill {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}

.quantity-control {
  display: inline-grid;
  grid-template-columns: 28px minmax(26px, auto) 28px;
  align-items: center;
  overflow: hidden;
  min-height: 30px;
  border: 1px solid rgba(255, 138, 42, 0.44);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.22);
}

.quantity-control button {
  width: 28px;
  height: 30px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1rem;
  font-weight: 950;
}

.quantity-control button:hover {
  background: rgba(255, 138, 42, 0.28);
}

.quantity-control span {
  display: inline-grid;
  min-width: 26px;
  height: 30px;
  place-items: center;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 950;
}

.card-quantity {
  min-width: 88px;
}

.selection-panel {
  position: sticky;
  top: 16px;
  display: grid;
  grid-template-rows: auto minmax(180px, calc(100vh - 270px)) auto;
  gap: 14px;
  padding: 16px;
}

.selection-panel::before,
.mobile-drawer::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 138, 42, 0.28);
  pointer-events: none;
  content: "";
}

.selection-head,
.drawer-head,
.export-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-summary {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.selected-badge {
  display: inline-grid;
  min-width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(55, 232, 255, 0.34);
  border-radius: 50%;
  background: rgba(55, 232, 255, 0.12);
  color: #fff;
  font-weight: 950;
  box-shadow: 0 0 20px rgba(55, 232, 255, 0.18);
}

.selected-list {
  display: grid;
  align-content: start;
  gap: 9px;
  overflow: auto;
  padding-right: 2px;
}

.selected-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto 34px;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.selected-quantity {
  grid-template-columns: 30px minmax(32px, auto) 30px;
}

.selected-thumb {
  width: 58px;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.92);
}

.selected-copy {
  min-width: 0;
}

.remove-button,
.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}

.icon-button.small {
  width: 30px;
  height: 30px;
}

.remove-button:hover,
.icon-button:hover {
  border-color: var(--accent);
  color: #fff;
}

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

.selection-actions .text-button {
  grid-column: 1 / -1;
}

.primary-button,
.ghost-button,
.text-button {
  min-height: 42px;
  border-radius: 6px;
  font-weight: 900;
}

.primary-button {
  border: 1px solid rgba(255, 138, 42, 0.85);
  background: linear-gradient(135deg, var(--accent-2), var(--accent), var(--violet));
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 61, 99, 0.26);
}

.primary-button:hover {
  box-shadow: 0 0 28px rgba(255, 61, 99, 0.42);
}

.ghost-button,
.text-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.ghost-button:hover,
.text-button:hover {
  border-color: var(--cyan);
  color: #fff;
}

.ghost-button.danger:hover {
  border-color: var(--danger);
}

.ghost-button.compact {
  min-height: 36px;
  padding: 0 12px;
}

.text-button {
  min-height: 34px;
  color: var(--muted);
  font-size: 0.82rem;
}

.empty-state {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.empty-state span {
  display: block;
  margin-top: 4px;
  font-size: 0.86rem;
}

.panel-empty {
  min-height: 160px;
}

.mobile-action-bar,
.drawer-overlay,
.mobile-drawer {
  display: none;
}

.preview-dialog,
.export-preview-dialog {
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.preview-dialog {
  width: min(900px, calc(100% - 28px));
}

.preview-dialog::backdrop,
.export-preview-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.preview-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 18px;
  padding: 18px;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}

.preview-figure {
  display: grid;
  min-height: 360px;
  margin: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.preview-figure img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.preview-info {
  display: grid;
  align-content: center;
  gap: 12px;
  padding-right: 36px;
}

.preview-info h2 {
  font-size: 1.5rem;
}

.preview-meta {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

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

.export-preview-dialog {
  width: min(1040px, calc(100% - 26px));
  max-height: min(92vh, 980px);
}

.export-preview-layout {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.export-image-wrap {
  max-height: 64vh;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.34);
}

.export-preview-image {
  display: block;
  width: min(100%, 780px);
  height: auto;
  margin: 0 auto;
  user-select: auto;
  -webkit-user-select: auto;
  -webkit-touch-callout: default;
}

.export-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mobile-save-tip {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.55;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.loading-card {
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid rgba(255, 138, 42, 0.42);
  border-radius: 8px;
  background: var(--surface-strong);
  text-align: center;
  box-shadow: var(--shadow), 0 0 26px rgba(255, 61, 99, 0.24);
}

.loader-line {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.loader-line::before {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--accent-2), var(--accent));
  animation: loader-slide 900ms infinite ease-in-out;
  content: "";
}

.loading-card span {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(55, 232, 255, 0.32);
  border-radius: 8px;
  background: rgba(7, 10, 22, 0.94);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.export-canvas-host {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@keyframes loader-slide {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(260%);
  }
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .selection-panel {
    position: static;
    grid-template-rows: auto auto auto;
  }

  .selected-list {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    max-height: 280px;
  }
}

@media (max-width: 820px) {
  body {
    padding-bottom: 78px;
  }

  .app-shell {
    padding: 16px 12px 24px;
  }

  .topbar,
  .catalog-head,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .status-panel {
    text-align: left;
  }

  .desktop-title {
    display: none;
  }

  .mobile-title-line {
    display: block;
  }

  h1 {
    font-size: 1.52rem;
    line-height: 1.14;
  }

  .subtitle {
    font-size: 0.82rem;
    line-height: 1.36;
  }

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

  .segmented {
    grid-auto-flow: column;
  }

  .brand-filter-section {
    margin-top: 12px;
    padding: 12px;
  }

  .brand-selector-button {
    width: 100%;
  }

  .brand-selector-panel {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: 76px;
    left: 10px;
    width: auto;
    max-height: 68vh;
  }

  .brand-option-list {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    max-height: calc(68vh - 58px);
  }

  .brand-option {
    min-height: 68px;
    padding: 10px 12px;
    align-content: center;
    gap: 8px;
    font-size: 14px;
  }

  .brand-name {
    white-space: normal;
  }

  .brand-option .brand-name-en,
  .brand-option .brand-name-cn {
    display: block;
    word-break: keep-all;
    overflow-wrap: normal;
    white-space: normal;
  }

  .brand-option .brand-name-en {
    font-size: 14px;
    line-height: 1.15;
    font-weight: 800;
  }

  .brand-option .brand-name-cn {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.15;
    opacity: 0.86;
  }

  .brand-option .brand-name-cn::before {
    content: "";
  }

  .brand-option .brand-count {
    min-width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .selection-panel {
    display: none;
  }

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

  .car-card {
    gap: 5px;
    padding: 5px;
  }

  .selected-check {
    top: 4px;
    right: 4px;
    min-width: 26px;
    height: 20px;
    padding: 0 5px;
    font-size: 0.72rem;
  }

  .car-title strong {
    font-size: 0.68rem;
  }

  .car-title span {
    display: none;
  }

  .car-title em {
    font-size: 0.62rem;
  }

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

  .preview-button {
    min-height: 24px;
    font-size: 0.66rem;
  }

  .select-pill {
    min-height: 24px;
    font-size: 0.66rem;
  }

  .card-quantity {
    grid-template-columns: 22px minmax(20px, auto) 22px;
    min-width: 66px;
    min-height: 24px;
  }

  .card-quantity button,
  .card-quantity span {
    width: auto;
    height: 24px;
    min-width: 20px;
    font-size: 0.72rem;
  }

  .mobile-action-bar {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 28;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
    min-height: 56px;
    padding: 8px;
    border: 1px solid rgba(255, 138, 42, 0.42);
    border-radius: 8px;
    background: rgba(7, 10, 22, 0.92);
    box-shadow: var(--shadow), 0 0 26px rgba(255, 61, 99, 0.2);
    backdrop-filter: blur(18px);
  }

  .mobile-action-bar span {
    padding-left: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 950;
  }

  .mobile-action-bar button {
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 900;
  }

  .mobile-action-bar #mobileGenerateButton {
    border-color: rgba(255, 138, 42, 0.82);
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
  }

  .drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 34;
    display: block;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(4px);
  }

  .mobile-drawer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 35;
    display: grid;
    grid-template-rows: auto auto minmax(120px, 1fr) auto;
    gap: 12px;
    max-height: 82vh;
    padding: 10px 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    background: rgba(7, 10, 22, 0.96);
    box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.45);
    transform: translateY(110%);
    transition: transform 180ms ease;
  }

  .mobile-drawer.open {
    transform: translateY(0);
  }

  .drawer-handle {
    width: 48px;
    height: 5px;
    margin: 0 auto;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
  }

  .selected-list.mobile {
    grid-template-columns: 1fr;
    max-height: 46vh;
  }

  .selected-item {
    grid-template-columns: 58px minmax(0, 1fr) auto 34px;
  }

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

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

  .preview-figure {
    min-height: 230px;
  }

  .preview-info {
    padding-right: 0;
  }

  .export-preview-dialog {
    max-height: 94vh;
  }

  .export-preview-layout {
    padding: 12px;
  }

  .export-image-wrap {
    max-height: 58vh;
  }

  .export-preview-image {
    width: 100%;
    min-width: 320px;
  }

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

  .toast {
    right: 12px;
    bottom: 76px;
    left: 12px;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 1.36rem;
  }

  .subtitle {
    font-size: 0.76rem;
  }

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

  .car-card {
    border-radius: 7px;
  }

  .car-media-wrap {
    border-radius: 5px;
  }

  .car-title strong {
    font-size: 0.64rem;
  }

  .preview-button {
    padding: 0;
  }

  .mobile-action-bar {
    grid-template-columns: 1fr 84px 88px;
  }

  .mobile-action-bar span,
  .mobile-action-bar button {
    font-size: 0.8rem;
  }
}

@media (max-width: 640px) {
  .brand-option-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .brand-option {
    position: relative;
    grid-template-columns: 1fr;
    min-height: 72px;
    padding: 9px 7px;
  }

  .brand-option .brand-name {
    padding-right: 0;
  }

  .brand-option .brand-name-en {
    padding-right: 24px;
    font-size: 12.5px;
    line-height: 1.12;
  }

  .brand-option .brand-name-cn {
    margin-top: 4px;
    font-size: 11.5px;
    line-height: 1.12;
  }

  .brand-option .brand-count {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 22px;
    height: 20px;
    font-size: 10.5px;
  }
}
