/* 24HourSouq UAE — premium visual refresh
   Presentation-only layer: no application state, routing, or Supabase logic is changed. */

:root {
  color-scheme: light;
  --ui-ink: #20283f;
  --ui-muted: #4e5b74;
  --ui-line: rgba(15, 107, 79, .13);
  --ui-paper: #f4f8f5;
  --ui-card: rgba(255, 255, 255, .94);
  --ui-shadow: 0 16px 44px rgba(17, 54, 40, .075);
  --ui-shadow-hover: 0 22px 54px rgba(17, 54, 40, .14);
}

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
html.dark { color-scheme: dark; }

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.012em;
  background:
    radial-gradient(ellipse at 8% 2%, rgba(31, 150, 105, .075), transparent 34rem),
    radial-gradient(ellipse at 94% 22%, rgba(242, 182, 50, .055), transparent 29rem),
    linear-gradient(180deg, #f8fbf9 0%, #f1f6f3 100%);
  color: var(--ui-ink);
}

html.dark body {
  background:
    radial-gradient(ellipse at 8% 2%, rgba(28, 130, 94, .16), transparent 34rem),
    radial-gradient(ellipse at 94% 22%, rgba(242, 182, 50, .055), transparent 29rem),
    linear-gradient(180deg, #0b1712 0%, #141a29 100%);
  color: #e8f0ff;
}

h1, h2, h3, h4, strong { font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif; }

/* Prominent brand lockup: make both the name and marketplace identity easy to read. */
.brand-wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  line-height: 1;
  min-width: 0;
}
.brand-name {
  display: block;
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .98;
}
.brand-marketplace-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 7px 3px;
  border-radius: 6px;
  background: rgba(15, 107, 79, .11);
  color: #5141a4;
  font-size: clamp(10px, .95vw, 12px);
  font-weight: 900;
  letter-spacing: .14em;
  line-height: 1;
}
html.dark .brand-marketplace-label {
  background: rgba(147, 219, 188, .13);
  color: #c6beff;
}
/* Keep the marketplace descriptor visible even on compact phones. */
@media (max-width: 420px) {
  .brand-name { font-size: 20px; }
  .brand-marketplace-label { font-size: 9px; letter-spacing: .12em; padding: 4px 6px 3px; }
}

/* A gentle transition whenever the user moves between pages. */
#view > div {
  animation: souq-page-enter .48s cubic-bezier(.2, .7, .25, 1) both;
}

@keyframes souq-page-enter {
  from { opacity: 0; transform: translateY(11px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes souq-glow-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: .6; }
  50% { transform: translate3d(-10px, 8px, 0) scale(1.08); opacity: .9; }
}

@keyframes souq-card-enter {
  from { opacity: 0; transform: translateY(13px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Sticky glass header */
#shell header {
  background: rgba(255, 255, 255, .88) !important;
  border-bottom: 1px solid rgba(15, 107, 79, .12) !important;
  box-shadow: 0 6px 24px rgba(17, 54, 40, .055);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
html.dark #shell header {
  background: rgba(12, 27, 20, .88) !important;
  border-bottom-color: rgba(166, 205, 187, .12) !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .19);
}
#shell header > div { max-width: 1240px !important; min-height: 82px; }
#shell header a[href="#market"] { font-family: Manrope, Inter, sans-serif; letter-spacing: -.045em; }
#shell header a[href="#market"] svg { filter: drop-shadow(0 3px 7px rgba(15, 107, 79, .17)); }
#shell nav[aria-label="Main navigation"] {
  padding: 4px;
  border: 1px solid rgba(15, 107, 79, .09);
  border-radius: 17px;
  background: rgba(245, 249, 246, .8);
}
html.dark #shell nav[aria-label="Main navigation"] {
  background: rgba(255, 255, 255, .045);
  border-color: rgba(255, 255, 255, .07);
}
#shell nav[aria-label="Main navigation"] a { border-radius: 13px !important; }
#shell nav[aria-label="Main navigation"] a[aria-current="page"] {
  box-shadow: 0 5px 15px rgba(9, 79, 57, .19);
}
#shell nav[aria-label="Main navigation"] a:not([aria-current="page"]):hover {
  transform: translateY(-1px);
}
#shell header button { transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
#shell header button:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(16, 63, 46, .10); }

/* Marketplace hero: richer gradient, soft animated light, and better spacing. */
#view .market-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 30px !important;
  padding: clamp(1.5rem, 4vw, 3rem) !important;
  background: linear-gradient(118deg, #073d30 0%, #0c654b 49%, #13815f 100%) !important;
  box-shadow: 0 24px 58px rgba(7, 68, 49, .23), inset 0 1px 0 rgba(255, 255, 255, .15) !important;
}
#view .market-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 27rem;
  height: 27rem;
  top: -14rem;
  right: -5rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .24), rgba(255, 255, 255, .045) 45%, transparent 70%);
  filter: blur(2px);
  animation: souq-glow-drift 8s ease-in-out infinite;
}
#view .market-hero::after {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  right: 10%;
  bottom: -15rem;
  border: 1px solid rgba(242, 182, 50, .28);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(242, 182, 50, .045), 0 0 0 54px rgba(242, 182, 50, .025);
}
#view .market-hero > * { position: relative; z-index: 1; }
#view .market-hero h1 {
  max-width: 850px;
  font-family: Manrope, Inter, sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.45rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -.055em;
  text-wrap: balance;
  text-shadow: 0 3px 16px rgba(0, 0, 0, .12);
}
#view .market-hero p {
  max-width: 690px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .86) !important;
}
#search-q {
  min-height: 58px !important;
  padding-inline: 1.25rem !important;
  border: 1px solid rgba(255, 255, 255, .8) !important;
  border-radius: 17px !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .14), inset 0 1px 2px rgba(0, 0, 0, .025) !important;
  font-size: .97rem;
  transition: box-shadow .2s ease, transform .2s ease;
}
#search-q:focus { transform: translateY(-1px); box-shadow: 0 0 0 4px rgba(242, 182, 50, .28), 0 15px 35px rgba(0, 0, 0, .16) !important; }

/* Filter panel and selection chips */
#view .market-filters {
  border-radius: 24px !important;
  border-color: var(--ui-line) !important;
  background: rgba(255, 255, 255, .88) !important;
  box-shadow: 0 12px 34px rgba(17, 54, 40, .055) !important;
  padding: clamp(1rem, 2.5vw, 1.5rem) !important;
  backdrop-filter: blur(12px);
}
html.dark #view .market-filters {
  background: rgba(20, 42, 32, .9) !important;
  border-color: rgba(166, 205, 187, .12) !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .16) !important;
}
#view button[data-a="setEm"],
#view button[data-a="setCat"],
#view button[data-a="setSub"] {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
#view button[data-a="setEm"]:hover,
#view button[data-a="setCat"]:hover,
#view button[data-a="setSub"]:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(15, 79, 58, .09); }

/* Listing cards */
#listing-grid { align-items: stretch; gap: 1.15rem !important; }
#listing-grid > a {
  position: relative;
  border-radius: 22px !important;
  border-color: rgba(15, 107, 79, .12) !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 8px 25px rgba(17, 54, 40, .055) !important;
  animation: souq-card-enter .48s cubic-bezier(.2, .7, .25, 1) both;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease !important;
}
html.dark #listing-grid > a {
  background: #142a20 !important;
  border-color: rgba(166, 205, 187, .13) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .19) !important;
}
#listing-grid > a:nth-child(2) { animation-delay: 35ms; }
#listing-grid > a:nth-child(3) { animation-delay: 70ms; }
#listing-grid > a:nth-child(4) { animation-delay: 105ms; }
#listing-grid > a:nth-child(5) { animation-delay: 140ms; }
#listing-grid > a:nth-child(6) { animation-delay: 175ms; }
#listing-grid > a:nth-child(7) { animation-delay: 210ms; }
#listing-grid > a:nth-child(8) { animation-delay: 245ms; }
#listing-grid > a:hover {
  transform: translateY(-6px);
  border-color: rgba(15, 107, 79, .36) !important;
  box-shadow: var(--ui-shadow-hover) !important;
}
#listing-grid > a > div:first-child { background-color: #e8f1eb; }
#listing-grid > a img { transition: transform .5s cubic-bezier(.2, .7, .25, 1); }
#listing-grid > a:hover img { transform: scale(1.055); }
#listing-grid > a > div:last-child { padding: 1rem !important; }
#listing-grid > a h3 { letter-spacing: -.025em; }
#listing-grid > a span.text-lg { font-family: Manrope, Inter, sans-serif; letter-spacing: -.035em; }

/* Consistent surfaces for account, store, forms, detail and detail panels. */
#view .bg-white.dark\:bg-surface-cardDark.border,
#view form[data-f="postad"] {
  border-color: var(--ui-line) !important;
  border-radius: 22px !important;
  box-shadow: 0 12px 34px rgba(17, 54, 40, .055) !important;
}
html.dark #view .bg-white.dark\:bg-surface-cardDark.border,
html.dark #view form[data-f="postad"] {
  border-color: rgba(166, 205, 187, .13) !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .17) !important;
}
#view form[data-f="postad"] { padding: clamp(1.1rem, 3vw, 2rem) !important; }
#view input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
#view select,
#view textarea {
  border-radius: 13px !important;
  border-color: rgba(15, 107, 79, .18) !important;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
html.dark #view input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html.dark #view select,
html.dark #view textarea {
  border-color: rgba(166, 205, 187, .2) !important;
  background-color: #141a29 !important;
}
#view input:focus, #view select:focus, #view textarea:focus {
  outline: none;
  border-color: #17896a !important;
  box-shadow: 0 0 0 4px rgba(23, 137, 106, .12);
}
#view label { letter-spacing: -.005em; }

/* Buttons have a consistent, confident tactile feel without changing their actions. */
#view button, #modal-root button, #shell button {
  -webkit-tap-highlight-color: transparent;
}
#view button:not(:disabled), #modal-root button:not(:disabled) {
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background .18s ease;
}
#view button:not(:disabled):hover, #modal-root button:not(:disabled):hover { filter: brightness(1.025); }
#view button:not(:disabled):active, #modal-root button:not(:disabled):active { transform: scale(.985); }
#view button:disabled { cursor: not-allowed; }

/* Small status labels, result counter and footer details. */
#result-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 .85rem;
  border: 1px solid rgba(15, 107, 79, .11);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: #52675d !important;
}
html.dark #result-count { background: rgba(255, 255, 255, .045); color: #b9ccc2 !important; }
#view h1 { letter-spacing: -.045em; }
#view h2 { letter-spacing: -.03em; }

#view + footer,
body > footer {
  color: #4e5b74;
}
footer.max-w-6xl {
  max-width: 1240px !important;
  margin-top: 4rem !important;
  padding-top: 1.5rem !important;
  border-top-color: rgba(15, 107, 79, .12) !important;
}
html.dark footer.max-w-6xl { border-top-color: rgba(166, 205, 187, .12) !important; }
footer a { transition: color .18s ease, transform .18s ease; }
footer a:hover { color: #5141a4; }
html.dark footer a:hover { color: #7ed7b2; }

/* Cookie notice, toast, and dialogs */
#cookie-bar > div {
  border-color: rgba(15, 107, 79, .17) !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 55px rgba(10, 38, 27, .17) !important;
  backdrop-filter: blur(14px);
}
#toast { border-radius: 16px !important; box-shadow: 0 18px 50px rgba(0, 0, 0, .22) !important; }
#modal-root [role="dialog"] {
  border-radius: 26px !important;
  border-color: rgba(15, 107, 79, .15) !important;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .28) !important;
  animation: souq-page-enter .28s cubic-bezier(.2, .7, .25, 1) both;
}

/* Mobile navigation sits above the safe-area and has a subtle glass finish. */
#shell nav[aria-label="Mobile navigation"] {
  background: rgba(255, 255, 255, .92) !important;
  border-top-color: rgba(15, 107, 79, .12) !important;
  box-shadow: 0 -8px 28px rgba(17, 54, 40, .08);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  padding-top: .55rem !important;
}
html.dark #shell nav[aria-label="Mobile navigation"] {
  background: rgba(12, 27, 20, .94) !important;
  border-top-color: rgba(166, 205, 187, .12) !important;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, .22);
}
#shell nav[aria-label="Mobile navigation"] a { min-height: 48px; border-radius: 14px !important; }
#shell nav[aria-label="Mobile navigation"] a[aria-current="page"] {
  box-shadow: 0 5px 14px rgba(9, 79, 57, .17);
}

@media (min-width: 1024px) {
  #view > .max-w-6xl, #view > .max-w-5xl { max-width: 1240px !important; }
}

@media (max-width: 640px) {
  #view > .max-w-6xl { padding-inline: 1rem; }
  #view .market-hero { border-radius: 24px !important; }
  #listing-grid { gap: .85rem !important; }
  #listing-grid > a { border-radius: 18px !important; }
  footer.max-w-6xl { margin-top: 2.5rem !important; padding-bottom: 6.5rem !important; }
}

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


/* Pricing page: restrained motion, premium cards and accessible contrast. */
.pricing-hero { isolation: isolate; }
.pricing-hero-orb {
  position: absolute !important;
  position: absolute;
  width: 18rem;
  height: 18rem;
  border-radius: 9999px;
  filter: blur(2px);
  opacity: .22;
  pointer-events: none;
  background: radial-gradient(circle, rgba(242,182,50,.9), rgba(242,182,50,0) 68%);
  animation: pricing-orb-drift 12s ease-in-out infinite alternate;
}
.pricing-hero-orb-one { top: -8rem; right: -4rem; }
.pricing-hero-orb-two { bottom: -12rem; right: 32%; width: 22rem; height: 22rem; animation-delay: -5s; opacity: .14; }
.pricing-offer-card {
  margin-top: 1.25rem;
  background: linear-gradient(125deg, #10291f 0%, #164a36 50%, #0d3729 100%);
  border: 1px solid rgba(242,182,50,.5);
}
.pricing-offer-glow {
  position: absolute;
  width: 24rem;
  height: 24rem;
  top: -14rem;
  right: -8rem;
  border-radius: 50%;
  background: rgba(242,182,50,.22);
  filter: blur(48px);
  pointer-events: none;
}
.pricing-plan-card {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  animation: pricing-card-enter .55s cubic-bezier(.2,.7,.25,1) both;
}
.pricing-plan-card:nth-child(2) { animation-delay: .08s; }
.pricing-plan-card:nth-child(3) { animation-delay: .16s; }
.pricing-plan-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(10, 50, 34, .12);
}
.pricing-plan-featured { box-shadow: 0 16px 44px rgba(10, 80, 56, .14); }
@keyframes pricing-orb-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-18px, 16px, 0) scale(1.08); }
}
@keyframes pricing-card-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
html.dark .pricing-plan-card:hover { box-shadow: 0 20px 48px rgba(0, 0, 0, .28); }
@media (max-width: 640px) {
  .pricing-hero { padding: 1.35rem !important; }
  .pricing-offer-card { border-radius: 1.5rem !important; }
  .pricing-plan-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pricing-hero-orb, .pricing-plan-card { animation: none !important; }
  .pricing-plan-card { transition: none !important; }
}

/* V9 UI polish */
.listing-card { contain: paint; }
.listing-card img { background: #e4eaf8; }
.line-clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.item-sticky-bar { position:sticky; bottom:0; z-index:40; }
.skeleton { background:linear-gradient(90deg,#e7eee9 25%,#f3f8f5 37%,#e7eee9 63%); background-size:400% 100%; animation:sk 1.2s infinite; border-radius:.75rem; }
@keyframes sk { 0%{background-position:100% 0} 100%{background-position:0 0} }
@media (prefers-reduced-motion: reduce) { .skeleton { animation:none; } }

/* Pricing page: buttons/links should not inherit the global link underline. */
.pricing-page a { text-decoration: none; }
.pricing-page a:hover { text-decoration: none; }
.pricing-page a[href="#contact"]:hover { text-decoration: underline; }
html body { background: #f5f7f5; }
html.dark body { background: #0d1714; }
#view .market-hero {
  background: #104a39 !important;
  color: #fff;
  padding: clamp(1.25rem, 4vw, 3rem);
}
#view .market-hero::before, #view .market-hero::after { content: none; }
.market-hero-actions, .market-results-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}
.market-hero-actions { margin-block: 1rem; }
.market-results-heading { justify-content: space-between; margin-block-start: 1.5rem; }
.market-results-heading h2 { font-size: 1.35rem; font-weight: 800; }
.market-sell, .market-safety, .market-saved {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 1rem;
  border-radius: .65rem;
  border: 1px solid currentColor;
  font-weight: 750;
}
.market-hero a.market-sell { background: #f2c763; color: #1b230e; border-color: transparent; text-decoration: none; }
.market-hero a.market-safety { color: #fff; text-decoration: none; }
.market-saved[aria-pressed="true"] { background: #104a39; color: white; }
.dark .market-saved[aria-pressed="true"] { background: #c6beff; color: #104a39; }
.market-filter-input { width: 100%; min-height: 44px; padding-inline: .75rem; }
.listing-link::after { content: ""; position: absolute; inset: 0; }
.listing-save { z-index: 1; color: #485e53; }
.listing-save[aria-pressed="true"] { color: #b42318; }
.listing-card:focus-within { outline: 2px solid #aa791e; outline-offset: 2px; }
[lang="ar"] body, [lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3, [lang="ar"] strong {
  font-family: "Noto Sans Arabic", Tahoma, system-ui, sans-serif;
  letter-spacing: normal;
}
[lang="ar"] .brand-name, [lang="ar"] .brand-marketplace-label { letter-spacing: normal; line-height: 1.2; }
#shell nav a { min-height: 44px; }


html.dark #view #search-q { color: #e8f0ff; }
html.dark #view #search-q::placeholder { color: #afc2b8; }
#view .market-filter-input { border: 1px solid; background: #fff; }
html[lang="ar"] #view .market-hero h1 {
  font-family: "Noto Sans Arabic", Tahoma, system-ui, sans-serif;
  letter-spacing: normal;
  line-height: 1.45 !important;
}
/* Night Market */
:root {
  --night-page: #f4f6fc;
  --night-panel: #ffffff;
  --night-hero: #eef1fa;
  --night-ink: #20283f;
  --night-muted: #4e5b74;
  --night-line: #ced8ed;
  --night-active: #dedaff;
}
html.dark {
  --night-page: #111722;
  --night-panel: #1c2535;
  --night-hero: #191c35;
  --night-ink: #e8f0ff;
  --night-muted: #c9d3eb;
  --night-line: #435278;
  --night-active: #342e5b;
}
html body, html.dark body { background: var(--night-page); color: var(--night-ink); }
#shell header, #shell nav[aria-label="Mobile navigation"] {
  background: var(--night-panel);
  border-color: var(--night-line);
}
html.dark #shell header { background: var(--night-panel); border-color: var(--night-line); }

#view .market-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 0 !important;
  border: 1px solid var(--night-line);
  border-radius: 20px !important;
  background: var(--night-hero) !important;
  color: var(--night-ink);
  box-shadow: 0 10px 30px #20283f19 !important;
}
.night-intro { padding: clamp(1.25rem, 4vw, 3rem); align-self: center; }
#view .market-hero h1 { text-shadow: none; text-wrap: pretty; }
html[lang="en"] #view .market-hero h1 { font-family: Georgia, "Times New Roman", serif; }
#view .market-hero p { color: var(--night-muted) !important; }
.night-art { overflow: hidden; }
.night-art img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.night-discovery {
  min-width: 0;
  padding: 1rem clamp(1.25rem, 4vw, 3rem);
  background: var(--night-panel);
  border-block-start: 1px solid var(--night-line);
}
#view .market-hero .night-discovery button {
  min-height: 40px;
  color: var(--night-ink);
  border-color: var(--night-line);
  background: transparent;
}
#view .market-hero .night-discovery button[aria-pressed="true"] {
  background: var(--night-active);
  border-color: currentColor;
}
#view .market-hero #search-q {
  background: var(--night-page) !important;
  border-color: var(--night-line) !important;
  color: var(--night-ink);
  box-shadow: none !important;
}
#view .market-hero #search-q::placeholder { color: var(--night-muted); }
#view .market-hero #search-q:focus-visible { outline: 2px solid var(--night-muted); outline-offset: 2px; }
.market-hero a.market-sell {
  background: linear-gradient(180deg, #cbc4ff, #a69bff);
  color: #1c1830;
  box-shadow: 0 4px 0 #58509b, 0 7px 12px #685caf55;
  transition: transform 140ms ease-out, box-shadow 140ms ease-out;
}
.market-hero a.market-sell:active { transform: translateY(3px); box-shadow: 0 1px 0 #58509b; }
.market-hero a.market-safety { color: var(--night-ink); }

#view .market-filters, html.dark #view .market-filters {
  background: var(--night-panel) !important;
  border-color: var(--night-line) !important;
}
.night-categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: .5rem; }
.night-categories button { min-height: 48px; border-radius: .65rem; }
.market-saved[aria-pressed="true"], .dark .market-saved[aria-pressed="true"] {
  background: var(--night-active);
  color: var(--night-ink);
}
@media (min-width: 720px) {
  #view .market-hero { grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); }
  .night-art { display: grid; }
  .night-art img { height: 100%; }
  .night-discovery { grid-column: 1 / -1; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #view .listing-card.night-featured:hover {
    transform: perspective(850px) translateY(-3px) rotateX(3deg) rotateY(-2deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .market-hero a.market-sell { transition: none; }
  .market-hero a.market-sell:active { transform: none; }
}

#shell header, html.dark #shell header {
  background: var(--night-panel) !important;
  border-bottom-color: var(--night-line) !important;
}
#shell nav[aria-label="Main navigation"], html.dark #shell nav[aria-label="Main navigation"] {
  background: var(--night-page);
  border-color: var(--night-line);
}
html:not(.dark) #view .listing-card { background: var(--night-panel); }

/* The hero retains the Night Market identity in either site theme. */
#view .market-hero { background: #191c35 !important; color: #e8f0ff; }
#view .market-hero h1 { font-family: Manrope, Inter, system-ui, sans-serif; }
html[lang="en"] #view .market-hero h1 { font-family: Manrope, Inter, system-ui, sans-serif; letter-spacing: -.045em; }
#view .market-hero p { color: #c9d3eb !important; }
.market-hero a.market-safety { color: #e8f0ff; }
.night-search-title { margin-block-end: .55rem; font-size: .9rem; font-weight: 800; }
.night-art img { object-position: center; }
html.dark .listing-card img { background: #1c2535; }
html.dark .listing-card:focus-within { outline-color: #b4aaff; }
@media (min-width: 720px) {
  #view .market-hero { gap: .65rem; padding: .65rem !important; }
  .night-art { border-radius: 14px; }
  .night-discovery { border: 1px solid var(--night-line); border-radius: 14px; }
}

[data-detail-photo][hidden] { display: none !important; }
.photo-fallback-visible { display: grid !important; }

#modal-root [role="dialog"]:has([data-lightbox-viewer]) {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  color: #fff;
  background: #090b12;
}
#modal-root [data-backdrop]:has([data-lightbox-viewer]) { padding: 0; z-index: 10000; }
.photo-viewer { height: 100%; display: flex; flex-direction: column; }
.photo-viewer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: max(8px, env(safe-area-inset-top)) 16px 8px;
  flex: 0 0 auto;
}
.photo-viewer-stage { position: relative; flex: 1; min-height: 0; }
.photo-viewer-stage img { display: block; width: 100%; height: 100%; object-fit: contain; }
.photo-viewer-toolbar button, .photo-arrow {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #fff8;
  border-radius: 50%;
  background: #10131de6;
  color: #fff;
  font: 30px/1 system-ui, sans-serif;
}
.photo-arrow { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: auto; }
.photo-arrow-prev { left: 8px; }
.photo-arrow-next { right: 8px; }
.photo-preview-controls { position: absolute; inset: 0; pointer-events: none; }
.photo-preview-count {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 3px 10px;
  background: #10131de6;
  color: #fff;
}

.site-post-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 5px 10px; border-radius: 12px; background: #5141a4; color: white; font-size: .8rem; font-weight: 800; text-align: center; line-height: 1.2; }
.site-post-cta:hover { background: #41338a; }
@media (max-width: 460px) { header .brand-marketplace-label { display: none; } header [data-a="theme"] { display: none; } }

#shell .website-header > div { max-width: 72rem !important; min-height: 0; }
.website-header-row { min-height: 66px !important; }
#shell .website-header .website-nav-row { padding-bottom: 10px; }
#shell .website-header .website-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  align-items: center;
  padding: 4px;
  border-radius: 12px;
}
.website-nav a { display: inline-flex; align-items: center; flex: none; white-space: nowrap; }
@media (max-width: 420px) {
  .website-header-row { flex-wrap: wrap; padding-block: 7px; }
  .website-header-row .site-post-cta { max-width: 8rem; }
}
