:root {
  color-scheme: light;
  font-family:
    Inter, "SF Pro Display", "SF Pro Text", "Microsoft YaHei", "PingFang SC",
    system-ui, sans-serif;
  background: #f4f2ed;
  color: #151716;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f2ed;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 16px;
  padding-bottom: 96px;
}

.topbar {
  align-items: center;
  background: #151716;
  border-radius: 8px;
  color: #ffffff;
  display: grid;
  gap: 10px;
  grid-template-columns: 68px minmax(0, 1fr) 68px;
  min-height: 88px;
  padding: 14px;
}

.top-title {
  min-width: 0;
  text-align: center;
}

.eyebrow {
  color: #b9d98f;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 6px;
  text-transform: uppercase;
}

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

h1 {
  font-size: 24px;
  line-height: 1.1;
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 8px;
}

h3 {
  font-size: 14px;
  margin-bottom: 8px;
}

.icon-button,
.top-icon,
.primary-button,
.ghost-button,
.utility-bar button,
.breadcrumbs button {
  border: 0;
  border-radius: 8px;
  min-height: 40px;
}

.icon-button {
  background: #d5f26a;
  color: #151716;
  font-weight: 800;
  padding: 0 14px;
}

.icon-button.secondary {
  background: #2c3129;
  color: #f4f2ed;
  margin-left: 8px;
}

.top-icon {
  background: #2c3129;
  color: #f4f2ed;
  font-size: 13px;
  font-weight: 900;
  padding: 0 8px;
}

.top-icon:disabled {
  color: rgba(244, 242, 237, 0.28);
  cursor: default;
}

.manager-panel {
  background: #ffffff;
  border: 1px solid #ded8ce;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 12px 0;
  padding: 10px;
}

.manager-panel button,
.subtle-button {
  background: #f7f4ee;
  border: 1px solid #ded8ce;
  border-radius: 8px;
  color: #252922;
  font-size: 13px;
  font-weight: 900;
  min-height: 40px;
  padding: 0 12px;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  margin: 14px 0 18px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.breadcrumbs button,
.breadcrumbs span {
  background: #ffffff;
  border: 1px solid #ded9cf;
  border-radius: 8px;
  color: #373a36;
  flex: 0 0 auto;
  font-size: 13px;
  min-height: 36px;
  padding: 8px 12px;
}

.breadcrumbs span {
  align-items: center;
  display: inline-flex;
  font-weight: 800;
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading p {
  color: #666a61;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 0;
}

.section-with-action {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.section-with-action > div {
  min-width: 0;
}

.section-with-action .subtle-button {
  flex: 0 0 auto;
}

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

.brand-card,
.model-card,
.trim-row {
  background: #ffffff;
  border: 1px solid #e2ddd2;
  border-radius: 8px;
  color: #151716;
  text-align: left;
}

.brand-card {
  min-height: 132px;
  padding: 16px;
}

.brand-card span,
.brand-card strong,
.brand-card small {
  display: block;
}

.brand-card span {
  color: #5f635d;
  font-size: 13px;
  margin-bottom: 10px;
}

.brand-card strong {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 10px;
}

.brand-card small {
  color: #777b73;
  font-size: 13px;
}

.family-card strong {
  font-size: 28px;
  line-height: 1.1;
  min-height: 62px;
  word-break: break-word;
}

.model-list,
.trim-list {
  display: grid;
  gap: 10px;
}

.model-card {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: 118px 1fr;
  min-height: 112px;
  padding: 10px;
}

.image-frame {
  aspect-ratio: 4 / 3;
  background: #222620;
  border-radius: 8px;
  min-height: 88px;
  overflow: hidden;
}

.vehicle-image {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.vehicle-fallback {
  align-items: flex-start;
  background:
    linear-gradient(140deg, rgba(213, 242, 106, 0.28), rgba(255, 255, 255, 0) 42%),
    #252922;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: flex-end;
  padding: 10px;
}

.vehicle-fallback span,
.vehicle-fallback em {
  color: #d5f26a;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.vehicle-fallback strong {
  font-size: 18px;
  line-height: 1.08;
  margin: 4px 0;
  word-break: break-word;
}

.card-copy {
  align-self: center;
  min-width: 0;
}

.card-copy span,
.card-copy small {
  color: #6f736b;
  display: block;
  font-size: 12px;
}

.card-copy strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
  margin: 6px 0;
  word-break: break-word;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.power-chip {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 6px 8px;
}

.power-chip.gas {
  background: #f1e6c8;
  color: #6b4b16;
}

.power-chip.ev {
  background: #dcefe7;
  color: #185c41;
}

.power-chip.erev {
  background: #dbe7f5;
  color: #174a7a;
}

.power-chip.phev {
  background: #eee3f7;
  color: #5c2a78;
}

.power-chip.unknown {
  background: #ece9e2;
  color: #62665f;
}

.trim-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px;
}

.trim-row strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
}

.trim-row small {
  color: #73776f;
  display: block;
  font-size: 12px;
  margin-top: 6px;
}

.price-stack {
  flex: 0 0 112px;
  text-align: right;
}

.price-stack span,
.price-stack em {
  display: block;
}

.price-stack span {
  font-weight: 900;
}

.price-stack em {
  color: #b24b35;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  margin-top: 4px;
}

.price-stack .masked-price {
  color: #62665f;
}

.detail-panel {
  background: #ffffff;
  border: 1px solid #e1dbd0;
  border-radius: 8px;
  padding: 12px;
}

.detail-image {
  aspect-ratio: 16 / 9;
  margin-bottom: 14px;
}

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

.privacy-row {
  align-items: center;
  background: #f7f4ee;
  border: 1px solid #e4ded2;
  border-radius: 8px;
  color: #575b54;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: space-between;
  margin: 12px 0;
  padding: 10px;
}

.detail-header p {
  color: #696d66;
  font-size: 13px;
  margin-bottom: 6px;
}

.primary-button {
  background: #151716;
  color: #ffffff;
  font-weight: 800;
  padding: 0 16px;
}

.price-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin: 14px 0;
}

.price-grid div {
  background: #f5f1e8;
  border-radius: 8px;
  padding: 12px;
}

.price-grid dt {
  color: #686c64;
  font-size: 12px;
  margin-bottom: 6px;
}

.price-grid dd {
  font-size: 24px;
  font-weight: 900;
  margin: 0;
}

.private-price dd {
  color: #62665f;
  letter-spacing: 0;
}

.info-block {
  border-top: 1px solid #e8e2d7;
  padding-top: 14px;
}

.info-block p {
  color: #373a36;
  line-height: 1.6;
  margin-bottom: 14px;
  white-space: pre-wrap;
}

.utility-bar {
  background: rgba(244, 242, 237, 0.94);
  border-top: 1px solid #ded8ce;
  bottom: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  left: 0;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom));
  position: fixed;
  right: 0;
}

.utility-bar button {
  background: #ffffff;
  border: 1px solid #ded8ce;
  color: #252922;
  font-size: 13px;
  font-weight: 800;
}

.edit-dialog {
  border: 0;
  border-radius: 8px;
  max-width: 520px;
  padding: 0;
  width: min(92vw, 520px);
}

.edit-dialog::backdrop {
  background: rgba(21, 23, 22, 0.52);
}

.edit-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.edit-form header {
  align-items: start;
  display: flex;
  justify-content: space-between;
}

.edit-form header p {
  color: #6c7068;
  font-size: 12px;
  margin-bottom: 4px;
}

.ghost-button {
  background: #ece7dd;
  color: #151716;
  padding: 0 12px;
}

.edit-form label {
  color: #4b4f48;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.edit-form input,
.edit-form textarea {
  border: 1px solid #d9d2c6;
  border-radius: 8px;
  min-height: 42px;
  padding: 10px;
  resize: vertical;
}

.edit-form footer {
  display: flex;
  justify-content: flex-end;
}

.lock-screen {
  align-items: center;
  display: flex;
  min-height: calc(100vh - 32px);
  justify-content: center;
}

.lock-card {
  background: #ffffff;
  border: 1px solid #e1dbd0;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  max-width: 420px;
  padding: 22px;
  width: 100%;
}

.lock-card h1 {
  color: #151716;
}

.lock-card p {
  color: #62665f;
  margin-bottom: 0;
}

.lock-card label {
  color: #4b4f48;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.lock-card input {
  border: 1px solid #d9d2c6;
  border-radius: 8px;
  min-height: 46px;
  padding: 10px;
}

.auth-error {
  background: #fff1ec;
  border: 1px solid #e7b19d;
  border-radius: 8px;
  color: #9a341f;
  font-size: 13px;
  font-weight: 800;
  padding: 10px;
}

@media (min-width: 720px) {
  .app-shell {
    margin: 0 auto;
    max-width: 920px;
    padding: 24px 24px 108px;
  }

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

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

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

  .utility-bar {
    left: 50%;
    max-width: 920px;
    transform: translateX(-50%);
  }
}
