@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-latin-ext.woff2") format("woff2");
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --background: #101618;
  --panel: #171f22;
  --raised: #1c272a;
  --field: #11191c;
  --border: #344347;
  --text: #f3f0e9;
  --muted: #b2bfc1;
  --accent: #58f5c0;
  --highlight: #78ebce;
  --sky: #8bd6ec;
  --warm: #ffcb87;
  --primary: #61edbd;
  --radius: .55rem;
  --display-font: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 68% 0%, #182b2b, transparent 43rem), var(--background);
  color: var(--text);
  font: 1rem/1.5 "Geist", system-ui, sans-serif;
}
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; }
button, input, select, .sign-out { min-height: 2.75rem; }
button {
  padding: .55rem .95rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--primary);
  color: #0c2822;
  font-weight: 750;
  cursor: pointer;
}
button:hover { background: #8af8d3; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.shell { width: min(100% - 3rem, 78rem); margin-inline: auto; }
.top { background: #141d20; border-bottom: 1px solid var(--border); }
.top-inner, .brand, .account-tools { display: flex; align-items: center; }
.top-inner { justify-content: space-between; gap: .75rem; padding-block: .7rem; }
.brand { gap: .65rem; font: italic 800 1.45rem/1 var(--display-font); text-transform: uppercase; }
.brand-icon {
  display: grid;
  flex: 0 0 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: .3rem;
  background: var(--primary);
  color: #0c2822;
}
.account-tools { justify-content: flex-end; gap: .4rem 1rem; text-align: right; }
.live { font-size: .875rem; color: var(--sky); }
.live::before { content: ""; display: inline-block; width: .38rem; height: .38rem; margin-right: .45rem; border-radius: 50%; background: currentColor; vertical-align: .12em; }
.sign-out {
  display: inline-flex;
  align-items: center;
  padding-inline: .75rem;
  border: 1px solid var(--border);
  border-radius: .6rem;
  color: var(--text);
  font-size: .875rem;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
}
.sign-out:hover { background: var(--raised); }
#account-logout { background: transparent; }
#account-logout:hover { background: var(--raised); }
.login-page { display: grid; min-height: 100dvh; place-items: center; padding: 1rem; }
.login-card, .account-panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.login-card { width: min(100%, 27rem); padding: clamp(1.25rem, 5vw, 2rem); border-top: 3px solid var(--accent); box-shadow: 0 1.25rem 4rem #080d0f99; }
.login-card h1 { margin-top: 1.35rem; font-size: 2.75rem; }
.account-panel { margin-bottom: 1.1rem; padding: .8rem 1rem; }
.account-panel summary { min-height: 2rem; font-weight: 740; cursor: pointer; }
.account-form { display: grid; gap: .65rem; max-width: 27rem; margin-top: .9rem; }
.account-form label { display: grid; gap: .25rem; font-size: .875rem; color: var(--muted); }
.account-form input { min-width: 0; padding: .55rem .65rem; border: 1px solid var(--border); border-radius: .55rem; background: var(--field); color: var(--text); font-size: 1rem; }
.account-form h2 { font-size: 1rem; }
.account-form p:empty { display: none; }
.viewer-accounts { max-width: 27rem; padding: 0; list-style: none; }
.viewer-accounts li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-block: .45rem; border-top: 1px solid var(--border); }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-block: 1.55rem 1rem;
  padding: clamp(1.3rem, 4vw, 2.7rem);
  border: 1px solid #3a5350;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: radial-gradient(ellipse at 83% 15%, #24483e, transparent 65%), linear-gradient(115deg, #1b272a, #122221);
}
.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(132deg, transparent 0 28px, #67dfbb62 28px 30px, transparent 30px 48px);
  mask-image: linear-gradient(90deg, transparent 37%, #000 94%);
  content: "";
  pointer-events: none;
}
h1, .catalog-top h2, .dialog-top h2 { font-family: var(--display-font); font-style: italic; font-weight: 800; text-transform: uppercase; }
h1 { font-size: clamp(2.8rem, 7.5vw, 5.3rem); line-height: .92; letter-spacing: .005em; }
.hero h1 em { color: var(--accent); }
.hero .intro { margin-top: .7rem; max-width: 40rem; }
.tools { display: flex; gap: .55rem; flex: 0 0 auto; }
.tools:has(> button[hidden]):not(:has(> button:not([hidden]))) { display: none; }
.intro, .muted { color: var(--muted); }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1.3rem;
}
.metrics article {
  --metric: var(--highlight);
  min-width: 0;
  padding: .95rem 1rem;
  border: 1px solid var(--border);
  border-top: 2px solid var(--metric);
  border-radius: var(--radius);
  background: linear-gradient(140deg, color-mix(in srgb, var(--metric) 12%, var(--panel)), var(--panel) 78%);
}
.metrics article:nth-child(2) { --metric: var(--accent); }
.metrics article:nth-child(3) { --metric: var(--warm); }
.metrics article:nth-child(4) { --metric: var(--sky); }
.metrics span { display: block; color: var(--muted); font-size: .875rem; }
.metrics strong {
  color: var(--metric);
  display: block;
  margin-top: .3rem;
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.metrics .metric-date { font-size: 1rem; line-height: 1.35; }

.catalog {
  margin-bottom: 2rem;
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--panel);
}
.catalog-top, .dialog-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
#count { flex-shrink: 0; padding: .3rem .65rem; border: 1px solid #46615b; border-radius: .35rem; background: #223b36; color: var(--highlight); font-size: .8125rem; font-weight: 650; }
.catalog-top h2 { font-size: 1.65rem; letter-spacing: .025em; }

.filters { display: grid; grid-template-columns: minmax(10rem, 1.55fr) repeat(6, minmax(0, 1fr)); gap: .7rem; margin-block: .95rem 1.15rem; }
.filters label { min-width: 0; color: var(--muted); font-size: .875rem; font-weight: 620; }
.filters input, .filters select {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: .25rem;
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: .55rem;
  background-color: var(--field);
  color: var(--text);
}
.filters input::placeholder { color: #a2b0b3; }
.filters select {
  appearance: none;
  padding-right: 1.6rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right .95rem center, right .64rem center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
#favorite-feedback:empty { position: absolute; height: 0; width: 0; margin: 0; padding: 0; border: 0; overflow: hidden; }

.records { display: grid; gap: .55rem; }
.auction-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding-right: .55rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: var(--raised);
}
.auction-card:hover { border-color: #5a8a7b; }
.favorite-star {
  display: grid;
  place-items: center;
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: #ffd568;
  font: 1.55rem/1 system-ui, sans-serif;
}
.favorite-star:hover, .favorite-star[aria-pressed="true"] { background: #403921; }
.favorite-star[aria-busy="true"] { opacity: .6; }
.row {
  display: grid;
  grid-template-columns: 6.6rem minmax(0, 1.75fr) minmax(6.3rem, .75fr) minmax(7.6rem, .85fr) minmax(7.65rem, .8fr);
  grid-template-areas: "cover vehicle price closing status";
  align-items: center;
  gap: .85rem;
  width: 100%;
  padding: .65rem;
  border-color: transparent;
  border-radius: .75rem;
  background: transparent;
  color: var(--text);
  font-weight: 400;
  text-align: left;
}
.row:hover { background: #263937; }
.cover {
  grid-area: cover;
  display: block;
  width: 100%;
  height: 4.35rem;
  border-radius: .48rem;
  object-fit: cover;
  background: linear-gradient(145deg, #293a3d, #172024);
}
.vehicle { grid-area: vehicle; }
.price { grid-area: price; }
.closing { grid-area: closing; }
.badge-column { grid-area: status; min-width: 0; }
.row strong { display: block; overflow-wrap: anywhere; }
.row small { display: block; color: var(--muted); font-size: .875rem; }
.price strong { color: var(--accent); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.closing strong { font-variant-numeric: tabular-nums; }
.badge {
  display: inline-block;
  padding: .16rem .5rem;
  border-radius: .4rem;
  background: #303b48;
  color: #d1dae3;
  font-size: .8125rem;
  font-weight: 680;
}
.badge.active { background: #203f3c; color: var(--accent); }
.badge.ended { background: #47333b; color: var(--warm); }
.badge.active::before, .badge.ended::before { display: inline-block; width: .35rem; height: .35rem; margin-right: .3rem; border-radius: 50%; vertical-align: .12em; background: currentColor; content: ""; }
.countdown { font-variant-numeric: tabular-nums; }
.badge-column .countdown { display: block; margin-top: .2rem; color: var(--sky); font-size: .875rem; font-weight: 680; }

.notice { padding: .85rem 1rem; border: 1px solid var(--border); border-radius: .65rem; margin-bottom: .8rem; background: #212e3b; color: #c1d7e9; }
.secondary { border-color: var(--border); background: var(--raised); color: var(--text); }
.secondary:hover { background: #2a4140; }
#more { margin-top: 1rem; }

dialog {
  width: min(58.75rem, 100% - 1.5rem);
  max-height: 92dvh;
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--panel);
  color: var(--text);
  overscroll-behavior: contain;
}
dialog::backdrop { background: #06090dd9; }
.dialog-top { margin-bottom: .9rem; }
.dialog-top h2 { font-size: clamp(1.1rem, 3vw, 1.45rem); overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; }
.hero-photo {
  display: block;
  width: 100%;
  height: min(42dvh, 27rem);
  border-radius: .65rem;
  object-fit: contain;
  background: #10151b;
}
.photo-nav { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .6rem; }
.photo-nav span { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.photo-zoom { position: relative; display: block; width: 100%; padding: 0; border-color: var(--border); background: #10151b; }
.photo-zoom:hover { background: #10151b; border-color: var(--accent); }
.magnifier { position: absolute; right: .55rem; bottom: .55rem; width: 2.75rem; height: 2.75rem; border: 1px solid #637982; border-radius: .55rem; background: #1c292de8; }
.magnifier::before { content: ""; position: absolute; top: .62rem; left: .62rem; width: .75rem; height: .75rem; border: 2px solid var(--text); border-radius: 50%; }
.magnifier::after { content: ""; position: absolute; top: 1.55rem; left: 1.52rem; width: .63rem; height: 2px; transform: rotate(45deg); transform-origin: left center; background: var(--text); }
.photo-view { width: min(84rem, 100% - 1rem); }
.photo-stage {
  height: min(73dvh, 58rem, max(7rem, calc(92dvh - 9.5rem)));
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  border-radius: .55rem;
  background: #0e1217;
}
.photo-stage[data-zoomed="true"] { cursor: grab; }
.photo-stage.is-dragging { cursor: grabbing; user-select: none; }
#photo-large { display: block; width: var(--photo-size, 100%); height: var(--photo-size, 100%); object-fit: contain; }
.photo-stage:not([data-zoomed="true"]) #photo-large { cursor: zoom-in; }
.photo-zoom-controls { display: flex; justify-content: center; gap: .4rem; margin-top: .55rem; }
.photo-zoom-controls button { min-width: 2.75rem; padding-inline: .7rem; }
#zoom-reset { min-width: 4rem; font-variant-numeric: tabular-nums; }
#zoom-level { white-space: nowrap; }
.zoom-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1.04rem;
  height: 1.04rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: .75rem;
  line-height: 1;
  margin-right: .16rem;
}
.zoom-icon::after { position: absolute; top: .78rem; left: .77rem; width: .46rem; height: 2px; transform: rotate(45deg); transform-origin: left; background: currentColor; content: ""; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: 0; }
.facts div { padding: .55rem .6rem; border-radius: .5rem; background: var(--raised); overflow-wrap: anywhere; }
.facts dt { color: var(--muted); font-size: .875rem; }
.facts dd { margin: 0; font-weight: 650; }
.facts .countdown { color: var(--accent); }
.detail-section { margin-top: 1.1rem; padding-top: .8rem; border-top: 1px solid var(--border); }
.note { margin-top: .55rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.cost-breakdown, .history-table, .detail-section > div > p { margin-top: .65rem; }
.history-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
.history-table :is(th, td) { padding: .48rem .35rem; border-bottom: 1px solid var(--border); }
.history-table th { color: var(--muted); font-weight: 620; }
.history-table td { font-variant-numeric: tabular-nums; }
.history-table :is(th, td):last-child { text-align: right; }
.history-caption { font-size: .875rem; }

@media (max-width: 58rem) {
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .row { grid-template-columns: 5.1rem minmax(0, 1.25fr) minmax(5.5rem, .8fr) minmax(6.3rem, .8fr) minmax(6.4rem, .8fr); gap: .65rem; }
}

@media (max-width: 44rem) {
  .shell { width: calc(100% - 1.5rem); }
  .top-inner { display: grid; grid-template-columns: 1fr auto; }
  .account-tools { display: contents; }
  .live { grid-area: 2 / 1 / 3 / -1; text-align: left; overflow-wrap: anywhere; }
  .sign-out { grid-area: 1 / 2; }
  .hero { margin-top: 1rem; flex-direction: column; align-items: flex-start; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .metrics article { padding: .7rem .75rem; }
  .catalog { padding: .75rem; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .filters label:first-child { grid-column: 1 / -1; }
  .filters label:last-child { grid-column: 1 / -1; }
  .filters input, .filters select { font-size: 1rem; }
  .auction-card { grid-template-columns: minmax(0, 1fr); padding-right: 0; }
  .auction-card .favorite-star { position: absolute; top: .42rem; right: .42rem; }
  .row .vehicle { padding-inline-end: 2.7rem; }
  .row {
    grid-template-columns: minmax(4.75rem, 25%) minmax(0, 1fr) minmax(0, .85fr);
    grid-template-areas:
      "cover vehicle vehicle"
      "price price status"
      "closing closing status";
    padding: .65rem .7rem;
  }
  .cover { height: 3.8rem; }
  .row .price { border-top: 1px solid var(--border); padding-top: .45rem; }
  .closing { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .4rem; }
  .closing small { order: -1; }
  .closing strong { font-size: .875rem; }
  .badge-column { text-align: right; align-self: end; }
  #more { width: 100%; }
  dialog { padding: .8rem; }
  .detail-grid { grid-template-columns: 1fr; }
}
