body.raw-body {
  margin: 0;
  background: #ededed;
  color: #111111;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --motion-fast: 140ms;
  --motion-base: 220ms;
  --motion-slow: 320ms;
  --motion-ease: cubic-bezier(0.2, 0.75, 0.22, 1);
}

.raw-body .page-bg {
  display: none;
}

.market-header {
  background: #050505;
  color: #ffffff;
  border-bottom: 1px solid #151515;
}

.market-header-top,
.market-nav {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 1.6rem;
}

.market-header-top {
  min-height: 72px;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.market-logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 132px;
  height: 56px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.market-logo-img {
  width: 132px;
  height: 56px;
  object-fit: contain;
  display: block;
}

.market-search {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.25rem;
  max-width: 700px;
  position: relative;
}

.market-search input {
  height: 42px;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  background: #f7f7f7;
  color: #171717;
  font-size: 1.02rem;
  padding: 0 1rem;
}

.search-icon {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  background: #f7f7f7;
  color: #1f1f1f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-icon:hover {
  background: #ffffff;
}

.camera-anchor {
  position: relative;
  display: inline-flex;
}

.ocr-image-preview {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 124px;
  height: 88px;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  padding: 4px;
  z-index: 46;
}

.ocr-image-preview::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #ffffff;
}

.ocr-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.ocr-image-progress-track {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 6px;
  border-radius: 999px;
  background: rgba(16, 23, 39, 0.18);
  overflow: hidden;
}

.ocr-image-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5da9ff 0%, #67d4ff 100%);
  transition: width 220ms ease-out;
}

.search-preview {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  border: 1px solid #d2d2d2;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  max-height: 310px;
  overflow: auto;
  z-index: 40;
}

.preview-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #ececec;
  background: #ffffff;
  color: #181818;
  text-align: left;
  padding: 0.56rem 0.72rem;
  cursor: pointer;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 0.62rem;
  align-items: center;
}

.preview-item:last-child {
  border-bottom: 0;
}

.preview-item:hover {
  background: #f5f7fb;
}

.preview-main {
  font-weight: 600;
  font-size: 0.95rem;
}

.preview-sub {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: #666666;
}

.preview-content {
  min-width: 0;
}

.preview-main,
.preview-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-cover {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #e2e2e2;
  background: #f1f1f1;
}

.market-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  position: relative;
}

.icon-btn,
.search-icon,
.market-btn,
.market-btn-secondary,
#marketplace-load-more-btn,
#marketplace-refresh-btn,
.cart-hover-checkout-btn,
.auth-form button,
.auth-logout-btn,
.view-toggle-btn,
.search-sort-trigger,
.search-multi-trigger,
.search-sort-option,
.search-multi-option {
  transition:
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-base) var(--motion-ease),
    opacity var(--motion-base) var(--motion-ease),
    background-color var(--motion-base) var(--motion-ease),
    border-color var(--motion-base) var(--motion-ease),
    color var(--motion-base) var(--motion-ease);
}

.icon-btn:active,
.search-icon:active,
.market-btn:active,
.market-btn-secondary:active,
#marketplace-load-more-btn:active,
#marketplace-refresh-btn:active,
.cart-hover-checkout-btn:active,
.auth-form button:active,
.auth-logout-btn:active,
.view-toggle-btn:active {
  transform: translateY(1px) scale(0.985);
}

.market-listing-card,
.result-card,
.cart-item,
.mini-card,
.preview-item,
.cart-hover-item,
.shipper-modal-dialog,
.auth-panel,
.cart-stage-panel,
.header-action-status,
.ocr-progress-wrap,
.market-dropdown,
.search-preview,
.cart-hover-preview,
.result-inline-panel {
  transition:
    opacity var(--motion-base) var(--motion-ease),
    transform var(--motion-base) var(--motion-ease),
    box-shadow var(--motion-base) var(--motion-ease),
    filter var(--motion-base) var(--motion-ease);
}

.market-listing-card:hover,
.result-card:hover,
.mini-card:hover {
  transform: translateY(-2px);
}

.ui-enter {
  animation: ui-fade-in var(--motion-slow) var(--motion-ease) both;
}

.ui-exit {
  animation: ui-fade-out var(--motion-base) var(--motion-ease) both;
}

@keyframes ui-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
    filter: saturate(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: saturate(1);
  }
}

@keyframes ui-fade-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: saturate(1);
  }
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.995);
    filter: saturate(0.96);
  }
}

.cart-hover-anchor {
  position: relative;
  display: inline-flex;
}

.auth-trigger-btn {
  border: 1px solid #3b4352;
  border-radius: 999px;
  background: #121824;
  color: #e6edf8;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.36rem 0.8rem;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.auth-trigger-btn:hover {
  background: #1c2637;
  border-color: #64748b;
  color: #ffffff;
}

.auth-state-chip {
  margin-left: 0.32rem;
  border: 1px solid #394355;
  border-radius: 999px;
  padding: 0.3rem 0.66rem;
  font-size: 0.74rem;
  color: #dce7f9;
  background: #0f1522;
}

.auth-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, 92vw);
  border: 1px solid #2f3849;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(16, 22, 34, 0.97), rgba(11, 16, 26, 0.98));
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 0.9rem;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.4);
  z-index: 56;
}

.auth-panel-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.42rem;
  margin-bottom: 0.75rem;
}

.auth-tab {
  border: 1px solid #384459;
  background: #182133;
  color: #ccd8eb;
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.auth-tab:hover {
  background: #223049;
  border-color: #5e769d;
  color: #ffffff;
}

.auth-tab.is-active {
  background: #eef3fc;
  color: #111b2d;
  border-color: #eef3fc;
}

.auth-current-user {
  margin: 0 0 0.62rem;
  color: #aeb9cc;
  font-size: 0.8rem;
}

.auth-form {
  display: grid;
  gap: 0.5rem;
}

.auth-form input {
  height: 42px;
  border: 1px solid #2f3b51;
  border-radius: 10px;
  background: #0d1524;
  color: #ffffff;
  padding: 0 0.78rem;
  font-size: 0.92rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-form input::placeholder {
  color: #8f9db4;
}

.auth-form input:focus {
  outline: none;
  border-color: #7da1d8;
  box-shadow: 0 0 0 3px rgba(79, 120, 184, 0.24);
}

.auth-form button,
.auth-logout-btn {
  height: 42px;
  border: 1px solid #d8e2f4;
  border-radius: 10px;
  background: #ecf3ff;
  color: #10192b;
  padding: 0.42rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 120ms ease;
}

.auth-form button:hover,
.auth-logout-btn:hover {
  background: #dce9ff;
  color: #0b1323;
}

.auth-form button:active,
.auth-logout-btn:active {
  transform: translateY(1px);
}

.auth-logout-btn {
  width: 100%;
  margin-top: 0.7rem;
}

.auth-panel[hidden],
.auth-current-user[hidden],
.auth-form[hidden],
.auth-logout-btn[hidden] {
  display: none !important;
}

.icon-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn-labeled {
  width: auto;
  min-width: 36px;
  height: 36px;
  border-radius: 999px;
  padding: 0.36rem 0.62rem;
  gap: 0.35rem;
}

.icon-btn-labeled .icon-glyph {
  font-size: 1.05rem;
  line-height: 1;
}

.icon-btn-labeled .icon-text {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.icon-btn[data-count] {
  position: relative;
}

.icon-btn[data-count]::after {
  content: attr(data-count);
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #e21b3c;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-hover-preview {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(320px, 88vw);
  border: 1px solid #d6dbe3;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
  padding: 0.65rem;
  z-index: 52;
}

.cart-hover-summary {
  margin: 0 0 0.4rem;
  color: #4f5663;
  font-size: 0.82rem;
}

.cart-hover-items {
  display: grid;
  gap: 0.4rem;
  max-height: 220px;
  overflow: auto;
}

.cart-hover-item {
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  background: #f9fafb;
  padding: 0.42rem 0.5rem;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.45rem;
  align-items: center;
}

.cart-hover-item-media {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  background: #f3f4f6;
}

.cart-hover-item-media.is-blank {
  background: #ffffff;
}

.cart-hover-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-hover-item-body {
  min-width: 0;
}

.cart-hover-item-title {
  margin: 0;
  color: #121826;
  font-size: 0.83rem;
  font-weight: 700;
}

.cart-hover-item-meta {
  margin: 0.1rem 0 0;
  color: #5f6673;
  font-size: 0.76rem;
}

.cart-hover-checkout-btn {
  margin-top: 0.55rem;
  width: 100%;
  border: 1px solid #111827;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
}

.cart-hover-checkout-btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.market-nav {
  min-height: 64px;
  border-top: 1px solid #161616;
  display: flex;
  align-items: center;
  gap: 2.4rem;
  position: relative;
  z-index: 35;
}

.market-nav .market-nav-item {
  position: relative;
}

.market-nav .market-nav-trigger {
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.market-nav .market-nav-trigger::after {
  content: "⌄";
  margin-left: 0.35rem;
  font-size: 0.78em;
  color: #d7d7d7;
}

.market-nav .market-nav-trigger.no-caret::after {
  content: "";
  display: none;
}

.market-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  border: 1px solid #232323;
  border-radius: 10px;
  background: #0d0f14;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
  padding: 0.34rem;
  display: grid;
  gap: 0.2rem;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 180ms ease;
}

.market-dropdown a {
  color: #f2f4f8;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 7px;
  padding: 0.48rem 0.56rem;
}

.market-dropdown a::after {
  content: "";
  display: none;
}

.market-dropdown a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.market-nav .market-nav-item:hover .market-dropdown,
.market-nav .market-nav-item:focus-within .market-dropdown,
.market-nav .market-nav-item.is-open .market-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.market-nav .spacer {
  flex: 1;
}

.market-main {
  max-width: 1260px;
  margin: 0 auto;
  padding: 1.6rem;
}

.header-action-status {
  max-width: 1260px;
  margin: 0 auto;
  margin-top: 0.55rem;
  padding: 0.56rem 1.6rem;
  border-radius: 8px;
  border: 1px solid #d4d4d4;
  background: #f7f7f7;
  color: #363636;
  font-size: 0.92rem;
}

.header-action-status[data-kind="ok"] {
  border-color: #b9e4cd;
  background: #eefaf3;
  color: #186840;
}

.header-action-status[data-kind="warn"] {
  border-color: #f2d9a5;
  background: #fff7e8;
  color: #7f5c10;
}

.ocr-progress-wrap {
  max-width: 1260px;
  margin: 0.45rem auto 0;
  padding: 0 1.6rem;
}

.ocr-progress-bar {
  height: 4px;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5da9ff 0%, #67d4ff 100%);
  box-shadow: 0 0 0 1px rgba(93, 169, 255, 0.2);
  transition: width 240ms ease-out;
}

.hero {
  height: 430px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #0f1320;
}

.hero-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  transition:
    opacity 360ms ease,
    transform 460ms ease;
  pointer-events: none;
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.8rem;
  max-width: 620px;
}

.hero-overlay h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  margin-top: 0.55rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.02rem;
  line-height: 1.35;
}

.hero-cta {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.52rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  color: #0d1428;
  background: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  font-size: 0.88rem;
}

.hero-cta:hover {
  background: #ffffff;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 0.9rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  z-index: 3;
}

.hero-dot {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  min-width: 7px;
  max-width: 7px;
  min-height: 7px;
  max-height: 7px;
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
  padding: 0;
  margin: 0;
  line-height: 0;
  font-size: 0;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.72);
}

.hero-dot.is-active {
  background: #ffffff;
  transform: scale(1.02);
}

.hero-dot:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.section-badge-wrap {
  margin-top: 1.2rem;
}

.section-badge {
  display: inline-block;
  margin: 0;
  background: #0e1121;
  color: #ffffff;
  padding: 0.9rem 1.2rem;
  font-size: clamp(1rem, 1.9vw, 1.8rem);
  font-weight: 700;
}

.records-grid {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.record-card {
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
}

.record-card img {
  width: 100%;
  height: 290px;
  object-fit: cover;
  display: block;
}

.record-card h3 {
  margin: 0.5rem 0.7rem 0.15rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f1f1f;
}

.record-card p {
  margin: 0 0.7rem 0.85rem;
  color: #5f5f5f;
  font-size: 0.96rem;
}

.record-card.placeholder {
  background: #f4f4f6;
}

.placeholder-box {
  height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.2rem;
  color: #a1a1a1;
}

.search-results {
  margin-top: 1.2rem;
}

body.search-mode .hero,
body.search-mode .section-badge-wrap,
body.search-mode #featured-grid,
body.search-mode #sell,
body.search-mode #marketplace-section,
body.search-mode #favourites-section,
body.search-mode #cart-section {
  display: none;
}

body.search-mode #search-results-section {
  margin-top: 0.9rem;
}

body.marketplace-mode .hero,
body.marketplace-mode .section-badge-wrap,
body.marketplace-mode #featured-grid,
body.marketplace-mode #search-results-section,
body.marketplace-mode #sell,
body.marketplace-mode #favourites-section,
body.marketplace-mode #cart-section {
  display: none;
}

body.favourites-mode .hero,
body.favourites-mode .section-badge-wrap,
body.favourites-mode #featured-grid,
body.favourites-mode #search-results-section,
body.favourites-mode #sell,
body.favourites-mode #marketplace-section,
body.favourites-mode #cart-section {
  display: none;
}

body.cart-mode .hero,
body.cart-mode .section-badge-wrap,
body.cart-mode #featured-grid,
body.cart-mode #search-results-section,
body.cart-mode #sell,
body.cart-mode #marketplace-section,
body.cart-mode #favourites-section {
  display: none;
}

.marketplace-section,
.collection-section {
  margin-top: 1.2rem;
}

.marketplace-head,
.collection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.marketplace-head h2,
.collection-head h2 {
  margin: 0;
  font-size: 1.34rem;
}

.marketplace-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.marketplace-head-actions p,
.collection-head p {
  margin: 0;
  color: #5f6673;
  font-size: 0.88rem;
}

.marketplace-toolbar {
  position: sticky;
  top: 0;
  z-index: 29;
  margin: 0 -0.25rem 0.7rem;
  padding: 0.45rem 0.25rem 0.35rem;
  background: rgba(237, 237, 237, 0.95);
  backdrop-filter: blur(6px);
}

#marketplace-load-more-btn,
#marketplace-refresh-btn {
  border: 1px solid #111827;
  background: #111827;
  color: #ffffff;
  border-radius: 8px;
  padding: 0.4rem 0.62rem;
  cursor: pointer;
}

.marketplace-filter-form {
  display: grid;
  grid-template-columns: 1.35fr 1.15fr 1fr 0.9fr 0.9fr 0.9fr 0.8fr 0.8fr auto auto;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.marketplace-filter-form input,
.marketplace-filter-form select,
.marketplace-filter-form button {
  min-height: 34px;
  border-radius: 8px;
}

.marketplace-filter-form select,
.marketplace-filter-form input {
  border: 1px solid #d3d8df;
  background: #ffffff;
  color: #1f2937;
  padding: 0.38rem 0.55rem;
}

#market-filter-reset-btn {
  border: 1px solid #cfd4dc;
  background: #ffffff;
  color: #161b26;
}

.marketplace-load-more-wrap {
  margin-top: 0.7rem;
  display: flex;
  justify-content: center;
}

.marketplace-grid .market-listing-card {
  border: 1px solid #dddddd;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

.marketplace-grid .market-listing-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.market-listing-body {
  padding: 0.65rem 0.72rem 0.75rem;
}

.market-listing-title {
  margin: 0;
  font-size: 1.04rem;
}

.market-listing-sub {
  margin: 0.15rem 0 0.45rem;
  color: #4f5663;
  font-size: 0.9rem;
}

.market-listing-meta,
.market-listing-price {
  margin: 0 0 0.45rem;
  color: #5f6673;
  font-size: 0.82rem;
}

.market-listing-price {
  color: #131722;
  font-weight: 700;
}

.market-listing-trust {
  margin: 0 0 0.5rem;
  color: #30406a;
  font-size: 0.78rem;
}

.market-listing-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.market-btn,
.market-btn-secondary {
  border-radius: 8px;
  border: 1px solid #1a1a1a;
  padding: 0.42rem 0.62rem;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  line-height: 1;
}

.market-btn {
  background: #181818;
  color: #ffffff;
  flex: 1 1 auto;
  min-width: 0;
}

.market-btn-secondary {
  background: #ffffff;
  color: #181818;
  flex: 0 0 auto;
  min-width: 42px;
}

.market-btn-secondary.active {
  background: #121826;
  color: #ffffff;
  border-color: #121826;
}

.market-btn-secondary[data-action="buy-now"] {
  min-width: 56px;
}

.cart-grid {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.cart-stage-indicator {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}

.cart-stage-step {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #e5e7eb;
  color: #6b7280;
  padding: 0.16rem 0.52rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.cart-stage-step.is-active:not(.is-complete) {
  border-color: #d1d5db;
  background: #e5e7eb;
  color: #6b7280;
}

.cart-stage-step.is-complete {
  border-color: #1e6f45;
  background: #1e6f45;
  color: #ffffff;
}

.cart-stage-panel[hidden] {
  display: none;
}

.cart-stage-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.6rem;
}

#cart-continue-btn {
  border: 1px solid #111827;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  min-height: 36px;
  padding: 0.36rem 0.78rem;
  cursor: pointer;
}

#cart-continue-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cart-item {
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.72rem;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 0.7rem;
}

.cart-item-media {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f3f4f6;
}

.cart-item-media.is-blank {
  background: #ffffff;
}

.cart-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-item-main {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.cart-item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.cart-item-title {
  margin: 0;
  font-weight: 700;
}

.cart-item-sub,
.cart-item-price {
  margin: 0;
  color: #5f6673;
  font-size: 0.85rem;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.22rem;
  width: 100%;
}

.qty-btn,
.remove-btn {
  border: 1px solid #cfcfcf;
  border-radius: 7px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  font-size: 0.58rem;
  line-height: 1;
  padding: 0.06rem 0.16rem;
  min-height: 18px;
  min-width: 22px;
}

.remove-btn {
  min-width: 46px;
}

.qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cart-checkout-form {
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.75rem;
  display: grid;
  gap: 0.62rem;
}

.cart-checkout-form h3 {
  margin: 0;
  font-size: 1rem;
  color: #111827;
}

.cart-checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.52rem;
}

.cart-checkout-grid label {
  display: grid;
  gap: 0.22rem;
  color: #374151;
  font-size: 0.8rem;
}

.cart-checkout-grid .field-span-2 {
  grid-column: 1 / -1;
}

.cart-checkout-grid input,
.cart-checkout-grid select {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid #d3d8df;
  background: #ffffff;
  color: #111827;
  padding: 0.35rem 0.52rem;
}

.cart-shipper-connect {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.6rem;
  justify-items: start;
}

.shipper-provider-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.shipper-provider-btn {
  min-height: 46px;
  border: 1px solid #cfd4dc;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 0.28rem 0.68rem;
  min-width: 118px;
}

.shipper-provider-btn img {
  max-width: 100%;
  max-height: 26px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.shipper-provider-btn.buyandship img {
  max-height: 24px;
}

.shipper-provider-btn.shippy {
  color: #111111;
  font-weight: 800;
  letter-spacing: 0.01em;
  min-width: 100px;
}

.shipper-provider-btn.is-selected {
  border-color: #1e6f45;
  box-shadow: inset 0 0 0 1px #1e6f45;
  background: #effaf3;
}

.shipper-provider-btn:disabled {
  opacity: 0.45;
  filter: grayscale(0.4);
  cursor: not-allowed;
}

.shipper-provider-status {
  margin: 0;
  color: #1e6f45;
  font-size: 0.8rem;
}

.cart-checkout-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

#connect-shipper-btn {
  justify-self: start;
  width: auto;
  min-height: 38px;
  padding: 0.3rem 0.76rem;
}

.shipper-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.shipper-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.shipper-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 260ms ease;
}

.shipper-modal.is-open .shipper-modal-backdrop {
  opacity: 1;
}

.shipper-modal-dialog {
  position: relative;
  width: min(560px, calc(100% - 2rem));
  margin: 12vh auto 0;
  border-radius: 12px;
  border: 1px solid #d5dbe6;
  background: #ffffff;
  padding: 0.72rem;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition:
    transform 300ms cubic-bezier(0.2, 0.75, 0.25, 1),
    opacity 220ms ease;
}

.shipper-modal.is-open .shipper-modal-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.shipper-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.shipper-modal-head h4 {
  margin: 0;
  color: #111827;
  font-size: 0.95rem;
}

.shipper-token-connect {
  margin-top: 0.68rem;
  border-top: 1px solid #e4e8ef;
  padding-top: 0.62rem;
  display: grid;
  gap: 0.4rem;
}

.shipper-token-connect label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #374151;
}

.shipper-token-connect input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d3d8df;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  padding: 0.4rem 0.55rem;
}

.shipper-token-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

@media (prefers-reduced-motion: reduce) {
  .shipper-modal,
  .shipper-modal-backdrop,
  .shipper-modal-dialog {
    transition: none;
  }
}

#cart-to-payment-btn,
#cart-checkout-btn {
  border: 1px solid #111827;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  min-height: 36px;
  padding: 0.36rem 0.78rem;
  cursor: pointer;
}

#cart-checkout-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cart-checkout-actions .secondary {
  border: 1px solid #cfd4dc;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  min-height: 36px;
  padding: 0.36rem 0.78rem;
  cursor: pointer;
}

.cart-payment-panel {
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.75rem;
  display: grid;
  gap: 0.62rem;
}

.cart-payment-panel h3 {
  margin: 0;
  font-size: 1rem;
  color: #111827;
}

.cart-payment-summary {
  margin: 0;
  color: #374151;
  font-size: 0.86rem;
}

.cart-view-orders-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #111827;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  min-height: 36px;
  padding: 0.36rem 0.78rem;
  text-decoration: none;
}

.cart-checkout-status-wrap {
  margin-top: 0.5rem;
}

.cart-checkout-status {
  margin: 0;
  border: 1px solid #d3d8df;
  border-radius: 8px;
  background: #f8fafc;
  color: #374151;
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
}

.cart-checkout-status[data-kind="ok"] {
  border-color: #b9e4cd;
  background: #eefaf3;
  color: #186840;
}

.cart-checkout-status[data-kind="warn"] {
  border-color: #f2d9a5;
  background: #fff7e8;
  color: #7f5c10;
}

.search-results-title {
  margin: 0;
  font-size: 1.2rem;
  color: #1a1a1a;
}

.search-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 0.6rem;
}

.search-head-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.search-results-toolbar {
  position: sticky;
  top: 0;
  z-index: 28;
  margin: 0 -0.25rem 0.5rem;
  padding: 0.45rem 0.25rem 0.35rem;
  background: rgba(237, 237, 237, 0.95);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(204, 209, 219, 0.85);
}

.search-filter-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 0.8fr 0.8fr auto auto;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.search-sort-dropdown {
  position: relative;
}

.search-sort-trigger {
  width: 100%;
  min-height: 34px;
  border: 1px solid #d3d8df;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.38rem 0.55rem;
}

.search-sort-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: #1f2937;
}

.search-sort-caret {
  font-size: 0.8rem;
  color: #4b5563;
}

.search-sort-dropdown.is-open .search-sort-caret {
  transform: rotate(180deg);
}

.search-sort-menu {
  position: absolute;
  top: calc(100% + 0.22rem);
  left: 0;
  right: 0;
  border: 1px solid #d3d8df;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.12);
  padding: 0.25rem;
  z-index: 35;
}

.search-sort-menu[hidden] {
  display: none !important;
}

.search-sort-option {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  min-height: 32px;
  padding: 0.34rem 0.45rem;
  font-size: 0.8rem;
}

.search-sort-option:hover {
  border-color: #d9e1ef;
  background: #f5f8ff;
}

.search-sort-option.is-active {
  border-color: #c4d2ec;
  background: #ebf1ff;
  color: #1f376d;
}

.search-multi-dropdown {
  position: relative;
}

.search-multi-trigger {
  width: 100%;
  min-height: 34px;
  border: 1px solid #d3d8df;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.38rem 0.55rem;
}

.search-multi-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: #1f2937;
}

.search-multi-dropdown.is-open .search-sort-caret {
  transform: rotate(180deg);
}

.search-multi-menu {
  position: absolute;
  top: calc(100% + 0.22rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 100%;
  border: 1px solid #d3d8df;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.12);
  padding: 0.22rem;
  z-index: 35;
  display: grid;
  gap: 0.1rem;
  max-height: 176px;
  overflow: auto;
}

.search-multi-menu[hidden] {
  display: none !important;
}

.search-multi-option {
  display: block;
  width: 100%;
  text-align: center;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  min-height: 26px;
  padding: 0.18rem 0.28rem;
  font-size: 0.76rem;
  line-height: 1.15;
  cursor: pointer;
}

.search-multi-option:hover {
  border-color: #8fc79f;
  background: #f5f8ff;
}

.search-multi-option.is-selected {
  border-color: #27ae60;
  background: #e8f8ef;
  color: #116632;
  font-weight: 700;
}

.search-filter-form input {
  border: 1px solid #d3d8df;
  background: #ffffff;
  color: #1f2937;
  border-radius: 8px;
  min-height: 34px;
  padding: 0.38rem 0.55rem;
}

.search-filter-form button {
  border-radius: 8px;
  min-height: 34px;
}

#search-filter-reset-btn {
  border: 1px solid #cfd4dc;
  background: #ffffff;
  color: #161b26;
}

.search-results-summary {
  margin: 0 0 0.45rem;
  color: #5f6673;
  font-size: 0.84rem;
}

.search-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem;
  background: #f1f3f5;
  border: 1px solid #d5d9de;
  border-radius: 999px;
}

.view-toggle-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475467;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.38rem 0.7rem;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.view-toggle-btn.is-active {
  background: #111827;
  color: #ffffff;
}

.detail-reveal-toggle .view-toggle-btn {
  min-width: 86px;
}

#search-results-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}

#search-results-grid.list-view .result-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: stretch;
  border-radius: 8px;
}

#search-results-grid.list-view .result-card img {
  height: 140px;
  min-height: 140px;
  align-self: start;
}

#search-results-grid.list-view .result-card .result-card-body {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 0.8rem;
  row-gap: 0.2rem;
}

#search-results-grid.list-view .result-card .result-title-row,
#search-results-grid.list-view .result-card .result-meta,
#search-results-grid.list-view .result-card p {
  grid-column: 1 / 2;
}

#search-results-grid.list-view .result-card .use-release-btn {
  grid-column: 2 / 3;
  grid-row: 1 / span 3;
  align-self: center;
}

#search-results-grid.list-view .result-card .result-extra {
  position: static;
  grid-column: 1 / -1;
  width: auto;
  max-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: none;
  transition:
    max-height 220ms ease,
    margin-top 220ms ease,
    padding 220ms ease,
    border-color 220ms ease,
    opacity 180ms ease;
}

#search-results-grid.list-view .result-card.expanded .result-extra {
  max-height: min(52vh, 360px);
  overflow: auto;
  margin-top: 0.45rem;
  padding: 0.72rem;
  border: 1px solid #dcdcdc;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#search-results-grid .result-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#search-results-grid.is-switching-view .result-card {
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  pointer-events: none;
}

.result-card {
  border: 1px solid #dddddd;
  transition: box-shadow 180ms ease, transform 220ms ease, opacity 220ms ease;
  position: relative;
  overflow: visible;
}

.result-sid-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 8;
  width: fit-content;
  max-width: calc(100% - 20px);
  border-radius: 10px;
  border: 1px solid rgba(255, 153, 51, 0.65);
  background: rgba(255, 153, 51, 0.5);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.42rem 0.66rem;
  text-align: center;
  backdrop-filter: blur(2px);
  white-space: nowrap;
}

.result-card.expanded {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
  z-index: 24;
}

#search-results-grid.detail-expand-mode .result-card {
  --expand-panel-width: min(560px, 55vw);
  transition:
    box-shadow 180ms ease,
    transform 220ms ease,
    opacity 220ms ease;
}

#search-results-grid.detail-expand-mode .result-card.expanded {
  z-index: 42;
}

#search-results-grid.detail-expand-mode .result-card .result-extra {
  top: 0 !important;
  left: 100% !important;
  right: auto !important;
  width: var(--expand-panel-width) !important;
  min-height: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: auto !important;
  border-left: 0 !important;
  border-radius: 0 10px 10px 0 !important;
  transform-origin: left center !important;
  transform: scaleX(0.92) !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22) !important;
  background: #ffffff !important;
  transition:
    opacity 260ms ease,
    transform 280ms cubic-bezier(0.2, 0.75, 0.22, 1),
    visibility 260ms ease !important;
}

#search-results-grid.detail-expand-mode .result-card.expand-left .result-extra {
  left: auto !important;
  right: 100% !important;
  border-left: 2px solid #ef4444 !important;
  border-right: 0 !important;
  border-radius: 10px 0 0 10px !important;
  transform-origin: right center !important;
}

#search-results-grid.detail-expand-mode .result-card.expanded .result-extra {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scaleX(1) !important;
}

#search-results-grid.detail-expand-mode .result-card::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + var(--expand-panel-width, min(560px, 55vw)) + 4px);
  height: calc(100% + 4px);
  border: 2px solid #ef4444;
  border-radius: 12px;
  pointer-events: none;
  box-sizing: border-box;
  z-index: 43;
  opacity: 0;
  transition: opacity 260ms ease;
}

#search-results-grid.detail-expand-mode .result-card.expanded::after {
  opacity: 0.95;
}

#search-results-grid.detail-expand-mode .result-card.expand-left::after {
  left: calc(-1 * var(--expand-panel-width, min(560px, 55vw)) - 2px);
  width: calc(100% + var(--expand-panel-width, min(560px, 55vw)) + 4px);
}

#search-results-grid.detail-info-mode .result-card .result-extra {
  top: 0 !important;
  left: calc(100% + 12px) !important;
  right: auto !important;
  width: min(430px, 42vw) !important;
  min-height: auto !important;
  height: auto !important;
  max-height: min(76vh, 560px) !important;
  border-left: 1px solid #dcdcdc !important;
  border-radius: 10px !important;
  transform: translateX(-6px) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18) !important;
}

.result-card .result-card-body {
  padding: 0.7rem;
}

.result-card .result-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.result-card .result-title-row h3 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.result-card .result-country-flag {
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1;
}

.result-card .result-meta {
  margin: 0 0 0.5rem;
  color: #5f5f5f;
  font-size: 0.86rem;
}

.result-card .result-extra {
  position: absolute;
  top: 0;
  left: 100%;
  width: min(430px, 42vw);
  max-height: min(76vh, 560px);
  height: auto;
  overflow: auto;
  overscroll-behavior: contain;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  padding: 0.72rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-6px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.result-card.expanded .result-extra {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.result-card.expand-left .result-extra {
  left: auto;
  right: 100%;
  transform: translateX(6px);
}

.result-card.expand-left.expanded .result-extra {
  transform: translateX(0);
}

.result-extra-loading,
.result-extra-error {
  font-size: 0.82rem;
  color: #667085;
}

.result-extra-loading {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-extra-spinner {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid #d1d5db;
  border-top-color: #111827;
  animation: result-extra-spin 0.75s linear infinite;
}

.result-extra-error {
  color: #9a3a2d;
}

@keyframes result-extra-spin {
  to {
    transform: rotate(360deg);
  }
}

.result-extra-grid {
  display: grid;
  gap: 0.3rem;
}

.result-extra-row {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 0.45rem;
  align-items: start;
}

.result-extra-key {
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 600;
}

.result-extra-val {
  color: #2d3748;
  font-size: 0.8rem;
}

.result-extra-section {
  margin-top: 0.45rem;
}

.result-extra-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #3a3a3a;
}

.result-extra-list {
  margin: 0.18rem 0 0;
  padding-left: 1rem;
}

.result-extra-list li {
  font-size: 0.78rem;
  color: #4b5563;
  line-height: 1.3;
}

.result-recs-wrap {
  margin-top: 0.62rem;
  border-top: 1px solid #eceff4;
  padding-top: 0.56rem;
}

.result-recs-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #2f3948;
  margin-bottom: 0.4rem;
}

.result-recs-list {
  display: grid;
  gap: 0.34rem;
}

.result-recs-item {
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #f8fafc;
  text-align: left;
  padding: 0.44rem 0.52rem;
  cursor: pointer;
  display: grid;
  gap: 0.1rem;
}

.result-recs-item:hover {
  border-color: #b9c7da;
  background: #f0f5fb;
}

.result-recs-main {
  font-size: 0.79rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.3;
}

.result-recs-sub {
  font-size: 0.74rem;
  color: #556172;
  line-height: 1.25;
}

.result-recs-empty,
.result-recs-issue {
  font-size: 0.76rem;
  color: #677489;
}

.result-recs-issue {
  color: #9a3a2d;
}

.result-extra-controls {
  margin-top: 0.52rem;
  display: flex;
  justify-content: flex-start;
}

.result-show-more-btn {
  border: 1px solid #1f2937;
  background: #111827;
  color: #ffffff;
  border-radius: 999px;
  padding: 0.33rem 0.72rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.result-show-more-btn:disabled {
  opacity: 0.65;
  cursor: progress;
}

.result-extra-more-unavailable {
  margin-top: 0.35rem;
  font-size: 0.74rem;
  color: #6b7280;
}

@media (max-width: 1080px) {
  .search-results-head {
    flex-wrap: wrap;
  }

  .result-card .result-extra {
    width: 86vw;
    left: 50%;
    right: auto;
    top: 100%;
    height: auto;
    max-height: 340px;
    transform: translateX(-50%);
  }

  .result-card.expand-left .result-extra {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .result-card.expanded .result-extra,
  .result-card.expand-left.expanded .result-extra {
    transform: translateX(-50%);
  }

  #search-results-grid.list-view .result-card {
    grid-template-columns: 110px 1fr;
  }

  #search-results-grid.list-view .result-card .result-action-row {
    grid-column: 1 / -1;
  }
}

.result-card .result-action-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.result-card .result-card-body {
  position: relative;
}

.result-card .use-release-btn,
.result-card .buy-copy-btn {
  border: 1px solid #181818;
  background: #181818;
  color: #ffffff;
  border-radius: 8px;
  padding: 0.42rem 0.62rem;
  cursor: pointer;
}

.result-card .buy-copy-btn {
  border-color: #334155;
  background: #0f172a;
}

.result-inline-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.45rem);
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.55rem;
  z-index: 26;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.985);
  transition:
    opacity 180ms ease,
    transform 200ms ease,
    visibility 180ms ease;
}

.result-inline-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.inline-panel-title {
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #1f2937;
}

.inline-readonly-row {
  font-size: 0.82rem;
  color: #374151;
  margin-bottom: 0.2rem;
}

.inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.4rem;
}

.inline-grid label,
.result-inline-panel > label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: #475569;
}

.inline-grid input,
.inline-grid select,
.result-inline-panel > label input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.32rem 0.45rem;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.82rem;
}

.inline-panel-actions {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.45rem;
}

.inline-primary-btn,
.inline-secondary-btn {
  border: 0;
  border-radius: 8px;
  padding: 0.36rem 0.58rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
}

.inline-primary-btn {
  background: #111827;
  color: #ffffff;
}

@keyframes cart-btn-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  15% {
    transform: translateX(-6px);
  }
  30% {
    transform: translateX(6px);
  }
  45% {
    transform: translateX(-5px);
  }
  60% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-3px);
  }
  90% {
    transform: translateX(3px);
  }
}

.add-copy-to-cart-btn.cart-duplicate-reject,
.market-btn.cart-duplicate-reject {
  animation: cart-btn-shake 0.5s ease;
  background: #dc2626 !important;
  color: #ffffff !important;
}

@keyframes cart-fly-to-icon {
  to {
    transform: translate(var(--cart-fly-dx, 0), var(--cart-fly-dy, 0)) scale(var(--cart-fly-scale, 0.35));
    opacity: 0.12;
  }
}

.cart-fly-image {
  position: fixed;
  z-index: 10050;
  pointer-events: none;
  margin: 0;
  padding: 0;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
  transform: translate(0, 0) scale(1);
  opacity: 1;
  will-change: transform, opacity;
}

.cart-fly-image.is-flying {
  animation: cart-fly-to-icon 0.68s cubic-bezier(0.22, 0.85, 0.28, 1) forwards;
}

@keyframes cart-toggle-receive {
  0%,
  100% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.14);
  }
}

#cart-toggle-btn.cart-toggle-receive {
  animation: cart-toggle-receive 0.45s ease;
}

.inline-secondary-btn {
  background: #e2e8f0;
  color: #111827;
}

.inline-panel-status {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #475569;
}

.inline-offer-list {
  display: grid;
  gap: 0.45rem;
}

.inline-offer-item {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
}

.inline-offer-main {
  font-size: 0.78rem;
  color: #334155;
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}

.inline-offer-line {
  display: block;
  line-height: 1.25;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .result-inline-panel {
    top: calc(100% + 0.38rem);
  }
}

.sell-section {
  margin-top: 1.4rem;
}

.sell-header h2 {
  margin: 0;
  font-size: 1.28rem;
}

.sell-header p {
  margin: 0.3rem 0 0.7rem;
  color: #616161;
}

.top-action-status {
  margin-bottom: 0.75rem;
  padding: 0.56rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #d4d4d4;
  background: #f9f9f9;
  color: #343434;
  font-size: 0.92rem;
}

.top-action-status[data-kind="ok"] {
  border-color: #b9e4cd;
  background: #eefaf3;
  color: #186840;
}

.top-action-status[data-kind="warn"] {
  border-color: #f2d9a5;
  background: #fff7e8;
  color: #7f5c10;
}

.sell-panel {
  border: 1px solid #dedede;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.95rem;
}

.sell-panel h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.sell-panel input,
.sell-panel select,
.sell-panel button,
.sell-panel textarea {
  background: #ffffff;
  color: #111111;
  border: 1px solid #d6d6d6;
  border-radius: 8px;
}

.sell-panel button {
  background: #141414;
  color: #ffffff;
  border-color: #141414;
}

.sell-panel .hint {
  margin-top: 0.7rem;
  background: #eff4ff;
  border-color: #cfdbf7;
  color: #263f74;
}

.sell-panel .hint.ok {
  background: #ebf9f0;
  border-color: #b7e8cb;
  color: #1f6a43;
}

.sell-panel .hint.warn {
  background: #fff8e8;
  border-color: #f5dba2;
  color: #825f0f;
}

.debug-storage {
  display: none;
}

@media (max-width: 1120px) {
  .marketplace-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .search-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .records-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-header-top {
    grid-template-columns: 1fr;
  }

  .market-search {
    max-width: none;
  }

  .market-nav {
    gap: 1.3rem;
    flex-wrap: wrap;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    min-height: auto;
  }

  .market-nav .spacer {
    display: none;
  }

  .market-dropdown {
    min-width: 170px;
  }
}

@media (max-width: 760px) {
  .marketplace-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cart-item {
    grid-template-columns: 70px 1fr;
    gap: 0.55rem;
  }

  .cart-item-media {
    width: 70px;
    height: 70px;
  }

  .cart-checkout-grid {
    grid-template-columns: 1fr;
  }

  .shipper-provider-grid {
    grid-template-columns: 1fr;
  }

  .cart-checkout-grid .field-span-2 {
    grid-column: auto;
  }

  .marketplace-toolbar {
    margin-bottom: 0.5rem;
    padding-top: 0.35rem;
  }

  .marketplace-filter-form {
    grid-template-columns: 1fr;
  }

  .search-filter-form {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
