:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #162222;
  background: #f5f6f2;
  --ink: #162222;
  --muted: #556461;
  --canvas: #f5f6f2;
  --paper: #fff;
  --line: #dbe2dc;
  --green: #214b3e;
  --lime: #d7f384;
  --radius: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid #397e61; outline-offset: 3px; }
.wrap { width: min(100% - 64px, 1136px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand, .site-link { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.08rem; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--ink); color: var(--lime); font-weight: 900; }
.site-link { color: var(--green); font-size: .925rem; font-weight: 700; padding-block: 12px; }
main { flex: 1; }
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: clamp(260px, 33vw, 374px);
  margin-top: 28px;
  padding: clamp(24px, 6vw, 72px);
  border-radius: 22px;
  background: linear-gradient(90deg, rgba(13, 27, 25, .96), rgba(13, 27, 25, .68) 38%, rgba(13, 27, 25, .08) 70%),
    #172a26 url("/assets/motorcycle-hero.jpg") center 53% / cover no-repeat;
  color: #fff;
}
.hero h1 { font-size: clamp(2rem, 5.3vw, 4.25rem); letter-spacing: -.055em; line-height: 1.1; margin: 0; }
.hero p { font-size: clamp(.94rem, 1.6vw, 1.14rem); color: #e0e9e3; margin: 18px 0 0; line-height: 1.55; }
.inventory { margin-block: 34px 56px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.toolbar h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); margin: 0; letter-spacing: -.035em; }
.count { min-height: 1.3em; margin: 6px 0 0; color: var(--muted); font-size: .875rem; }
.search { display: flex; min-width: min(100%, 320px); max-width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: 4px; }
.search input { padding: 9px 9px 9px 10px; flex: 1; width: 0; color: var(--ink); border: 0; background: transparent; }
.search button { border: 0; border-radius: 7px; background: var(--green); color: #fff; font-size: .875rem; font-weight: 700; padding: 8px 14px; min-height: 36px; }
.categories { display: flex; gap: 8px; padding-block: 4px; margin-block: 15px 17px; overflow-x: auto; scrollbar-width: thin; }
.chip, .quiet-button, .pagination button { background: var(--paper); color: var(--green); border: 1px solid var(--line); font-size: .9rem; padding: 8px 14px; border-radius: 9px; min-height: 40px; }
.chip { border-radius: 999px; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--green); color: white; border-color: var(--green); font-weight: 700; }
button:hover:enabled, .back:hover { text-decoration: underline; text-underline-offset: 3px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; }
.card:hover h3 { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.card-photo, .photo-placeholder { width: 100%; object-fit: cover; aspect-ratio: 16 / 10; display: block; background: #e5ebe4; }
.photo-placeholder { display: grid; place-items: center; color: var(--muted); font-size: .9rem; }
.card-body { padding: 16px; }
.kind { display: inline-block; border-radius: 6px; padding: 4px 8px; background: #eaf1e9; color: #285442; font-size: .875rem; font-weight: 700; }
.card h3 { margin: 8px 0 10px; font-size: 1.2rem; overflow-wrap: anywhere; }
.card-meta { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.6; }
.message { border: 1px dashed #bfcfc4; background: #fafbf8; border-radius: var(--radius); padding: 34px 18px; text-align: center; }
.message h2 { font-size: 1.125rem; margin: 0; }
.message p { margin: 8px auto 0; color: var(--muted); max-width: 36ch; line-height: 1.6; }
.message .quiet-button { margin-top: 15px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; font-size: .9rem; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); background: var(--paper); }
.site-footer .wrap { color: var(--muted); padding-block: 20px; font-size: .875rem; }
.detail { padding-block: 30px 56px; }
.back { display: inline-block; color: var(--green); margin-bottom: 14px; padding-block: 8px; font-weight: 700; text-decoration: none; }
.detail-grid { display: grid; align-items: start; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; }
.gallery, .info-panel { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); min-width: 0; }
.gallery h2, .info-panel h2, .description h2 { margin: 0 0 14px; font-size: 1.12rem; }
.active-media { background: #172420; border-radius: 10px; overflow: hidden; }
.active-media img, .active-media video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.thumbnails { display: flex; gap: 8px; overflow: auto; padding: 5px 5px 7px; margin-top: 7px; }
.thumb { min-width: 72px; flex: 0 0 72px; padding: 0; border: 2px solid transparent; border-radius: 8px; background: #e7eee8; color: var(--green); overflow: hidden; font-size: .875rem; }
.thumb[aria-pressed="true"] { border-color: var(--green); }
.thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.vehicle-heading h1 { margin: 8px 0 18px; font-size: clamp(1.65rem, 4vw, 2.45rem); line-height: 1.16; overflow-wrap: anywhere; }
.specs { margin: 0; }
.specs div { display: grid; grid-template-columns: minmax(6em, 1fr) minmax(0, 1fr); align-items: center; gap: 6px; border-top: 1px solid var(--line); padding-block: 11px; font-size: .95rem; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.insurance-tag { display: inline-block; font-size: .875rem; font-weight: 700; margin: 4px 0 0; padding: 3px 7px; border-radius: 6px; background: #e9f2e7; color: #265342; }
.insurance-tag.expired { background: #f9e7e1; color: #9b3523; }
.insurance-tag.due_today { background: #f9efd9; color: #784a09; }
.description { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.description p { line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); margin: 0; }
@media (max-width: 850px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .site-header-inner { min-height: 58px; }
  .hero {
    align-items: flex-start;
    justify-content: flex-end;
    min-height: 260px;
    margin-top: 16px;
    padding: 22px;
    border-radius: 16px;
    background-image: linear-gradient(12deg, rgba(13, 27, 25, .98), rgba(13, 27, 25, .51) 47%, transparent 78%), url("/assets/motorcycle-hero.jpg");
    background-position: 71% center;
  }
  .hero p { margin-top: 9px; max-width: 25ch; }
  .inventory { margin-block: 24px 40px; }
  .toolbar { display: grid; justify-content: stretch; gap: 12px; }
  .search { width: 100%; min-width: 0; }
  .categories { margin-top: 10px; }
  .cards { gap: 12px; }
  .card-body { padding: 11px; }
  .card h3 { font-size: 1.04rem; }
  .card-meta { font-size: .875rem; }
  .detail { padding-block: 14px 34px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .gallery, .info-panel { padding: 14px; }
}
@media (max-width: 420px) { .cards { grid-template-columns: minmax(0,1fr); } }
