:root {
  --night-page: #f5ecdf;
  --night-panel: #fffaf4;
  --night-hero: #ecd9c2;
  --night-ink: #302125;
  --night-muted: #65514e;
  --night-line: #d9c5b3;
  --night-active: #eed5da;
  --desert-accent: #78283a;
  --desert-on-accent: #fff9f2;
}
html.dark {
  --night-page: #20181a;
  --night-panel: #2b2224;
  --night-hero: #332526;
  --night-ink: #f6e9d9;
  --night-muted: #d6bfb3;
  --night-line: #624c50;
  --night-active: #583341;
  --desert-accent: #efafbf;
  --desert-on-accent: #36181f;
}
#shell .desert-home { display: inline-flex; align-items: center; color: var(--desert-accent); flex: 0 0 auto; }
.desert-logo { display: block; width: clamp(140px, 20vw, 198px); height: auto; }
#shell header [data-a="theme"] { display: flex; }
#shell .website-header .website-header-row { min-height: 64px; }
.site-post-cta, #view .market-hero a.market-sell {
  background: var(--desert-accent) !important;
  color: var(--desert-on-accent) !important;
  box-shadow: none !important;
}
.site-post-cta:hover, #view .market-hero a.market-sell:hover { filter: brightness(1.12); }
#view .market-hero {
  background: var(--night-hero) !important;
  color: var(--night-ink) !important;
  box-shadow: none !important;
}
#view .market-hero::before, #view .market-hero::after { display: none; }
html[lang="en"] #view .market-hero h1 { font-family: Georgia, serif; letter-spacing: -.04em; }
#view .market-hero p { color: var(--night-muted) !important; }
#view .market-hero .market-safety { color: var(--night-ink); border-color: var(--night-line); }
#view .market-hero .night-art img { max-height: 325px; }
#view .listing-card, #view .market-filters { border-color: var(--night-line) !important; background: var(--night-panel) !important; }
.desert-menu { position: relative; }
.desert-menu summary {
  list-style: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--night-line);
  border-radius: 10px;
  font-size: 20px;
}
.desert-menu summary::-webkit-details-marker { display: none; }
.desert-menu nav {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  width: min(240px, 82vw);
  border: 1px solid var(--night-line);
  border-radius: 12px;
  background: var(--night-panel);
  color: var(--night-ink);
  box-shadow: 0 12px 28px #0003;
  padding: 6px;
}
.desert-menu nav :is(a,button) {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  padding-inline: 12px;
  text-align: start;
  font-weight: 700;
}
.desert-menu nav [aria-current="page"], .desert-menu nav :is(a,button):hover { background: var(--night-active); border-radius: 8px; }
.native-app .desert-logo { width: 126px; }
.native-app .site-post-cta { min-height: 44px; max-width: 80px; }
.native-app .desert-phone-discovery { margin-block: .75rem; }
.native-app .desert-phone-discovery .night-discovery {
  padding: .75rem;
  border: 1px solid var(--night-line);
  border-radius: 14px;
  color: var(--night-ink);
}
.native-app .desert-phone-discovery input { color: var(--night-ink); background: var(--night-page); }
.native-app .desert-phone-discovery button { color: var(--night-ink); background: var(--night-panel); border-color: var(--night-line); }
.native-app .desert-phone-discovery button[aria-pressed="true"] { background: var(--night-active); }
.native-app #view .market-hero .night-intro { padding: 1rem; }
.native-app #view .market-hero .night-art img { max-height: 170px; }

.desert-footer-brand { display: flex; align-items: center; flex-wrap: wrap; gap: .85rem; }
.desert-footer-logo { color: var(--desert-accent); display: inline-flex; }
.desert-footer-logo .desert-logo { width: 140px; }
.desert-footer-links a { color: var(--desert-accent); text-underline-offset: .23em; }
.desert-footer-links a:hover { text-decoration: underline; }
.desert-footer-links a:focus-visible, .desert-category:focus-visible {
  outline: 2px solid var(--desert-accent);
  outline-offset: 3px;
}
.desert-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.8rem), 1fr));
  gap: .65rem;
}
#view .desert-category {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 90px;
  padding: .6rem .45rem;
  border: 1px solid var(--night-line);
  border-radius: 12px;
  background: var(--night-panel);
  color: var(--night-ink);
  text-align: center;
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.3;
  transform: none;
}
#view .desert-category:hover { border-color: var(--desert-accent); }
#view .desert-category[aria-pressed="true"] {
  border-color: var(--desert-accent);
  background: var(--night-active);
  box-shadow: inset 0 0 0 1px var(--desert-accent);
}
.desert-category-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  background: var(--night-page);
  color: var(--desert-accent);
}
.desert-category-icon svg { width: 22px; height: 22px; }
@media (max-width: 540px) {
  .desert-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
  #view .desert-category { min-height: 83px; font-size: .76rem; overflow-wrap: anywhere; }
}

/* Start shared sections on the reading side of the selected language. */
#shell .website-header-row,
#shell .website-nav,
#view .night-intro,
#view .night-discovery,
#view .market-filters,
#view footer {
  direction: inherit;
  text-align: start;
}
html[dir="rtl"] #view .night-intro h1,
html[dir="rtl"] #view .market-filters h2 { text-align: right; }
html[dir="ltr"] #view .night-intro h1,
html[dir="ltr"] #view .market-filters h2 { text-align: left; }

.desert-auth { display:grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); max-width: 58rem; margin: clamp(1rem,5vw,4rem) auto; padding: 0 1rem; }
.desert-auth-intro, .desert-auth-form { padding: clamp(1.25rem,4vw,3rem); }
.desert-auth-intro { background: #542131; color: #fff7eb; border-start-start-radius: 18px; border-end-start-radius: 18px; }
.desert-auth-intro h1 { font-size: clamp(1.65rem,4vw,2.65rem); font-weight: 800; line-height: 1.25; margin-block: .7rem 1rem; }
.desert-auth-intro a { display: inline-flex; min-height: 44px; align-items: center; margin-block-start: 1rem; text-decoration: underline; }
.desert-auth-form { background: var(--night-panel); border: 1px solid var(--night-line); border-start-end-radius: 18px; border-end-end-radius: 18px; }
@media(max-width: 650px) {
  .desert-auth { grid-template-columns: minmax(0,1fr); }
  .desert-auth-intro { border-radius: 18px 18px 0 0; }
  .desert-auth-form { border-radius: 0 0 18px 18px; }
}

.profile-edit { display: grid; gap: .45rem; margin-block: 1rem; padding-block: 1rem; border-block: 1px solid var(--night-line); }
.profile-edit h2 { font-weight: 800; font-size: 1.1rem; }
.profile-edit label { font-size: .85rem; font-weight: 700; margin-top: .35rem; }
.profile-edit :is(input,textarea) { width: 100%; min-width: 0; min-height: 44px; padding: .5rem .65rem; border: 1px solid var(--night-line); border-radius: 9px; background: var(--night-page); color: var(--night-ink); }
.profile-edit button { justify-self: start; margin-block-start: .35rem; }
.profile-identity { display:flex; align-items:center; gap:.55rem; min-width:0; }
.profile-avatar { width:44px; height:44px; border-radius:50%; object-fit:cover; flex:none; }

.listing-map-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block-start: .5rem;
  color: var(--desert-accent);
  font-size: .875rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.auth-social-buttons { display: grid; gap: .55rem; margin-block: 1rem; }
#view .auth-provider-button, .auth-email-button {
  display: flex; align-items:center; justify-content:center; gap:.6rem; min-height:46px;
}
#view .auth-provider-button {
  width:100%; padding:.5rem .8rem; border:1px solid var(--night-line); border-radius:10px;
  color:var(--night-ink); background:var(--night-panel); font-weight:750;
}
#view .auth-provider-button:hover { border-color:var(--desert-accent); background:var(--night-page); }
.auth-provider-button svg, .auth-email-button svg { width:20px; height:20px; flex:none; }
.auth-email-divider { display:flex; align-items:center; gap:.65rem; margin-block:1rem; color:var(--night-muted); font-size:.82rem; }
.auth-email-divider::before, .auth-email-divider::after { content:""; flex:1; height:1px; background:var(--night-line); }
