* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #090812;
}

body {
  min-height: 100%;
  margin: 0;
  color: #f7fafc;
  background:
    radial-gradient(circle at 18% 0%, rgba(246, 196, 83, 0.18), transparent 30%),
    linear-gradient(180deg, #14121f 0%, #090812 52%, #111827 100%);
  font-family: "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
}

button,
a {
  font: inherit;
}

.public-car-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 14px 32px;
}

.public-car-loading,
.public-car-error {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
}

.public-car-loading span,
.brand-mark {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #f6c453;
  background: #ffffff;
  font-weight: 900;
}

.car-hero {
  overflow: hidden;
  border: 1px solid rgba(246, 196, 83, 0.5);
  border-radius: 26px;
  background: #0f0e18;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.car-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  background: #191827;
}

.car-hero-body {
  padding: 22px;
}

.eyebrow {
  margin: 0;
  color: #f6c453;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.car-title {
  margin: 10px 0 6px;
  color: #ffffff;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
}

.car-subtitle {
  margin: 0;
  color: #f6c453;
  font-size: 17px;
  font-weight: 900;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.stat-card {
  min-height: 86px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.stat-card.green {
  background: #143529;
}

.stat-card.gold {
  background: #352912;
}

.stat-card span,
.info-row span,
.repair-item span {
  display: block;
  color: #9aa0ad;
  font-size: 13px;
  font-weight: 900;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 21px;
  line-height: 1.18;
}

.stat-card.green strong {
  color: #73f0c6;
}

.stat-card.gold strong {
  color: #f6c453;
}

.section-card {
  margin-top: 14px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(15, 14, 24, 0.92);
}

.section-card h2 {
  margin: 0 0 16px;
  color: #f6c453;
  font-size: 20px;
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid #2c2b36;
}

.info-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.info-row strong {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
}

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

.photo-tile {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(246, 196, 83, 0.28);
  border-radius: 16px;
  background: #191827;
  color: inherit;
  text-decoration: none;
}

.photo-tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
}

.photo-tile span {
  display: block;
  padding: 9px 10px 10px;
  color: #f6c453;
  font-size: 12px;
  font-weight: 900;
}

.photo-tile em {
  display: block;
  padding: 0 10px 12px;
  color: #d7dae3;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.photo-lightbox[hidden] {
  display: none;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(5, 5, 10, 0.94);
}

.lightbox-open {
  overflow: hidden;
}

.photo-lightbox figure {
  width: min(100%, 520px);
  margin: 0;
}

.photo-lightbox img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 18px;
  background: #111827;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
}

.photo-lightbox figcaption {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(246, 196, 83, 0.28);
  border-radius: 16px;
  background: rgba(15, 14, 24, 0.92);
}

.photo-lightbox figcaption strong,
.photo-lightbox figcaption span {
  display: block;
}

.photo-lightbox figcaption strong {
  color: #f6c453;
  font-size: 17px;
}

.photo-lightbox figcaption span {
  margin-top: 5px;
  color: #d7dae3;
  font-size: 13px;
  line-height: 1.45;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  display: grid;
  place-items: center;
  border: 1px solid rgba(246, 196, 83, 0.36);
  border-radius: 999px;
  color: #f6c453;
  background: rgba(15, 14, 24, 0.82);
  appearance: none;
  -webkit-appearance: none;
}

.lightbox-close {
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  font-size: 30px;
}

.lightbox-nav {
  top: 50%;
  width: 44px;
  height: 58px;
  transform: translateY(-50%);
  font-size: 42px;
}

.lightbox-nav.prev {
  left: 10px;
}

.lightbox-nav.next {
  right: 10px;
}

.lightbox-count {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 7px 13px;
  border-radius: 999px;
  color: #f6c453;
  background: rgba(15, 14, 24, 0.82);
  font-size: 13px;
  font-weight: 900;
}

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

.repair-item {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.repair-item strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-size: 15px;
}

.repair-total {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #2c2b36;
  color: #f6c453;
  font-size: 18px;
  font-weight: 900;
  text-align: right;
}

.floating-actions {
  position: sticky;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
  padding: 8px;
  border: 1px solid rgba(246, 196, 83, 0.22);
  border-radius: 999px;
  background: rgba(10, 9, 16, 0.82);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.floating-actions a,
.floating-actions button {
  width: 100%;
  height: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border: 1px solid rgba(246, 196, 83, 0.32);
  border-radius: 999px;
  color: #f9d77a;
  background: rgba(246, 196, 83, 0.1);
  appearance: none;
  -webkit-appearance: none;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.floating-actions button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.045);
}

.floating-actions a:first-child {
  color: #101018;
  border-color: transparent;
  background: linear-gradient(180deg, #f8d46f 0%, #c9922f 100%);
}

@media (max-width: 360px) {
  .public-car-shell {
    padding-inline: 10px;
  }

  .car-title {
    font-size: 29px;
  }

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

  .floating-actions {
    gap: 6px;
  }

  .floating-actions a,
  .floating-actions button {
    padding-inline: 6px;
    font-size: 12px;
  }
}
