/* ==========================================================================
   Auction stats (React page) — premium styling.
   Every rule is scoped under #auction-stats-root so the legacy main.css
   never interferes: the React page renders exactly as designed here.
   ========================================================================== */

#auction-stats-root {
  --af-surface: #ffffff;
  --af-field-bg: #ffffff;
  --af-border: #e6e8ef;
  --af-border-strong: #d2d6e0;
  --af-text: #14161c;
  --af-muted: #8b91a1;
  --af-red: #e3262f;
  --af-red-bright: #f5333b;
  --af-red-dark: #bf1019;
  --af-red-soft: #fff1f2;
  --af-ink: #181a20;
  --af-shadow: 0 30px 70px -38px rgba(20, 22, 28, 0.4);
  --af-shadow-soft: 0 18px 44px -30px rgba(20, 22, 28, 0.32);
}

#auction-stats-root.auction-filter-scope {
  display: block;
  margin: 22px 0 24px;
}

[data-theme="dark"] #auction-stats-root {
  --af-surface: #16181d;
  --af-field-bg: #1e2128;
  --af-border: #2c2f39;
  --af-border-strong: #3c404c;
  --af-text: #f2f3f6;
  --af-muted: #9aa0b0;
  --af-red-soft: rgba(227, 38, 47, 0.15);
  --af-ink: #f2f3f6;
  --af-shadow: 0 30px 70px -38px rgba(0, 0, 0, 0.75);
  --af-shadow-soft: 0 18px 44px -30px rgba(0, 0, 0, 0.6);
}

#auction-stats-root .as-page {
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: calc(100% - 48px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 0 56px;
}

#auction-stats-root .auction-react-boot {
  padding: 64px 20px;
  text-align: center;
  font-size: 16px;
  color: #8b91a1;
}
#auction-stats-root .auction-react-boot--error { color: #bf1019; }

#auction-stats-root .as-page__head h1 {
  margin: 0;
  font-family: Manrope, Inter, sans-serif;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--af-text);
}
#auction-stats-root .as-page__head p {
  margin: 8px 0 0;
  font-size: 16px;
  color: var(--af-muted);
}

/* ================================================ Live stat tiles ======= */

#auction-stats-root .as-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
#auction-stats-root .as-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-radius: 20px;
  background: var(--af-surface);
  border: 1px solid var(--af-border);
  box-shadow: 0 18px 40px -26px rgba(20, 22, 28, 0.36);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  animation: af-pop 0.32s ease both;
}
[data-theme="dark"] #auction-stats-root .as-tile {
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.66);
}
#auction-stats-root .as-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 52px -28px rgba(20, 22, 28, 0.44);
}
#auction-stats-root .as-tile__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
#auction-stats-root .as-tile__label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--af-muted);
}
#auction-stats-root .as-tile__value {
  font-size: 21px;
  font-weight: 800;
  color: var(--af-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#auction-stats-root .as-tile__sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--af-red);
}
#auction-stats-root .as-tile__rates {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--af-text);
}
#auction-stats-root .as-tile__rates span { white-space: nowrap; }
#auction-stats-root .as-tile__rates b {
  margin-right: 5px;
  color: var(--af-muted);
  font-weight: 700;
}
#auction-stats-root .as-tile__art {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
}
#auction-stats-root .as-tile__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (max-width: 1080px) {
  #auction-stats-root .as-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  #auction-stats-root .as-tiles { grid-template-columns: 1fr; }
}

/* ====================================================== Filter card ===== */

#auction-stats-root .auction-filter-card {
  position: relative;
  background: var(--af-surface);
  border: 1px solid var(--af-border);
  border-radius: 24px;
  padding: 24px 28px 22px;
  box-shadow: var(--af-shadow);
}

/* ---- head ---- */

#auction-stats-root .auction-filter-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}

#auction-stats-root .auction-filter-card__title {
  display: flex;
  align-items: center;
  gap: 15px;
}

#auction-stats-root .auction-filter-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: linear-gradient(150deg, var(--af-red-bright) 0%, var(--af-red) 52%, var(--af-red-dark) 100%);
  box-shadow: 0 14px 24px -12px rgba(227, 38, 47, 0.62);
}
#auction-stats-root .auction-filter-card__icon svg {
  width: 29px;
  height: 29px;
  fill: #ffffff;
}

#auction-stats-root .auction-filter-card__head h2 {
  margin: 0;
  font-family: Manrope, Inter, sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--af-text);
}
#auction-stats-root .auction-filter-card__title p {
  margin: 6px 0 0;
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--af-muted);
}

#auction-stats-root .auction-filter-card__status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  text-align: right;
}
#auction-stats-root .auction-filter-card__status-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--af-muted);
}
@keyframes af-spin { to { transform: rotate(360deg); } }

#auction-stats-root .auction-status-gear {
  display: inline-flex;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--af-muted);
  animation: af-spin 4.5s linear infinite;
}
#auction-stats-root .auction-status-gear svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}
#auction-stats-root #auctionResultsCount {
  font-size: 16px;
  font-weight: 700;
  color: var(--af-text);
}
#auction-stats-root .auction-results-count {
  font-size: 16px;
  font-weight: 700;
  color: var(--af-text);
}
#auction-stats-root #auctionResultsPath {
  font-size: 13px;
  color: var(--af-muted);
}
#auction-stats-root .auction-results-path {
  font-size: 13px;
  color: var(--af-muted);
}

/* ---- form ---- */

#auction-stats-root .auction-filter-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#auction-stats-root .auction-filter-mainline {
  display: block;
  width: 100%;
  margin: 0;
}
#auction-stats-root .auction-filter-grid--main {
  display: grid;
  width: 100%;
  grid-template-columns: 1.1fr 1.1fr 1.25fr 1.4fr 1fr;
  gap: 14px;
}

#auction-stats-root .auction-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
#auction-stats-root .auction-field > span {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--af-muted);
  padding-left: 2px;
}

#auction-stats-root .auction-field select,
#auction-stats-root .auction-field > input,
#auction-stats-root .auction-range-control {
  height: 50px;
  border: 1.5px solid var(--af-border);
  border-radius: 13px;
  background: var(--af-field-bg);
  color: var(--af-text);
  font-size: 14.5px;
  font-weight: 500;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#auction-stats-root .auction-field select,
#auction-stats-root .auction-field > input {
  width: 100%;
  padding: 0 18px;
}

#auction-stats-root .auction-field select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 46px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238b91a1' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}

#auction-stats-root .auction-field select:hover,
#auction-stats-root .auction-field > input:hover,
#auction-stats-root .auction-range-control:hover {
  border-color: var(--af-border-strong);
}
#auction-stats-root .auction-field select:focus,
#auction-stats-root .auction-field > input:focus,
#auction-stats-root .auction-range-control:focus-within {
  outline: none;
  border-color: var(--af-red);
  box-shadow: 0 0 0 4px rgba(227, 38, 47, 0.12);
}
#auction-stats-root .auction-field select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#auction-stats-root .auction-range-control {
  display: flex;
  align-items: center;
  padding: 0;
  overflow: hidden;
}
#auction-stats-root .auction-range-control input {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--af-text);
  font-size: 15.5px;
  font-weight: 500;
  padding: 0 16px;
}
#auction-stats-root .auction-range-control input:focus { outline: none; }
#auction-stats-root .auction-range-control input + input {
  border-left: 1.5px solid var(--af-border);
}
#auction-stats-root .auction-field input::placeholder,
#auction-stats-root .auction-range-control input::placeholder {
  color: #abb1c0;
  font-weight: 500;
}

/* ---- quick picks ---- */

#auction-stats-root .auction-preset-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: 14px;
}
#auction-stats-root .auction-preset-group > p {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--af-muted);
  padding-left: 2px;
}

#auction-stats-root .auction-preset-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
}
#auction-stats-root .auction-preset-row--compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

#auction-stats-root .auction-preset-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1.6px solid var(--af-border);
  border-radius: 13px;
  background: var(--af-field-bg);
  color: var(--af-text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease,
    box-shadow 0.16s ease, transform 0.12s ease;
}
#auction-stats-root .auction-preset-chip:hover {
  border-color: var(--af-border-strong);
  transform: translateY(-2px);
}
#auction-stats-root .auction-preset-chip.is-active {
  border-color: var(--af-red);
  background: var(--af-red-soft);
  box-shadow: 0 14px 26px -16px rgba(227, 38, 47, 0.5);
}

#auction-stats-root .auction-preset-chip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  color: var(--af-muted);
}
#auction-stats-root .auction-preset-chip__icon svg {
  width: 24px;
  height: 24px;
}
#auction-stats-root .auction-preset-chip.is-active .auction-preset-chip__icon {
  color: var(--af-red);
}

/* red check badge on a selected chip */
#auction-stats-root .auction-preset-chip.is-active::after {
  content: "";
  position: absolute;
  top: -10px;
  right: -10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--af-red)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E")
    center / 13px no-repeat;
  border: 3px solid var(--af-surface);
}

/* ---- actions ---- */

#auction-stats-root .auction-filter-action-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#auction-stats-root .auction-filter-primary-actions {
  display: flex;
  gap: 16px;
}

#auction-stats-root .auction-filter-primary-actions .btn-main,
#auction-stats-root .auction-filter-primary-actions .auction-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 54px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.16s ease,
    border-color 0.16s ease, filter 0.16s ease;
}

#auction-stats-root .auction-filter-primary-actions .btn-main {
  flex: 1.75 1 0;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--af-red-bright) 0%, var(--af-red) 54%, var(--af-red-dark) 100%);
  box-shadow: 0 22px 40px -18px rgba(227, 38, 47, 0.66);
}
#auction-stats-root .auction-filter-primary-actions .btn-main:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
#auction-stats-root .auction-filter-primary-actions .btn-main:disabled {
  opacity: 0.7;
  cursor: progress;
}

#auction-stats-root .auction-filter-primary-actions .auction-reset-btn {
  flex: 1 1 0;
  background: var(--af-field-bg);
  border: 1.7px solid var(--af-border);
  color: var(--af-text);
}
#auction-stats-root .auction-filter-primary-actions .auction-reset-btn:hover {
  border-color: var(--af-border-strong);
  transform: translateY(-1px);
}

#auction-stats-root .auction-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}
#auction-stats-root .auction-action-icon--search {
  background: rgba(255, 255, 255, 0.2);
}
#auction-stats-root .auction-action-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- active filters ---- */

#auction-stats-root .auction-active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--af-border);
}
#auction-stats-root .auction-active-filters__label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--af-text);
}
#auction-stats-root .auction-active-filters__label::before {
  content: "";
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--af-ink)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E")
    center / 19px no-repeat;
}
[data-theme="dark"] #auction-stats-root .auction-active-filters__label::before {
  background-color: #2b2f3a;
}
#auction-stats-root .auction-stats__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
#auction-stats-root .auction-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 9px 9px 15px;
  border-radius: 12px;
  background: var(--af-red-soft);
  border: 1px solid rgba(227, 38, 47, 0.22);
  color: var(--af-red-dark);
  font-size: 13.5px;
  font-weight: 600;
}
#auction-stats-root .auction-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border: 0;
  border-radius: 50%;
  background: rgba(227, 38, 47, 0.14);
  color: var(--af-red-dark);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
#auction-stats-root .auction-chip button:hover {
  background: var(--af-red);
  color: #ffffff;
}
#auction-stats-root .auction-active-filters__empty {
  font-size: 13.5px;
  color: var(--af-muted);
}
#auction-stats-root .auction-stats__chips-clear {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--af-red);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}
#auction-stats-root .auction-stats__chips-clear:hover { color: var(--af-red-dark); }

/* ========================================================== Results ===== */

#auction-stats-root .as-status {
  padding: 30px 20px;
  text-align: center;
  font-size: 15px;
  color: var(--af-muted);
}
#auction-stats-root .as-status--error {
  color: var(--af-red-dark);
  font-weight: 600;
}

#auction-stats-root .as-results {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#auction-stats-root .as-results__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 15px;
  color: var(--af-muted);
}
#auction-stats-root .as-results__head strong {
  color: var(--af-text);
  font-weight: 700;
}

#auction-stats-root .as-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

#auction-stats-root .as-lot {
  display: flex;
  flex-direction: column;
  background: var(--af-surface);
  border: 1px solid var(--af-border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 22px 46px -26px rgba(20, 22, 28, 0.42);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
[data-theme="dark"] #auction-stats-root .as-lot {
  box-shadow: 0 22px 46px -26px rgba(0, 0, 0, 0.72);
}
#auction-stats-root .as-lot:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 60px -30px rgba(20, 22, 28, 0.45);
}

/* ---- card photo carousel ---- */

#auction-stats-root .as-lot__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #eef0f4, #e2e5ec)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 24 24' fill='%23c7ccd6'%3E%3Cpath d='M18.92 5.01C18.72 4.42 18.16 4 17.5 4h-11c-.66 0-1.21.42-1.42 1.01L3 11v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 15c-.83 0-1.5-.67-1.5-1.5S5.67 12 6.5 12s1.5.67 1.5 1.5S7.33 15 6.5 15zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 10l1.5-4.5h11L19 10H5z'/%3E%3C/svg%3E")
    center / auto 84px no-repeat;
}
[data-theme="dark"] #auction-stats-root .as-lot__media {
  background: linear-gradient(135deg, #20232b, #181b21);
}
#auction-stats-root .as-lot__track {
  display: flex;
  height: 100%;
  transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
}
#auction-stats-root .as-lot__slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
}
#auction-stats-root .as-lot__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#auction-stats-root .as-lot__slide.is-broken img { opacity: 0; }
#auction-stats-root .as-lot__slide.is-broken::after {
  content: "Фото недоступно";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #aab0bf;
}
#auction-stats-root .as-lot__noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 13px;
  color: #aab0bf;
}

#auction-stats-root .as-lot__score {
  position: absolute;
  z-index: 3;
  top: 13px;
  left: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 9px;
  border-radius: 50%;
  background: var(--af-surface);
  color: #1f9d4d;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 8px 18px -6px rgba(20, 22, 28, 0.4);
}

#auction-stats-root .as-lot__nav {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #14161c;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  box-shadow: 0 6px 16px -6px rgba(20, 22, 28, 0.5);
  transition: opacity 0.18s ease, background 0.15s ease;
}
#auction-stats-root .as-lot__nav--prev { left: 10px; }
#auction-stats-root .as-lot__nav--next { right: 10px; }
#auction-stats-root .as-lot:hover .as-lot__nav { opacity: 1; }
#auction-stats-root .as-lot__nav:hover { background: #ffffff; }

#auction-stats-root .as-lot__dots {
  position: absolute;
  z-index: 3;
  bottom: 11px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
#auction-stats-root .as-lot__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}
#auction-stats-root .as-lot__dot.is-active {
  width: 20px;
  background: #ffffff;
}

/* ---- card body ---- */

#auction-stats-root .as-lot__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 10px;
  padding: 17px 19px 19px;
}
#auction-stats-root .as-lot__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
#auction-stats-root .as-lot__head h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--af-text);
}
#auction-stats-root .as-lot__year {
  font-size: 13px;
  font-weight: 600;
  color: var(--af-muted);
  white-space: nowrap;
}
#auction-stats-root .as-lot__grade {
  margin: 0;
  font-size: 12.5px;
  color: var(--af-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#auction-stats-root .as-lot__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
#auction-stats-root .as-lot__specs span {
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(20, 22, 28, 0.05);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--af-text);
}
[data-theme="dark"] #auction-stats-root .as-lot__specs span {
  background: rgba(255, 255, 255, 0.07);
}
#auction-stats-root .as-lot__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 11px 0;
  border-top: 1px solid var(--af-border);
  border-bottom: 1px solid var(--af-border);
}
#auction-stats-root .as-lot__meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
#auction-stats-root .as-lot__meta span {
  font-size: 11px;
  color: var(--af-muted);
}
#auction-stats-root .as-lot__meta strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--af-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#auction-stats-root .as-lot__price {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 0 2px;
  border-radius: 12px;
}

/* large translucent yen watermark behind the price — sized to fit the block */
#auction-stats-root .as-lot__price::after {
  content: "\00A5";
  position: absolute;
  z-index: 0;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-family: Manrope, Inter, sans-serif;
  font-size: 54px;
  font-weight: 800;
  line-height: 1;
  color: rgba(227, 38, 47, 0.07);
  pointer-events: none;
}

/* animated stream of yen marks — revealed while the card is hovered */
#auction-stats-root .as-lot__yen-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
#auction-stats-root .as-lot:hover .as-lot__yen-fx { opacity: 1; }

#auction-stats-root .as-lot__yen {
  position: absolute;
  top: 50%;
  left: 50%;
  font-weight: 800;
  color: var(--af-red);
  filter: blur(0.7px);
  animation: as-yen-burst 2.6s ease-out infinite backwards;
  animation-play-state: paused;
}
#auction-stats-root .as-lot:hover .as-lot__yen { animation-play-state: running; }
#auction-stats-root .as-lot__yen--0 { font-size: 13px; --dx: -90px;  --dy: -24px; --rot: -18deg; animation-duration: 2.4s; animation-delay: 0s; }
#auction-stats-root .as-lot__yen--1 { font-size: 18px; --dx: 80px;   --dy: -30px; --rot: 16deg;  animation-duration: 2.9s; animation-delay: 0.4s; }
#auction-stats-root .as-lot__yen--2 { font-size: 11px; --dx: -62px;  --dy: 24px;  --rot: -12deg; animation-duration: 2.6s; animation-delay: 0.8s; }
#auction-stats-root .as-lot__yen--3 { font-size: 19px; --dx: 116px;  --dy: -6px;  --rot: 20deg;  animation-duration: 3.1s; animation-delay: 0.2s; }
#auction-stats-root .as-lot__yen--4 { font-size: 14px; --dx: 46px;   --dy: 28px;  --rot: 10deg;  animation-duration: 2.7s; animation-delay: 1s; }
#auction-stats-root .as-lot__yen--5 { font-size: 16px; --dx: -116px; --dy: 4px;   --rot: -22deg; animation-duration: 3s;   animation-delay: 0.6s; }
#auction-stats-root .as-lot__yen--6 { font-size: 12px; --dx: -26px;  --dy: -30px; --rot: 14deg;  animation-duration: 2.5s; animation-delay: 1.2s; }

/* yen marks spawn at the centre of the price block and scatter outward */
@keyframes as-yen-burst {
  0%   { transform: translate(-50%, -50%) scale(0.35) rotate(0deg); opacity: 0; }
  22%  { opacity: 0.13; }
  66%  { opacity: 0.11; }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(var(--rot));
    opacity: 0;
  }
}

#auction-stats-root .as-lot__price strong,
#auction-stats-root .as-lot__price-rub,
#auction-stats-root .as-lot__tags {
  position: relative;
  z-index: 1;
}
#auction-stats-root .as-lot__price strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--af-text);
}
#auction-stats-root .as-lot__price strong span {
  font-size: 14px;
  color: var(--af-muted);
}
#auction-stats-root .as-lot__price-rub {
  font-size: 13px;
  color: var(--af-red);
  font-weight: 600;
}
#auction-stats-root .as-lot__price-rub--pending {
  color: var(--af-muted);
  font-weight: 500;
  font-style: italic;
}
#auction-stats-root .as-lot__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}
#auction-stats-root .as-lot__tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
#auction-stats-root .as-lot__tag--deal {
  background: rgba(31, 157, 77, 0.12);
  color: #198544;
}
#auction-stats-root .as-lot__tag--hot {
  background: var(--af-red-soft);
  color: var(--af-red-dark);
}
#auction-stats-root .as-lot__actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}
#auction-stats-root .as-lot__link {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 13px;
  background: var(--af-red);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}
#auction-stats-root .as-lot__link:hover { background: var(--af-red-dark); }

#auction-stats-root .as-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--af-muted);
}
#auction-stats-root .as-pagination button {
  height: 44px;
  padding: 0 20px;
  border-radius: 13px;
  border: 1.5px solid var(--af-border);
  background: var(--af-surface);
  color: var(--af-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
#auction-stats-root .as-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#auction-stats-root .as-pagination button:not(:disabled):hover {
  border-color: var(--af-red);
  color: var(--af-red);
}

/* ======================================================= Responsive ===== */

@media (max-width: 1080px) {
  #auction-stats-root .auction-filter-grid--main {
    grid-template-columns: repeat(2, 1fr);
  }
  #auction-stats-root .auction-filter-grid--external {
    grid-template-columns: repeat(2, 1fr);
  }
  #auction-stats-root .auction-preset-row {
    grid-template-columns: repeat(4, 1fr);
  }
  #auction-stats-root .auction-preset-row--compact {
    grid-template-columns: repeat(3, 1fr);
  }
  #auction-stats-root .as-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  #auction-stats-root .as-page { width: calc(100% - 28px); }
  #auction-stats-root .auction-filter-card { padding: 26px 22px 24px; border-radius: 24px; }
  #auction-stats-root .auction-filter-card__head { flex-direction: column; gap: 18px; }
  #auction-stats-root .auction-filter-card__status { align-items: flex-start; text-align: left; }
  #auction-stats-root .auction-filter-card__head h2 { font-size: 26px; }
  #auction-stats-root .auction-preset-row { grid-template-columns: repeat(2, 1fr); }
  #auction-stats-root .auction-preset-row--compact { grid-template-columns: repeat(2, 1fr); }
  #auction-stats-root .auction-filter-primary-actions { flex-direction: column; }
}

@media (max-width: 540px) {
  #auction-stats-root .auction-filter-grid--main { grid-template-columns: 1fr; }
  #auction-stats-root .auction-filter-grid--external { grid-template-columns: 1fr; }
  #auction-stats-root .auction-preset-row { grid-template-columns: 1fr; }
  #auction-stats-root .auction-preset-row--compact { grid-template-columns: 1fr; }
  #auction-stats-root .as-grid { grid-template-columns: 1fr; }
}

/* =============================================== Custom dropdown ======== */

#auction-stats-root .af-select {
  position: relative;
}

#auction-stats-root .af-range-selects {
  display: flex;
  gap: 10px;
}
#auction-stats-root .af-range-selects .af-select {
  flex: 1 1 0;
  min-width: 0;
}

#auction-stats-root .af-select__control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 50px;
  padding: 0 14px 0 16px;
  border: 1.5px solid var(--af-border);
  border-radius: 13px;
  background: var(--af-field-bg);
  color: var(--af-text);
  font-size: 15.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
#auction-stats-root .af-select__control:hover {
  border-color: var(--af-border-strong);
}
#auction-stats-root .af-select.is-open .af-select__control {
  border-color: var(--af-red);
  box-shadow: 0 0 0 4px rgba(227, 38, 47, 0.12);
}
#auction-stats-root .af-select.is-disabled .af-select__control {
  opacity: 0.55;
  cursor: not-allowed;
}

#auction-stats-root .af-select__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#auction-stats-root .af-select__value.is-placeholder {
  color: #abb1c0;
}

#auction-stats-root .af-select__chevron {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--af-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}
#auction-stats-root .af-select__chevron svg {
  width: 18px;
  height: 18px;
}
#auction-stats-root .af-select.is-open .af-select__chevron {
  transform: rotate(180deg);
  color: var(--af-red);
}

#auction-stats-root .af-select__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(22px) saturate(1.85);
  backdrop-filter: blur(22px) saturate(1.85);
  box-shadow: 0 28px 54px -22px rgba(20, 22, 28, 0.42);
  animation: af-pop 0.16s ease;
}
[data-theme="dark"] #auction-stats-root .af-select__panel {
  background: rgba(28, 30, 37, 0.86);
  border-color: rgba(255, 255, 255, 0.08);
}

#auction-stats-root .af-select__option {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--af-text);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
#auction-stats-root .af-select__option:hover {
  background: rgba(227, 38, 47, 0.09);
  color: var(--af-red-dark);
}
#auction-stats-root .af-select__option.is-selected {
  background: rgba(227, 38, 47, 0.12);
  color: var(--af-red-dark);
  font-weight: 700;
}

@keyframes af-pop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================= Live stat tiles motion === */

#auction-stats-root .auction-summary__card {
  animation: af-tile-in 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
  transition: transform 0.18s ease, box-shadow 0.22s ease;
}
#auction-stats-root .auction-summary__card:nth-child(1) { animation-delay: 0.05s; }
#auction-stats-root .auction-summary__card:nth-child(2) { animation-delay: 0.13s; }
#auction-stats-root .auction-summary__card:nth-child(3) { animation-delay: 0.21s; }
#auction-stats-root .auction-summary__card:nth-child(4) { animation-delay: 0.29s; }
#auction-stats-root .auction-summary__card:hover {
  transform: translateY(-5px);
}

@keyframes af-tile-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- adaptive value font: shrink long numbers so they never overflow ---- */
#auction-stats-root .auction-summary__card--visual .auction-summary__value--sm {
  font-size: clamp(25px, 2.6vw, 34px);
}
#auction-stats-root .auction-summary__card--visual .auction-summary__value--xs {
  font-size: clamp(19px, 2.1vw, 26px);
}

/* ---- currency tile: each rate on its own animated, column-aligned row ---- */
#auction-stats-root .auction-summary__card--currency-visual .auction-summary__value--rates {
  display: flex;
  flex-direction: column;
  margin-top: 6px;
  gap: 3px;
}
/* "Обновлено …" rides directly under the hint, clear of the coin artwork. */
#auction-stats-root .auction-summary__card--currency-visual .auction-summary__hint-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 14px;
  color: #9ca3af;
}
#auction-stats-root .auction-summary__card--currency-visual .auction-summary__currency-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  animation: af-rate-in 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
}
#auction-stats-root .auction-summary__currency-line:nth-child(1) { animation-delay: 0.30s; }
#auction-stats-root .auction-summary__currency-line:nth-child(2) { animation-delay: 0.37s; }
#auction-stats-root .auction-summary__currency-line:nth-child(3) { animation-delay: 0.44s; }
#auction-stats-root .auction-summary__currency-line:nth-child(4) { animation-delay: 0.51s; }
#auction-stats-root .auction-summary__currency-line:nth-child(5) { animation-delay: 0.58s; }

/* Fixed-width code column → every rate value lines up under the same edge. */
#auction-stats-root .af-rate__code {
  flex: 0 0 46px;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.6;
}
#auction-stats-root .af-rate__val {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

@keyframes af-rate-in {
  from { opacity: 0; transform: translateX(-7px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================ Advanced filter block === */

#auction-stats-root .as-advanced__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 18px;
  border: 1.5px dashed var(--af-border-strong);
  border-radius: 14px;
  background: var(--af-field-bg);
  color: var(--af-text);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}
#auction-stats-root .as-advanced__toggle:hover {
  border-color: var(--af-red);
  color: var(--af-red-dark);
}
#auction-stats-root .as-advanced.is-open .as-advanced__toggle {
  border-style: solid;
  border-color: var(--af-red);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: var(--af-red-soft);
  color: var(--af-red-dark);
}

#auction-stats-root .as-advanced__toggle-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
}
#auction-stats-root .as-advanced__toggle-icon svg,
#auction-stats-root .as-advanced__chevron svg {
  width: 100%;
  height: 100%;
}

#auction-stats-root .as-advanced__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--af-red);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

#auction-stats-root .as-advanced__chevron {
  display: inline-flex;
  width: 18px;
  height: 18px;
  margin-left: auto;
  transition: transform 0.2s ease;
}
#auction-stats-root .as-advanced.is-open .as-advanced__chevron {
  transform: rotate(180deg);
}

#auction-stats-root .as-advanced__panel {
  border: 1.5px solid var(--af-red);
  border-top: 0;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  background: var(--af-surface);
  padding: 18px;
  animation: af-advanced-in 0.22s ease;
}

#auction-stats-root .as-advanced__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@keyframes af-advanced-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  #auction-stats-root .as-advanced__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  #auction-stats-root .as-advanced__grid { grid-template-columns: 1fr; }
}

/* ===================================== Score filter — toggle switches === */

#auction-stats-root .af-score-panel { gap: 1px; }

#auction-stats-root .af-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--af-text);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
#auction-stats-root .af-score-row:hover {
  background: rgba(227, 38, 47, 0.07);
}
#auction-stats-root .af-score-row.is-on {
  color: var(--af-red-dark);
  font-weight: 700;
}

/* iOS-style animated toggle */
#auction-stats-root .af-switch {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.18);
  transition: background 0.24s ease;
}
[data-theme="dark"] #auction-stats-root .af-switch {
  background: rgba(255, 255, 255, 0.16);
}
#auction-stats-root .af-switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(20, 22, 28, 0.35);
  transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#auction-stats-root .af-score-row.is-on .af-switch {
  background: var(--af-red);
}
#auction-stats-root .af-score-row.is-on .af-switch__knob {
  transform: translateX(18px);
}

/* ============================================ Date picker — calendar === */

#auction-stats-root .af-date__icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--af-muted);
}
#auction-stats-root .af-date__icon svg { width: 100%; height: 100%; }

#auction-stats-root .af-cal {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 60;
  width: 300px;
  max-width: 88vw;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(22px) saturate(1.85);
  backdrop-filter: blur(22px) saturate(1.85);
  box-shadow: 0 28px 54px -22px rgba(20, 22, 28, 0.42);
  animation: af-pop 0.16s ease;
}
#auction-stats-root .af-cal--right { left: auto; right: 0; }
[data-theme="dark"] #auction-stats-root .af-cal {
  background: rgba(28, 30, 37, 0.94);
  border-color: rgba(255, 255, 255, 0.08);
}

#auction-stats-root .af-cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
/* Month / year quick-jump dropdowns in the calendar header (custom Dropdown). */
#auction-stats-root .af-cal__selects {
  display: flex;
  flex: 1;
  gap: 6px;
  margin: 0 7px;
}
#auction-stats-root .af-cal-select { min-width: 0; }
#auction-stats-root .af-cal-select--month { flex: 1.55 1 0; }
#auction-stats-root .af-cal-select--year { flex: 1 1 0; }
#auction-stats-root .af-cal-select .af-select__control {
  height: 38px;
  padding: 0 9px 0 12px;
  border-width: 1px;
  border-radius: 10px;
}
#auction-stats-root .af-cal-select .af-select__value {
  font-size: 13.5px;
  font-weight: 700;
}
#auction-stats-root .af-cal-select .af-select__chevron svg {
  width: 15px;
  height: 15px;
}
#auction-stats-root .af-cal-select .af-select__panel {
  max-height: 320px;
  padding: 6px;
}
#auction-stats-root .af-cal-select .af-select__option {
  padding: 8px 11px;
  font-size: 13.5px;
}
#auction-stats-root .af-cal__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: rgba(20, 22, 28, 0.05);
  color: var(--af-text);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
#auction-stats-root .af-cal__nav:hover {
  background: var(--af-red-soft);
  color: var(--af-red-dark);
}

#auction-stats-root .af-cal__weekdays,
#auction-stats-root .af-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
#auction-stats-root .af-cal__weekdays { margin-bottom: 4px; }
#auction-stats-root .af-cal__weekdays span {
  padding: 4px 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--af-muted);
}
#auction-stats-root .af-cal__cell { aspect-ratio: 1 / 1; }
#auction-stats-root .af-cal__day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--af-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, transform 0.1s ease;
}
#auction-stats-root .af-cal__day:hover {
  background: rgba(227, 38, 47, 0.1);
  color: var(--af-red-dark);
  transform: scale(1.06);
}
#auction-stats-root .af-cal__day.is-today {
  box-shadow: inset 0 0 0 1.5px var(--af-border-strong);
}
#auction-stats-root .af-cal__day.is-selected {
  background: var(--af-red);
  color: #ffffff;
  box-shadow: 0 6px 14px -5px rgba(227, 38, 47, 0.7);
}
#auction-stats-root .af-cal__day.is-selected:hover {
  background: var(--af-red-dark);
  color: #ffffff;
}
#auction-stats-root .af-cal__clear {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: rgba(20, 22, 28, 0.05);
  color: var(--af-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
#auction-stats-root .af-cal__clear:hover {
  background: var(--af-red-soft);
  color: var(--af-red-dark);
}
