/* Responsive repair v2.
 * This layer deliberately loads last. It fixes geometry only and leaves the
 * established visual language in max-ui-v3.css intact.
 */

html[data-layout-repair="v2"] {
  --repair-nav-height: 82px;
  --repair-fab-size: 72px;
  --repair-page-gap: 16px;
}

html[data-layout-repair="v2"],
html[data-layout-repair="v2"] body {
  width: 100%;
  min-width: 280px;
  min-height: 100%;
  overflow-x: clip;
}

html[data-layout-repair="v2"] body {
  min-height: 100svh;
  min-height: 100dvh;
}

html[data-layout-repair="v2"] :where(
  .app-shell,
  #content,
  .app-view,
  .layout-view,
  .topbar,
  .page-heading,
  .secondary-heading,
  .service-grid,
  .service-card,
  .flow-stack,
  .flow-lot,
  .flow-lot > *,
  .layout-lot-copy,
  .active-auction,
  .active-details,
  .upcoming-section,
  .upcoming-list,
  .upcoming-row,
  #subscriptions-content,
  #my-lots-content,
  .profile-card,
  .fidelity-profile-actions,
  .ui-profile-menu,
  .fidelity-submit-wizard,
  .fidelity-step-panel,
  .fidelity-step-card,
  .fidelity-card-list,
  .lot-detail-root,
  .lot-detail-body,
  .layout-lot-primary,
  .layout-lot-secondary,
  .lot-detail-hero,
  .lot-detail-summary,
  .lot-detail-panel,
  .lot-detail-section
) {
  min-width: 0;
  max-width: 100%;
}

html[data-layout-repair="v2"] :where(img, picture, video, canvas, svg) {
  max-width: 100%;
}

html[data-layout-repair="v2"] :where(
  h1, h2, h3, p, strong, span, button, label, a,
  .auction-name, .layout-lot-title, .lot-detail-row-value,
  .lot-detail-condition-value
) {
  overflow-wrap: anywhere;
}

html[data-layout-repair="v2"] #content > .app-view:not(.hidden) {
  width: 100%;
}

/* My lots. A card is now a real two-area layout: thumbnail + copy, then
 * actions/editor. Dynamic image hydration can no longer shove text under it.
 */
html[data-layout-repair="v2"] .flow-lot {
  overflow: visible !important;
}

html[data-layout-repair="v2"] .flow-lot.has-ui-thumb {
  display: grid !important;
  grid-template-columns: minmax(104px, 30%) minmax(0, 1fr) !important;
  grid-template-areas:
    "thumb copy"
    "actions actions"
    "editor editor" !important;
  grid-template-rows: auto auto auto !important;
  column-gap: 14px !important;
  row-gap: 10px !important;
  align-items: start !important;
}

html[data-layout-repair="v2"] .flow-lot:not(.has-ui-thumb) .layout-lot-copy {
  grid-column: 1 / -1;
}

html[data-layout-repair="v2"] .flow-lot .ui-lot-thumb {
  grid-area: thumb !important;
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100% !important;
  max-width: 132px !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 4 / 5;
  align-self: start;
  overflow: hidden;
}

html[data-layout-repair="v2"] .flow-lot .ui-lot-thumb :where(img, span) {
  width: 100%;
  height: 100%;
}

html[data-layout-repair="v2"] .flow-lot .ui-lot-thumb img {
  display: block;
  object-fit: cover;
}

html[data-layout-repair="v2"] .layout-lot-copy {
  grid-area: copy;
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  width: 100%;
}

html[data-layout-repair="v2"] .layout-lot-copy > * {
  min-width: 0;
  max-width: 100%;
}

html[data-layout-repair="v2"] .layout-lot-header {
  display: flex !important;
  width: 100%;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

html[data-layout-repair="v2"] .layout-lot-header .flow-id {
  flex: 0 1 auto;
}

html[data-layout-repair="v2"] .layout-lot-header .flow-status {
  flex: 0 0 auto;
  max-width: 55%;
  min-height: 30px;
  padding-inline: 10px;
  text-align: center;
  white-space: normal;
}

html[data-layout-repair="v2"] .layout-lot-title {
  width: 100%;
  margin: 0 !important;
  font-size: clamp(20px, 5.5vw, 29px) !important;
  line-height: 1.06 !important;
}

html[data-layout-repair="v2"] .layout-lot-time,
html[data-layout-repair="v2"] .layout-lot-metrics {
  margin: 0 !important;
}

html[data-layout-repair="v2"] .flow-lot > .flow-actions {
  grid-area: actions !important;
  grid-column: auto !important;
  width: 100%;
  margin-top: 2px !important;
}

html[data-layout-repair="v2"] .flow-lot > .flow-edit-slot {
  grid-area: editor !important;
  grid-column: auto !important;
  width: 100%;
}

html[data-layout-repair="v2"] .flow-lot .flow-inline-editor {
  grid-column: auto !important;
  width: 100%;
}

/* Lot detail. The repair JS creates explicit primary and secondary columns.
 * This removes the old CSS-grid auto-placement that left a giant empty PC area.
 */
html[data-layout-repair="v2"] .lot-detail-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: start !important;
}

html[data-layout-repair="v2"] .layout-lot-primary,
html[data-layout-repair="v2"] .layout-lot-secondary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-content: start;
}

html[data-layout-repair="v2"] .layout-lot-primary > *,
html[data-layout-repair="v2"] .layout-lot-secondary > * {
  grid-column: auto !important;
  grid-row: auto !important;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

html[data-layout-repair="v2"] .layout-lot-primary .lot-detail-hero {
  margin: 0 !important;
}

html[data-layout-repair="v2"] .layout-lot-primary .lot-detail-telegram {
  margin: 0 !important;
}

html[data-layout-repair="v2"] .layout-lot-primary .lot-detail-telegram-note {
  margin: -5px 0 0 !important;
}

html[data-layout-repair="v2"] .layout-lot-secondary > .lot-detail-section {
  margin-top: 0 !important;
}

html[data-layout-repair="v2"] .lot-detail-price-card {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
}

html[data-layout-repair="v2"] .lot-detail-image-frame {
  min-width: 0;
}

html[data-layout-repair="v2"] .lot-detail-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Phone / Telegram Android. */
@media (max-width: 719px) {
  html[data-layout-repair="v2"] {
    --repair-nav-height: 82px;
    --repair-fab-size: 72px;
  }

  html[data-layout-repair="v2"] .app-shell {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100svh;
    min-height: 100dvh;
    margin: 0 auto !important;
    padding-top: max(12px, env(safe-area-inset-top)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
    padding-bottom: calc(var(--repair-nav-height) + 58px + env(safe-area-inset-bottom)) !important;
    padding-left: max(12px, env(safe-area-inset-left)) !important;
  }

  html[data-layout-repair="v2"] .topbar {
    width: 100%;
    min-height: 68px;
    gap: 8px;
    margin-inline: 0;
  }

  html[data-layout-repair="v2"] .identity-button {
    max-width: calc(100% - 100px) !important;
  }

  html[data-layout-repair="v2"] .identity-copy strong {
    font-size: clamp(22px, 6.5vw, 30px) !important;
  }

  html[data-layout-repair="v2"] .identity-copy span {
    font-size: clamp(10px, 3vw, 13px);
  }

  html[data-layout-repair="v2"] .page-heading h1,
  html[data-layout-repair="v2"] .secondary-heading h1,
  html[data-layout-repair="v2"] .profile-page-title,
  html[data-layout-repair="v2"] .fidelity-submit-title {
    font-size: clamp(42px, 12vw, 62px) !important;
    line-height: .96 !important;
  }

  html[data-layout-repair="v2"] .secondary-heading,
  html[data-layout-repair="v2"] .profile-page-title {
    margin-top: 10px !important;
    margin-bottom: 18px !important;
  }

  html[data-layout-repair="v2"] .bottom-nav {
    position: fixed !important;
    z-index: 80 !important;
    top: auto !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    left: max(8px, env(safe-area-inset-left)) !important;
    display: grid !important;
    width: auto !important;
    max-width: 680px !important;
    height: var(--repair-nav-height) !important;
    min-height: var(--repair-nav-height) !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: end !important;
    gap: 2px !important;
    margin: 0 auto !important;
    padding: 7px 5px 5px !important;
    overflow: visible !important;
    transform: none !important;
  }

  html[data-layout-repair="v2"] .bottom-nav::before {
    display: none !important;
  }

  html[data-layout-repair="v2"] .bottom-nav .nav-item,
  html[data-layout-repair="v2"] .bottom-nav .nav-submit {
    position: relative !important;
    display: flex !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 68px !important;
    min-height: 68px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 7px 2px 6px !important;
    transform: none !important;
  }

  html[data-layout-repair="v2"] .bottom-nav .nav-item > span:last-child {
    display: block;
    max-width: 100%;
    min-height: 12px;
    font-size: clamp(9px, 2.75vw, 12px);
    line-height: 1.05;
    text-align: center;
    white-space: nowrap;
  }

  html[data-layout-repair="v2"] .bottom-nav .nav-submit {
    padding-top: 35px !important;
  }

  html[data-layout-repair="v2"] .bottom-nav .nav-submit .submit-icon {
    position: absolute !important;
    top: -34px !important;
    left: 50% !important;
    display: grid !important;
    width: var(--repair-fab-size) !important;
    height: var(--repair-fab-size) !important;
    min-width: var(--repair-fab-size) !important;
    min-height: var(--repair-fab-size) !important;
    place-items: center !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
    font-size: 40px !important;
    line-height: 1 !important;
  }

  html[data-layout-repair="v2"] .flow-tabs {
    display: grid !important;
    grid-template-columns: 1.05fr 1.2fr 1.45fr .8fr !important;
    width: 100% !important;
    max-width: none !important;
    gap: 2px !important;
    overflow: hidden !important;
  }

  html[data-layout-repair="v2"] .flow-tab {
    min-width: 0 !important;
    padding-inline: 3px !important;
    font-size: clamp(9px, 2.75vw, 12px) !important;
    white-space: nowrap !important;
  }

  html[data-layout-repair="v2"] #my-lots-content,
  html[data-layout-repair="v2"] #subscriptions-content,
  html[data-layout-repair="v2"] .service-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  html[data-layout-repair="v2"] .flow-lot {
    width: 100% !important;
    margin-inline: 0 !important;
    padding: 12px !important;
  }

  html[data-layout-repair="v2"] .flow-lot.has-ui-thumb {
    grid-template-columns: minmax(104px, 31%) minmax(0, 1fr) !important;
  }

  html[data-layout-repair="v2"] .layout-lot-header {
    align-items: flex-start !important;
  }

  html[data-layout-repair="v2"] .layout-lot-header .flow-status {
    max-width: 60%;
    font-size: 10px;
  }

  html[data-layout-repair="v2"] .layout-lot-title {
    font-size: clamp(20px, 6vw, 27px) !important;
  }

  html[data-layout-repair="v2"] .flow-lot .flow-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html[data-layout-repair="v2"] .flow-lot .flow-actions button {
    width: 100%;
    min-width: 0;
  }

  html[data-layout-repair="v2"] .profile-card,
  html[data-layout-repair="v2"] .ui-profile-menu,
  html[data-layout-repair="v2"] .fidelity-profile-actions,
  html[data-layout-repair="v2"] #subscriptions-content > *,
  html[data-layout-repair="v2"] .fidelity-step-card,
  html[data-layout-repair="v2"] .fidelity-confirm-card {
    width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  html[data-layout-repair="v2"] .fidelity-stepper {
    min-width: 560px !important;
    overflow: visible !important;
  }

  html[data-layout-repair="v2"] .fidelity-submit-wizard {
    overflow-x: hidden !important;
  }

  html[data-layout-repair="v2"] .fidelity-submit-wizard > .fidelity-stepper {
    width: 100%;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  html[data-layout-repair="v2"] .fidelity-submit-wizard > .fidelity-stepper::-webkit-scrollbar {
    display: none;
  }

  html[data-layout-repair="v2"] .fidelity-kind-grid,
  html[data-layout-repair="v2"] .fidelity-deck-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html[data-layout-repair="v2"] .fidelity-wizard-actions {
    grid-template-columns: minmax(104px, .7fr) minmax(0, 1.3fr) !important;
  }

  html[data-layout-repair="v2"] .lot-detail-root {
    width: 100% !important;
    max-width: 720px !important;
    min-height: 100svh;
    min-height: 100dvh;
    margin: 0 auto !important;
    padding-right: max(10px, env(safe-area-inset-right)) !important;
    padding-left: max(10px, env(safe-area-inset-left)) !important;
  }

  html[data-layout-repair="v2"] .lot-detail-hero {
    grid-template-columns: minmax(120px, 42%) minmax(0, 1fr) !important;
    gap: 11px !important;
    padding: 9px !important;
  }

  html[data-layout-repair="v2"] .lot-detail-hero-name {
    font-size: clamp(23px, 7.5vw, 34px) !important;
  }

  html[data-layout-repair="v2"] .lot-detail-price-card {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  html[data-layout-repair="v2"] .lot-detail-row,
  html[data-layout-repair="v2"] .lot-detail-condition-row {
    grid-template-columns: 26px minmax(86px, .9fr) minmax(0, 1.3fr) !important;
  }
}

@media (max-width: 390px) {
  html[data-layout-repair="v2"] {
    --repair-nav-height: 78px;
    --repair-fab-size: 66px;
  }

  html[data-layout-repair="v2"] .app-shell {
    padding-right: max(9px, env(safe-area-inset-right)) !important;
    padding-left: max(9px, env(safe-area-inset-left)) !important;
  }

  html[data-layout-repair="v2"] .bottom-nav {
    right: max(6px, env(safe-area-inset-right)) !important;
    left: max(6px, env(safe-area-inset-left)) !important;
    padding-inline: 3px !important;
  }

  html[data-layout-repair="v2"] .bottom-nav .nav-item,
  html[data-layout-repair="v2"] .bottom-nav .nav-submit {
    height: 64px !important;
    min-height: 64px !important;
  }

  html[data-layout-repair="v2"] .bottom-nav .nav-submit .submit-icon {
    top: -31px !important;
    font-size: 36px !important;
  }

  html[data-layout-repair="v2"] .flow-lot.has-ui-thumb {
    grid-template-columns: 96px minmax(0, 1fr) !important;
    column-gap: 10px !important;
  }

  html[data-layout-repair="v2"] .layout-lot-header {
    display: grid !important;
    justify-items: start !important;
  }

  html[data-layout-repair="v2"] .layout-lot-header .flow-status {
    max-width: 100%;
  }

  html[data-layout-repair="v2"] .lot-detail-hero {
    grid-template-columns: minmax(112px, 40%) minmax(0, 1fr) !important;
    gap: 9px !important;
  }

  html[data-layout-repair="v2"] .lot-detail-price-card {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html[data-layout-repair="v2"] .lot-detail-deadline {
    min-width: 0 !important;
    padding-top: 8px !important;
    padding-left: 0 !important;
    border-top: 1px solid var(--ui-line) !important;
    border-left: 0 !important;
    text-align: left !important;
  }
}

/* Tablet keeps the mobile navigation but uses two-column content where useful. */
@media (min-width: 720px) and (max-width: 1179px) {
  html[data-layout-repair="v2"] .app-shell {
    width: min(calc(100% - 28px), 1040px) !important;
    margin-inline: auto !important;
    padding-bottom: calc(120px + env(safe-area-inset-bottom)) !important;
  }

  html[data-layout-repair="v2"] #my-lots-content,
  html[data-layout-repair="v2"] #subscriptions-content,
  html[data-layout-repair="v2"] .service-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    align-items: start;
  }

  html[data-layout-repair="v2"] .flow-lot.has-ui-thumb {
    grid-template-columns: 122px minmax(0, 1fr) !important;
  }

  html[data-layout-repair="v2"] .fidelity-kind-grid,
  html[data-layout-repair="v2"] .fidelity-deck-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html[data-layout-repair="v2"] .lot-detail-root {
    width: min(calc(100% - 28px), 1040px) !important;
  }

  html[data-layout-repair="v2"] .lot-detail-hero {
    grid-template-columns: minmax(240px, 40%) minmax(0, 1fr) !important;
    gap: 18px !important;
  }
}

/* Desktop / PC. Navigation becomes a rail and every content view gets an
 * explicit desktop canvas. No mobile fixed widths are allowed to leak here.
 */
@media (min-width: 1180px) {
  html[data-layout-repair="v2"] {
    --repair-rail-width: 198px;
    --repair-rail-gap: 18px;
  }

  html[data-layout-repair="v2"] body {
    background-attachment: fixed !important;
  }

  html[data-layout-repair="v2"] .app-shell {
    width: min(calc(100vw - 286px), 1440px) !important;
    max-width: 1440px !important;
    min-height: calc(100vh - 44px) !important;
    margin: 22px 24px 40px max(230px, calc((100vw - 1690px) / 2 + 230px)) !important;
    padding: 26px 32px 40px !important;
  }

  html[data-layout-repair="v2"] .bottom-nav {
    position: fixed !important;
    top: 22px !important;
    right: auto !important;
    bottom: 22px !important;
    left: max(16px, calc((100vw - 1690px) / 2 + 16px)) !important;
    display: flex !important;
    width: var(--repair-rail-width) !important;
    max-width: var(--repair-rail-width) !important;
    height: auto !important;
    min-height: 540px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 18px 12px !important;
    transform: none !important;
  }

  html[data-layout-repair="v2"] .bottom-nav .nav-item,
  html[data-layout-repair="v2"] .bottom-nav .nav-submit {
    position: relative !important;
    display: grid !important;
    width: 100% !important;
    min-height: 54px !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    grid-template-rows: 1fr !important;
    align-items: center !important;
    justify-items: start !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    transform: none !important;
  }

  html[data-layout-repair="v2"] .bottom-nav .nav-submit .submit-icon {
    position: static !important;
    display: grid !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    place-items: center !important;
    transform: none !important;
    font-size: 24px !important;
  }

  html[data-layout-repair="v2"] .bottom-nav .nav-item > span:last-child {
    font-size: 14px !important;
    line-height: 1.1 !important;
    text-align: left !important;
    white-space: normal !important;
  }

  html[data-layout-repair="v2"] #auction-view {
    display: grid !important;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, .72fr) !important;
    column-gap: 28px !important;
    align-items: start !important;
  }

  html[data-layout-repair="v2"] #auction-view > :where(
    .page-heading, .segment, .calendar-panel, .free-slots-panel,
    .rules-strip, .info-panel
  ) {
    grid-column: 1 / -1 !important;
  }

  html[data-layout-repair="v2"] #auction-view > section[aria-labelledby="active-title"] {
    grid-column: 1 !important;
  }

  html[data-layout-repair="v2"] #auction-view > .upcoming-section {
    grid-column: 2 !important;
    position: static !important;
    top: auto !important;
  }

  html[data-layout-repair="v2"] .active-auction {
    grid-template-columns: minmax(250px, 40%) minmax(0, 1fr) !important;
    gap: 8px 20px !important;
    padding: 13px !important;
  }

  html[data-layout-repair="v2"] .upcoming-row:has(.upcoming-time) {
    grid-template-columns: 88px 54px minmax(0, 1fr) minmax(68px, auto) 16px !important;
  }

  html[data-layout-repair="v2"] .page-heading h1,
  html[data-layout-repair="v2"] .secondary-heading h1,
  html[data-layout-repair="v2"] .profile-page-title,
  html[data-layout-repair="v2"] .fidelity-submit-title {
    font-size: clamp(44px, 3.3vw, 62px) !important;
    line-height: .96 !important;
  }

  html[data-layout-repair="v2"] #my-lots-content {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    align-items: stretch !important;
  }

  html[data-layout-repair="v2"] .flow-lot {
    width: 100% !important;
    min-height: 198px;
    margin: 0 !important;
    padding: 12px !important;
  }

  html[data-layout-repair="v2"] .flow-lot.has-ui-thumb {
    grid-template-columns: 132px minmax(0, 1fr) !important;
    grid-template-areas:
      "thumb copy"
      "actions actions"
      "editor editor" !important;
    column-gap: 16px !important;
  }

  html[data-layout-repair="v2"] .flow-lot .ui-lot-thumb {
    width: 132px !important;
    max-width: 132px !important;
    aspect-ratio: 1 / 1.04;
  }

  html[data-layout-repair="v2"] .layout-lot-title {
    font-size: clamp(19px, 1.45vw, 26px) !important;
  }

  html[data-layout-repair="v2"] .flow-lot > .flow-actions {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  }

  html[data-layout-repair="v2"] #subscriptions-content {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
    align-items: start !important;
  }

  html[data-layout-repair="v2"] #subscriptions-content > :first-child {
    grid-column: 1 / -1 !important;
  }

  html[data-layout-repair="v2"] #profile-view {
    display: grid !important;
    grid-template-columns: minmax(360px, .78fr) minmax(0, 1.22fr) !important;
    gap: 22px !important;
    align-items: start !important;
  }

  html[data-layout-repair="v2"] #profile-view > .profile-page-title {
    grid-column: 1 / -1 !important;
    margin-bottom: 0 !important;
    text-align: left !important;
  }

  html[data-layout-repair="v2"] #profile-view .profile-card {
    position: static !important;
    grid-column: 1 !important;
    width: 100% !important;
    margin: 0 !important;
  }

  html[data-layout-repair="v2"] #profile-view :where(.fidelity-profile-actions, .ui-profile-menu) {
    grid-column: 2 !important;
    width: 100% !important;
    margin: 0 !important;
  }

  html[data-layout-repair="v2"] .fidelity-submit-wizard {
    width: 100% !important;
    max-width: 1120px !important;
    margin-inline: auto !important;
  }

  html[data-layout-repair="v2"] .fidelity-stepper {
    min-width: 0 !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  html[data-layout-repair="v2"] .fidelity-card-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  }

  html[data-layout-repair="v2"] .lot-detail-root {
    width: min(calc(100vw - 64px), 1320px) !important;
    max-width: 1320px !important;
    min-height: calc(100vh - 44px) !important;
    margin: 22px auto 40px !important;
    padding: 0 26px 36px !important;
  }

  html[data-layout-repair="v2"] .lot-detail-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr) !important;
    gap: 24px !important;
    align-items: start !important;
  }

  html[data-layout-repair="v2"] .layout-lot-primary {
    grid-column: 1 !important;
  }

  html[data-layout-repair="v2"] .layout-lot-secondary {
    grid-column: 2 !important;
    gap: 14px !important;
  }

  html[data-layout-repair="v2"] .layout-lot-primary .lot-detail-hero {
    grid-template-columns: minmax(300px, 44%) minmax(0, 1fr) !important;
    gap: 18px !important;
    padding: 12px !important;
  }

  html[data-layout-repair="v2"] .lot-detail-hero-name {
    font-size: clamp(32px, 2.7vw, 44px) !important;
  }

  html[data-layout-repair="v2"] .lot-detail-card-name {
    font-size: 20px !important;
  }

  html[data-layout-repair="v2"] .layout-lot-secondary .lot-detail-row,
  html[data-layout-repair="v2"] .layout-lot-secondary .lot-detail-condition-row {
    min-height: 54px !important;
  }

  html[data-layout-repair="v2"] .lot-detail-bottom {
    display: none !important;
  }
}

@media (min-width: 1560px) {
  html[data-layout-repair="v2"] .app-shell {
    width: min(calc(100vw - 310px), 1540px) !important;
    max-width: 1540px !important;
  }

  html[data-layout-repair="v2"] #auction-view {
    grid-template-columns: minmax(0, 1fr) 430px !important;
  }
}

@media (orientation: landscape) and (max-width: 1179px) and (max-height: 620px) {
  html[data-layout-repair="v2"] .app-shell {
    padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
  }

  html[data-layout-repair="v2"] .bottom-nav {
    --repair-nav-height: 68px;
    height: 68px !important;
    min-height: 68px !important;
  }

  html[data-layout-repair="v2"] .bottom-nav .nav-item,
  html[data-layout-repair="v2"] .bottom-nav .nav-submit {
    height: 56px !important;
    min-height: 56px !important;
  }

  html[data-layout-repair="v2"] .bottom-nav .nav-submit .submit-icon {
    top: -26px !important;
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    min-height: 58px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-layout-repair="v2"] *,
  html[data-layout-repair="v2"] *::before,
  html[data-layout-repair="v2"] *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
