:root {
  --bg: #0f0f10;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-2: rgba(255, 255, 255, 0.10);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f6f3ef;
  --muted: #a9a29b;
  --orange: #ff8a1f;
  --orange-2: #ff6a00;
  --green: #3ccf7a;
  --red: #ff5a5a;
  --amber: #ffc04d;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* Faded green nature watermark behind every screen */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: url('/img/watermark-green.jpg') center / cover no-repeat;
  opacity: 0.24;
  filter: saturate(0.85);
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% -5%, rgba(255, 138, 31, 0.22), transparent 60%),
    radial-gradient(500px 500px at -10% 40%, rgba(255, 106, 0, 0.12), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(255, 170, 80, 0.10), transparent 60%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }

.shell { max-width: 480px; margin: 0 auto; padding: 18px 16px 110px; min-height: 100vh; }
.shell.wide { max-width: 980px; }

/* ---------- glass ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow);
}

/* ---------- header ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 600;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  border: 2px solid rgba(255,255,255,.25);
}
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--glass-2); border: 1px solid var(--line); cursor: pointer; font-size: 18px;
}

.hello { color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.headline { font-size: 34px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 18px; }
.headline em { font-style: normal; color: var(--orange); }

/* ---------- search ---------- */
.search { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 18px; border-radius: 999px; margin-bottom: 18px; }
.search input { flex: 1; background: none; border: 0; outline: 0; padding: 10px 0; color: var(--text); min-width: 0; }
.search input::placeholder { color: var(--muted); }
.search button { border: 0; border-radius: 999px; padding: 10px 16px; background: var(--glass-2); cursor: pointer; }

/* ---------- categories ---------- */
.cats { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: 0 0 auto; width: 72px; padding: 10px 4px; text-align: center; cursor: pointer;
  border-radius: 18px; background: var(--glass); border: 1px solid var(--line);
  font-size: 11px; color: var(--muted); transition: .2s;
}
.cat .ci { font-size: 26px; display: block; margin-bottom: 4px; }
.cat.active { background: linear-gradient(160deg, rgba(255,138,31,.35), rgba(255,106,0,.15)); border-color: var(--orange); color: var(--text); }

/* ---------- promo ---------- */
.promo { position: relative; overflow: hidden; padding: 20px; margin-bottom: 22px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.promo .tag { font-size: 12px; color: var(--muted); }
.promo h2 { font-size: 22px; margin: 6px 0 14px; }
.promo h2 span { color: var(--orange); display: block; }
.promo img { width: 120px; border-radius: 18px; }

/* ---------- section heading ---------- */
.sec { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 12px; }
.sec h3 { font-size: 18px; font-weight: 600; }
.sec a, .sec span { font-size: 13px; color: var(--muted); }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.shell.wide .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.card { padding: 10px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: transform .15s; }
.card:hover { transform: translateY(-2px); }
.thumb {
  aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden;
  display: grid; place-items: center; font-size: 54px;
  background: radial-gradient(circle at 30% 20%, rgba(255,138,31,.35), rgba(255,255,255,.03) 70%);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .t { font-size: 14px; font-weight: 600; line-height: 1.25; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .row { display: flex; justify-content: space-between; align-items: center; }
.price { font-weight: 700; color: var(--orange); white-space: nowrap; }
.mini { font-size: 12px; color: var(--muted); }
.plus { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--orange); color: #fff; font-weight: 700; }

.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255, 90, 90, .18); color: #ff8b8b; }
.pill.pending { background: rgba(255,192,77,.16); color: var(--amber); }
.pill.approved { background: rgba(60,207,122,.16); color: var(--green); }
.pill.rejected { background: rgba(255,90,90,.16); color: var(--red); }
.pill.cat-pill { background: rgba(255,138,31,.18); color: var(--orange); }

/* ---------- detail ---------- */
.hero { position: relative; margin: -18px -16px 0; height: 340px; overflow: hidden; display: grid; place-items: center; font-size: 120px;
  background: radial-gradient(circle at 50% 40%, rgba(255,138,31,.35), transparent 70%); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero .back { position: absolute; top: 16px; left: 16px; }
.detail { position: relative; margin-top: -40px; padding: 20px; }
.detail h1 { font-size: 22px; margin: 10px 0 4px; }
.detail .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.detail .price { font-size: 22px; }
.detail p { color: #d8d2cb; line-height: 1.6; font-size: 14px; white-space: pre-wrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.cta { display: flex; gap: 10px; margin-top: 16px; }

/* ---------- buttons ---------- */
.btn {
  border: 0; cursor: pointer; border-radius: 999px; padding: 13px 22px; font-weight: 600;
  background: linear-gradient(135deg, var(--orange), var(--orange-2)); color: #fff;
  box-shadow: 0 8px 20px rgba(255, 106, 0, .35); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: wait; }
.btn.ghost { background: var(--glass-2); box-shadow: none; border: 1px solid var(--line); }
.btn.danger { background: rgba(255,90,90,.18); color: #ff9a9a; box-shadow: none; border: 1px solid rgba(255,90,90,.35); }
.btn.ok { background: linear-gradient(135deg, #3ccf7a, #23a85a); box-shadow: 0 8px 20px rgba(35,168,90,.3); }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.block { width: 100%; }

/* ---------- forms ---------- */
.form { padding: 22px; display: grid; gap: 14px; }
.form h2 { font-size: 22px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(0,0,0,.25); color: var(--text); outline: none; transition: border .2s;
}
.input:focus { border-color: var(--orange); }
textarea.input { min-height: 110px; resize: vertical; }
select.input option { background: #1b1b1c; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
/* property details on the post form (only shown for the Property category) */
.prop-fields { display: grid; gap: 12px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.prop-fields[hidden] { display: none; }
.prop-fields legend { padding: 0 6px; font-weight: 600; }
.err { color: #ff9a9a; font-size: 13px; min-height: 1em; }
.note { font-size: 13px; color: var(--muted); line-height: 1.5; }
.switch { text-align: center; font-size: 14px; color: var(--muted); }
.switch a { color: var(--orange); font-weight: 600; }

.drop {
  border: 1.5px dashed var(--line); border-radius: 18px; padding: 16px; text-align: center; cursor: pointer;
  color: var(--muted); font-size: 13px; display: grid; place-items: center; gap: 8px; min-height: 140px;
}
.drop img { max-height: 200px; border-radius: 12px; }
.drop input { display: none; }

/* ---------- auth splash ---------- */
.splash { text-align: center; margin: 10px 0 18px; }
.splash img { width: 240px; margin: 0 auto; border-radius: 20px; }

/* ---------- lists ---------- */
.list { display: grid; gap: 12px; }
.item { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 10px; align-items: start; }
.item .thumb { font-size: 34px; border-radius: 14px; }
.item h4 { margin: 0 0 4px; font-size: 15px; }
.item .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.reason { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255,90,90,.1); font-size: 12px; color: #ffb3b3; }

/* ---------- admin ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { padding: 14px; text-align: center; }
.stat b { display: block; font-size: 26px; }
.stat span { font-size: 12px; color: var(--muted); }
.stat.hl b { color: var(--orange); }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: var(--glass); padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 13px; }
.tabs button.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.review { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 14px; }
.review .thumb { font-size: 60px; }
.review p { margin: 6px 0; color: #d8d2cb; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
table.users { width: 100%; border-collapse: collapse; font-size: 13px; }
table.users th, table.users td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.users th { color: var(--muted); font-weight: 500; }
.table-wrap { overflow-x: auto; padding: 8px 12px; }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); grid-column: 1 / -1; }
.empty .big { font-size: 46px; margin-bottom: 8px; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 20;
  width: min(448px, calc(100% - 24px)); display: flex; justify-content: space-around; align-items: center;
  padding: 10px 8px; border-radius: 26px;
  background: rgba(30, 28, 27, .72); border: 1px solid var(--line);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.tabbar a { display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 8px; border-radius: 14px; }
.tabbar a .ti { font-size: 20px; filter: grayscale(1) brightness(1.4); }
.tabbar a.active { color: var(--orange); }
.tabbar a.active .ti { filter: none; }
.tabbar .tab-post span {
  width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-2)); box-shadow: 0 8px 20px rgba(255,106,0,.45); margin-top: -26px;
}

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #26221f; border: 1px solid var(--line); padding: 12px 18px; border-radius: 14px; font-size: 14px;
  transition: .25s; z-index: 50; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal { width: min(420px, 100%); padding: 22px; display: grid; gap: 12px; background: #1b1918; }

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .review { grid-template-columns: 1fr; }
  .review .thumb { max-height: 240px; aspect-ratio: auto; height: 220px; }
}
@media (max-width: 360px) {
  .headline { font-size: 28px; }
  .two { grid-template-columns: 1fr; }
  .three { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   Responsive layouts
   phone < 600px · tablet 600–959px · desktop ≥ 960px · large ≥ 1280px
   ========================================================= */
.deskbar { display: none; }
.post-fields { display: grid; gap: 14px; }
.avatar.sm { width: 34px; height: 34px; font-size: 13px; border-width: 1px; }
.home-hero { display: block; }

/* ---------- tablet ---------- */
@media (min-width: 600px) {
  .shell, .shell.wide { max-width: 860px; padding: 24px 28px 120px; }
  .grid, .shell.wide .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .narrow { max-width: 480px; margin: 0 auto; }
  .mid { max-width: 680px; margin: 0 auto; }
  .list { grid-template-columns: repeat(2, 1fr); }
  #apanel.list { grid-template-columns: 1fr; }
  .hero { margin: 0; border-radius: 28px; height: 380px; border: 1px solid var(--line);
    background: radial-gradient(circle at 50% 40%, rgba(255,138,31,.30), rgba(255,255,255,.03) 70%); }
  .hero .back { top: 16px; left: 16px; }
  .detail { margin-top: -50px; margin-left: 16px; margin-right: 16px; }
  .headline { font-size: 40px; }
}

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  .mobile-only { display: none !important; }
  .tabbar { display: none; }
  .shell, .shell.wide { max-width: 1200px; padding: 32px 40px 72px; }

  /* top navigation */
  .deskbar {
    display: block; position: sticky; top: 0; z-index: 30;
    background: rgba(15, 15, 16, 0.78);
    backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--line);
  }
  .deskbar-in { max-width: 1200px; margin: 0 auto; padding: 12px 40px; display: flex; align-items: center; gap: 36px; }
  .deskbar .brand { font-size: 18px; }
  .desknav { display: flex; gap: 6px; flex: 1; }
  .desknav a { padding: 8px 16px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 15px; transition: .2s; }
  .desknav a:hover { color: var(--text); background: var(--glass); }
  .desknav a.active { color: var(--text); background: var(--glass-2); }
  .desk-right { display: flex; align-items: center; gap: 12px; }
  .desk-user { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 999px;
    background: var(--glass); border: 1px solid var(--line); font-weight: 500; font-size: 14px; }
  .desk-user.active, .desk-user:hover { border-color: var(--orange); }

  /* home */
  .home-hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 32px; align-items: center; margin-bottom: 28px; }
  .home-hero .promo { margin: 0; padding: 28px; }
  .home-hero .promo h2 { font-size: 28px; }
  .home-hero .promo img { width: 150px; }
  .home-hero .search { margin-bottom: 0; }
  .hello { font-size: 17px; }
  .headline { font-size: 56px; letter-spacing: -1px; margin-bottom: 26px; }
  .cats { flex-wrap: wrap; overflow: visible; gap: 10px; margin-bottom: 28px; }
  .cat { width: auto; padding: 9px 14px; display: flex; align-items: center; gap: 8px; font-size: 14px; }
  .cat .ci { font-size: 22px; margin: 0; display: inline; }
  .cat:hover { border-color: rgba(255, 138, 31, .5); color: var(--text); }
  .sec h3 { font-size: 22px; }
  .grid, .shell.wide .grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .card { padding: 12px; }
  .card:hover { transform: translateY(-4px); border-color: rgba(255, 138, 31, .45); }
  .card .t { font-size: 15px; }

  /* product page: photo left, details right */
  .detail-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }
  .hero { height: 520px; margin: 0; font-size: 160px; position: sticky; top: 96px; }
  .detail { margin: 0; padding: 30px; }
  .detail h1 { font-size: 30px; }
  .detail .price { font-size: 28px; }
  .detail p { font-size: 15px; }

  /* forms */
  .narrow { max-width: 460px; }
  .mid { max-width: 920px; }
  .post-form { grid-template-columns: 340px 1fr; gap: 28px; align-items: start; padding: 28px; }
  .post-form .drop { min-height: 340px; position: sticky; top: 96px; }
  .post-form .drop img { max-height: 280px; }

  /* lists & admin */
  .list { gap: 16px; }
  #apanel.list { grid-template-columns: 1fr; }
  .review { grid-template-columns: 200px 1fr; padding: 18px; }
  .stat b { font-size: 32px; }

  .toast { bottom: 32px; }
  .splash { margin-top: 24px; }
}

/* ---------- large screens ---------- */
@media (min-width: 1280px) {
  .grid, .shell.wide .grid { grid-template-columns: repeat(5, 1fr); }
  #apanel.list { grid-template-columns: repeat(2, 1fr); }
  .review { grid-template-columns: 160px 1fr; }
}

/* =========================================================
   Photos: post-form manager, card badge, 3D carousel, ad slots
   ========================================================= */
.photo-box { display: grid; gap: 8px; align-content: start; }
.photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.photo {
  position: relative; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: rgba(0,0,0,.25);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.add {
  border: 1.5px dashed var(--line); cursor: pointer; display: grid; place-items: center; align-content: center; gap: 4px;
  color: var(--muted); font-size: 13px; transition: border-color .2s, color .2s;
}
.photo.add:hover { border-color: var(--orange); color: var(--text); }
.photo .cover {
  position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--orange); color: #fff;
}
.photo-x {
  position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.65); color: #fff; font-size: 14px; display: grid; place-items: center;
}
.photo-x:hover { background: var(--red); }

.thumb { position: relative; }
.photo-count {
  position: absolute; right: 8px; bottom: 8px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: rgba(0,0,0,.6); color: #fff; backdrop-filter: blur(6px);
}

.slots { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin-bottom: 14px; border-radius: 16px; }
.slot-bar { display: flex; gap: 6px; }
.slot-bar span { width: 26px; height: 8px; border-radius: 4px; background: var(--glass-2); }
.slot-bar span.on { background: var(--orange); }

.review-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.review-strip img { aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* ---- 3D carousel ---- */
.c3d { position: absolute; inset: 0; perspective: 1100px; overflow: hidden; touch-action: pan-y; user-select: none; outline: none; }
.c3d-stage { position: absolute; inset: 0; transform-style: preserve-3d; }
.c3d-item {
  position: absolute; left: 50%; top: 50%; width: 62%; height: 80%; margin: 0; translate: -50% -50%;
  border-radius: 22px; overflow: hidden; cursor: pointer;
  box-shadow: 0 24px 50px rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.14);
  transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .7s ease;
  backface-visibility: hidden; will-change: transform;
}
.c3d-item.active { cursor: grab; }
.c3d-item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.c3d-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 20; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(20,18,17,.6); color: #fff; font-size: 24px; cursor: pointer;
  backdrop-filter: blur(10px); display: grid; place-items: center;
}
.c3d-nav:hover { border-color: var(--orange); }
.c3d-nav.prev { left: 12px; }
.c3d-nav.next { right: 12px; }
.c3d-dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 20; display: flex; justify-content: center; gap: 8px; }
.c3d-dots button { width: 9px; height: 9px; padding: 0; border-radius: 999px; border: 0; background: rgba(255,255,255,.4); cursor: pointer; transition: width .3s, background .3s; }
.c3d-dots button.on { width: 26px; background: var(--orange); }
.hero .back { z-index: 25; }
/* leave room for the floating card under the photos on phones */
@media (max-width: 599px) { .c3d-dots { bottom: 54px; } .c3d-item { height: 64%; top: 47%; } }
@media (prefers-reduced-motion: reduce) { .c3d-item { transition: none; } }

@media (min-width: 960px) {
  .photo-box { position: sticky; top: 96px; }
  .c3d-item { width: 66%; height: 78%; }
}

/* =========================================================
   Favourites, filters, sold, seller profile, reports, offline
   ========================================================= */
.fav {
  position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; padding: 0;
  display: grid; place-items: center; cursor: pointer; font-size: 17px; line-height: 1;
  background: rgba(15, 15, 16, .62); border: 1px solid var(--line); color: #fff;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform .15s, color .15s, border-color .15s;
}
.fav:hover { transform: scale(1.08); border-color: var(--orange); }
.fav.on { color: #ff5a7a; border-color: rgba(255, 90, 122, .6); }
.fav:focus-visible, .link-btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.hero-actions { position: absolute; top: 16px; right: 16px; z-index: 25; display: flex; gap: 10px; }
.hero-actions .icon-btn, .hero .back { background: rgba(15, 15, 16, .62); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-actions .fav { position: static; width: 44px; height: 44px; font-size: 19px; }

.sold-tag {
  position: absolute; left: 8px; top: 8px; z-index: 2; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: #26221f; color: var(--amber); border: 1px solid rgba(255, 192, 77, .45);
}
.card.is-sold .thumb img, .card.is-sold .thumb > span[aria-hidden] { opacity: .45; filter: grayscale(.6); }
.card.is-sold .price { color: var(--muted); text-decoration: line-through; }
.pill.sold { background: rgba(255, 192, 77, .16); color: var(--amber); }
.pill.expired { background: rgba(255, 255, 255, .1); color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 18px; }
.filters label { flex: 1 1 calc(50% - 5px); min-width: 0; }
.filters .f-sort { flex-basis: 100%; }
.filters .input { padding: 10px 14px; }
.filters .btn { height: 44px; }
.link-btn { background: none; border: 0; padding: 8px 4px; cursor: pointer; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }

.seller-link { color: var(--orange); font-weight: 600; }
.seller-link:hover { text-decoration: underline; }
.seller { display: flex; align-items: center; gap: 16px; padding: 18px; margin-bottom: 20px; }
.seller .avatar { width: 64px; height: 64px; font-size: 22px; flex: 0 0 auto; }
.seller h2 { font-size: 20px; margin-bottom: 4px; }

.safety { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.cta { flex-wrap: wrap; }
.slots { flex-wrap: wrap; }
.slot-views { margin-left: auto; }
.stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

.offline {
  position: sticky; top: 0; z-index: 35; text-align: center; padding: 8px 14px; font-size: 13px;
  background: #3a2a12; color: var(--amber); border-bottom: 1px solid rgba(255, 192, 77, .35);
}
.tabbar a { padding: 4px 6px; }

@media (min-width: 600px) {
  .filters label { flex: 0 0 140px; }
  .filters .f-sort { flex-basis: 220px; }
}
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- "SALE" page-flip corner (top right) ---------- */
.sale-corner {
  --s: 86px;
  position: fixed; top: 0; right: 0; z-index: 60;
  width: var(--s); height: var(--s);
  filter: drop-shadow(-2px 3px 4px rgba(0, 0, 0, .55));
  transition: width .35s ease, height .35s ease;
}
.sale-corner:hover { --s: 112px; }
/* What the peel reveals: the triangle above the fold line */
.sale-under {
  position: absolute; inset: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  background: linear-gradient(225deg, #ff3b2f, var(--orange-2) 55%, var(--orange));
}
.sale-under span {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-18%, -82%) rotate(45deg);
  font-weight: 700; letter-spacing: 2px; color: #fff;
  font-size: calc(var(--s) * .19);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  transition: font-size .35s ease;
}
/* The folded-over page flap, mirrored across the fold */
.sale-flap {
  position: absolute; inset: 0;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  background: linear-gradient(45deg, #f4efe8 0%, #e2dbd2 45%, #b9b0a6 50%, #8e857c 52%, transparent 52.5%);
}
/* Keep the right-hand header buttons (account, log in, Post an Ad) clear of the corner */
@media (max-width: 959px) { .topbar > :last-child { margin-right: 62px; } }
@media (max-width: 560px) {
  .sale-corner { --s: 70px; }
  .sale-corner:hover { --s: 90px; }
  .topbar > :last-child { margin-right: 52px; }
}
@media (max-width: 1260px) { .deskbar .desk-right { margin-right: 40px; } }
@media (prefers-reduced-motion: reduce) { .sale-corner, .sale-under span { transition: none; } }

/* ---------- admin: members ---------- */
.member-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.member-tools .input { flex: 1; min-width: 200px; max-width: 360px; }
table.users tr.is-blocked td { opacity: .7; }
table.users .row-actions { white-space: nowrap; display: flex; gap: 6px; justify-content: flex-end; }
.member-modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.mm-head { display: flex; align-items: center; gap: 12px; }
.mm-head h3 { margin: 0 0 4px; }
.mm-avatar {
  width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
}
.mm-x { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); color: var(--text); font-size: 20px; cursor: pointer; }
.mm-label { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-top: 6px; }
.mm-form { padding: 0; gap: 10px; }
.mm-form .input[readonly] { opacity: .9; cursor: text; }
.mm-ads { display: grid; gap: 6px; }
.mm-ad { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); font-size: 13px; }
.mm-ad .mm-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-ad > span:last-child { white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.mm-reset { display: grid; gap: 8px; }
.mm-row { display: flex; gap: 8px; align-items: center; }
.mm-row .input { flex: 1; min-width: 0; }
.mm-end { justify-content: flex-end; }
.mm-newpw { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(60,207,122,.12); border: 1px solid rgba(60,207,122,.35); }
.mm-newpw b { font-family: ui-monospace, Consolas, monospace; font-size: 15px; letter-spacing: .5px; user-select: all; }

/* ---------- terms ---------- */
.terms { padding: 22px; line-height: 1.6; font-size: 14.5px; }
.terms h3 { margin: 22px 0 6px; font-size: 16px; }
.terms ul { margin: 6px 0; padding-left: 20px; }
.terms li { margin: 4px 0; }
.terms-alert { margin: 14px 0; padding: 4px 16px 10px; border-radius: 16px; background: rgba(255,192,77,.10); border: 1px solid rgba(255,192,77,.35); }
.terms-alert h3 { margin-top: 12px; }
.terms-red { background: rgba(255,90,90,.10); border-color: rgba(255,90,90,.4); }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--orange); }
.check a, .page-foot a { color: var(--orange); }
.page-foot { text-align: center; margin: 24px 0 8px; }

.terms-modal { width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.terms-modal .terms { padding: 4px 0; background: none; border: 0; box-shadow: none; }

/* Pop-ups sit above the SALE corner; messages sit above pop-ups */
.modal-bg { z-index: 70; }
.toast { z-index: 80; }

/* ---------- video adverts ---------- */
.video-ad { display: grid; gap: 10px; margin: 6px 0 14px; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.video-frame.tall { aspect-ratio: 9 / 16; max-width: 340px; margin: 0 auto; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-badge {
  position: absolute; left: 8px; bottom: 8px; z-index: 2; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  background: rgba(0,0,0,.65); color: #fff; backdrop-filter: blur(6px);
}
