/* =====================================================================
   askJBoss 2.56 — new home: Town Pulse, scope dial, neighbour check.
   Loaded after askjboss.css (and before askjboss-dark.css).
   ===================================================================== */
:root { --x-cream: #F3F0E8; --x-ink: #10201A; --x-ink-2: #1E332B; --x-ink-3: #3A5248; --x-paper: #F2F4F1; --x-line: #E1E5DF; --x-gold: #F2B52B; --x-mint: #7BE0B0; --x-sage: #A9BDB3; }

/* ---------- New look, every page: warm paper background, soft warm lines, rounder cards ---------- */
:root { --bg: #F2F4F1; --line: #E1E5DF; --soft: #EEF1EC; --soft-2: #F5F7F4; --radius: 22px; }
body { background: var(--bg); }
.card, .post, .side-card, .svc-card { border: 1px solid var(--line); box-shadow: none; }
.post { border-radius: 22px; }
.post-title { font-family: var(--display); letter-spacing: -0.015em; }
.topbar { background: rgba(255, 255, 255, .94); }
.btn-dark { background: var(--x-ink); }

/* Wallet balance in the top bar */
.wallet-pill { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--x-gold); color: var(--x-ink); font-weight: 700; font-size: 14px; white-space: nowrap; }
.wallet-pill:hover { background: #F6C552; color: var(--x-ink); }

/* Left menu on big screens (home) */
.hx-left { display: none; }
@media (min-width: 1360px) {
  .home.hx { max-width: 1360px; grid-template-columns: 210px minmax(0, 700px) 320px; gap: 28px; }
  .hx-left { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }
  body:has(.hx-left) .topnav-row { display: none; }
  body:has(.hx-left) .topbar-inner { max-width: 1360px; }
  .hx .side-places { display: none; }
}
.hx-left-nav { display: flex; flex-direction: column; gap: 2px; }
.hx-left-nav a { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 14px; color: var(--ink); font-weight: 500; font-size: 15px; }
.hx-left-nav a span { width: 34px; height: 34px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; color: var(--x-ink); }
.hx-left-nav a:hover { background: var(--card); color: var(--ink); }
.hx-left-nav a.on { background: var(--card); font-weight: 700; }
.hx-left-nav a.on span { background: var(--green-soft); color: var(--green); }
.hx-left-places { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.hx-left-places h2 { font-family: var(--body); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hx-left-places a { display: flex; justify-content: space-between; color: var(--ink); font-size: 14px; }
.hx-left-places a b { color: var(--green); font-size: 12px; }
.hx-left-places .hx-left-add { color: var(--green); font-weight: 700; }
.hx { max-width: 1180px; grid-template-columns: minmax(0, 700px) 320px; gap: 36px; }
.hx .home-main { gap: 18px; }

/* ---------- Greeting ---------- */
.hx-hero h1, .hx-hello h1 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; margin: 0; }
.hx-hero h1 { font-size: clamp(32px, 4.6vw, 48px); max-width: 640px; }
.hx-hero p { color: var(--muted); font-size: 17px; margin: 12px 0 18px; max-width: 560px; }
.hx-hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.hx-hello h1 { font-size: clamp(28px, 3.6vw, 40px); }
.hx-hello p { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.hx-place { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 1.5px solid var(--x-ink); border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--x-ink); white-space: nowrap; }
.hx-place:hover { background: var(--x-ink); color: var(--x-paper); }

/* ---------- Scope dial ---------- */
.hx-scope { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--x-line); border-radius: 22px; padding: 10px 12px; }
.hx-scope-lbl { font-weight: 700; font-size: 14px; padding-left: 4px; white-space: nowrap; }
.hx-scope-steps { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.hx-scope-steps::-webkit-scrollbar { display: none; }
.hx-scope-steps a { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--x-paper); color: var(--x-ink); font-weight: 700; font-size: 14px; }
.hx-scope-steps a small { font-weight: 500; font-size: 12px; color: var(--muted); }
.hx-scope-steps a.on { background: var(--x-ink); color: var(--x-paper); }
.hx-scope-steps a.on small { color: var(--x-gold); }

/* ---------- Town Pulse ---------- */
.pulse { background: var(--x-ink); color: var(--x-cream); border-radius: 26px; padding: 20px; }
.pulse-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; }
.pulse-head h2 { font-size: 22px; color: var(--x-cream); }
.pulse-head h2 span { color: var(--x-gold); }
.pulse-sub { font-size: 13px; color: var(--x-sage); }
.pulse-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
@media (max-width: 1100px) and (min-width: 641px) { .pulse-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pulse-tile { position: relative; display: flex; flex-direction: column; border-radius: 18px; }
.pulse-btn { display: flex; flex-direction: column; gap: 3px; width: 100%; height: 100%; min-height: 118px; text-align: left; background: var(--x-ink-2); border: 0; border-radius: 18px; padding: 14px; color: var(--x-cream); transition: background .15s; }
a.pulse-btn:hover, button.pulse-btn:hover { background: #26402F; color: var(--x-cream); }
.pulse-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--x-sage); }
.pulse-v { font-family: var(--display); font-size: 22px; font-weight: 800; line-height: 1.15; color: var(--x-cream); }
.pulse-v.good { color: var(--x-mint); }
.pulse-v.bad { color: #FF9C7A; }
.pulse-v.warn { color: var(--x-gold); }
.pulse-s { font-size: 12px; color: var(--x-sage); }
.pulse-s.up { color: var(--x-gold); }
.pulse-bars { display: flex; gap: 2px; align-items: flex-end; height: 22px; margin: 4px 0 2px; }
.pulse-bars i { flex: 1; border-radius: 2px; height: 30%; background: var(--x-ink-3); }
.pulse-bars i.on { height: 100%; background: var(--x-mint); }
.pulse-bars i.off { height: 45%; background: #9C4A33; }
.pulse-add { background: var(--x-gold); color: var(--x-ink); padding: 14px; min-height: 118px; gap: 4px; }
.pulse-add:hover { background: #F6C552; color: var(--x-ink); }
.pulse-add .pulse-k, .pulse-add .pulse-s { color: var(--x-ink); }
.pulse-add b { font-family: var(--display); font-size: 19px; line-height: 1.15; }
.pulse-pop { position: absolute; z-index: 20; left: 0; top: calc(100% + 8px); width: max(100%, 260px); background: var(--card); color: var(--ink); border-radius: 16px; padding: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); display: flex; flex-direction: column; gap: 10px; }
.pulse-pop div { display: flex; gap: 6px; flex-wrap: wrap; }
.pulse-pop .btn { height: 40px; }
.pulse-empty { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.pulse-empty h2 { color: var(--x-cream); font-size: 22px; }
.pulse-empty p { margin: 6px 0 0; color: var(--x-sage); max-width: 460px; }

/* ---------- Composer ---------- */
.hx-compose { background: var(--card); border: 1px solid var(--x-line); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.hx-compose .qp { background: transparent; border: 0; padding: 0; box-shadow: none; }
.hx-compose .qp-area { background: var(--x-paper); border-radius: 16px; }
.hx-types { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--x-line); padding-top: 12px; }
.hx-type { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--x-line); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600; }
.hx-type:hover { border-color: var(--x-ink); color: var(--ink); }
.hx-type i { width: 8px; height: 8px; border-radius: 50%; }
.dot-g { background: #0B6E4F; } .dot-b { background: #2C5D8F; } .dot-r { background: #B4360C; } .dot-y { background: var(--x-gold); }
.dot-p { background: #6B3FA0; } .dot-o { background: #B4531F; } .dot-k { background: var(--x-ink); }

/* ---------- Feed bar ---------- */
.hx-feedbar { flex-wrap: wrap; row-gap: 8px; }
.hx-feedbar .seg { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.hx-feedbar .seg::-webkit-scrollbar { display: none; }
.hx-feedbar .seg a { white-space: nowrap; }
.hx-filters { display: flex; gap: 8px; margin-left: auto; }

/* ---------- Cards ---------- */
.hx .post { border: 1px solid var(--x-line); border-radius: 22px; box-shadow: none; }
.hx .post-title { font-family: var(--display); letter-spacing: -0.015em; }

/* Neighbour check (all pages where a card shows) */
.ncheck { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--x-paper); border-radius: 14px; padding: 10px 12px; }
.ncheck-info { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 5px; }
.ncheck-info b { font-size: 13px; }
.ncheck-bar { height: 7px; border-radius: 999px; background: var(--x-line); overflow: hidden; display: flex; }
.ncheck-bar i { background: var(--green); transition: width .3s; }
.ncheck-line { font-size: 12px; color: var(--muted); }
.ncheck-btns { display: flex; gap: 6px; }
.ncheck-btns button { height: 38px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 13px; background: var(--card); }
.ncheck-yes { color: var(--green); border: 1.5px solid var(--green); }
.ncheck-yes.on { background: var(--green); color: #fff; }
.ncheck-no { color: var(--ink); border: 1px solid #C8CFC9; }
.ncheck-no.on { background: var(--x-ink); color: #fff; border-color: var(--x-ink); }

/* Questions: best answer + quick answer */
.q-bar:has(+ .q-quick) .btn { display: none; }
.q-best { background: var(--x-paper); border-radius: 14px; padding: 10px 14px; font-size: 14px; }
.q-best b { font-size: 13px; color: var(--green-text); }
.q-best p { margin: 4px 0 0; line-height: 1.5; }
.q-quick { width: 100%; height: 44px; border-radius: 999px; border: 1px solid var(--x-line); background: var(--card); color: var(--muted); text-align: left; padding: 0 16px; font-size: 14px; }
.q-quick:hover { border-color: var(--x-ink); color: var(--ink); }

/* ---------- Sidebar ---------- */
.hx + .home-side, .hx .home-side { gap: 18px; }
.hx .home-side > section, .hx .home-side > div:not(.side-sticky) > section { border-radius: 22px; }

/* ---------- Phones ---------- */
@media (max-width: 980px) {
  .hx { grid-template-columns: minmax(0, 700px); }
}
@media (max-width: 640px) {
  .hx-hello { align-items: flex-start; }
  .hx-scope { padding: 8px; gap: 8px; }
  .hx-scope-lbl { display: none; }
  .pulse { border-radius: 22px; padding: 16px; margin: 0 -4px; }
  .pulse-grid { display: flex; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; scroll-snap-type: x mandatory; }
  .pulse-grid::-webkit-scrollbar { display: none; }
  .pulse-tile, .pulse-grid > a { flex: none; width: 150px; scroll-snap-align: start; }
  .pulse-pop { position: fixed; left: 12px; right: 12px; top: auto; bottom: 90px; width: auto; }
  .hx-filters { margin-left: 0; }
  .ncheck-btns { width: 100%; }
  .ncheck-btns button { flex: 1; }
}

/* ---------- Night mode ---------- */
html[data-theme="dark"] { --x-paper: #18211D; --x-line: #2A3631; }
html[data-theme="dark"] body:has(.hx) { background: #0F1512; }
html[data-theme="dark"] .wallet-pill { background: var(--x-gold); color: #10201A; }
html[data-theme="dark"] .hx-left-nav a, html[data-theme="dark"] .hx-left-places a { color: #E6EEE9; }
html[data-theme="dark"] .hx-left-nav a span { background: #1B2621; color: #E6EEE9; }
html[data-theme="dark"] .hx-left-nav a:hover, html[data-theme="dark"] .hx-left-nav a.on, html[data-theme="dark"] .hx-left-places { background: #151D19; border-color: #2A3631; }
html[data-theme="dark"] .pulse { background: #0B1210; border: 1px solid #22302A; }
html[data-theme="dark"] .pulse h2, html[data-theme="dark"] .pulse-v { color: var(--x-cream); }
html[data-theme="dark"] .pulse-v.good { color: var(--x-mint); } html[data-theme="dark"] .pulse-v.bad { color: #FF9C7A; } html[data-theme="dark"] .pulse-v.warn { color: var(--x-gold); }
html[data-theme="dark"] .pulse-head h2 span { color: var(--x-gold); }
html[data-theme="dark"] .pulse-add, html[data-theme="dark"] .pulse-add b, html[data-theme="dark"] .pulse-add span { color: var(--x-ink); }
html[data-theme="dark"] .hx-place { border-color: #C9D6CF; color: #E6EEE9; }
html[data-theme="dark"] .hx-scope-steps a { color: #E6EEE9; }
html[data-theme="dark"] .hx-scope-steps a.on { background: #E6EEE9; color: #0F1512; }
html[data-theme="dark"] .hx-scope-steps a.on small { color: #0B6E4F; }
html[data-theme="dark"] .ncheck-no { color: #E6EEE9; border-color: #3A4A43; }
html[data-theme="dark"] .ncheck-yes { color: #7BE0B0; border-color: #7BE0B0; }
html[data-theme="dark"] .ncheck-yes.on { background: #0B6E4F; color: #fff; border-color: #0B6E4F; }
html[data-theme="dark"] .hx-type { color: #E6EEE9; }

/* ---------- Compact composer on the home page (one line until you start typing) ---------- */
.qp--compact .qp-top { align-items: center; }
.qp--compact .qp-area { background: var(--x-paper); }
.qp--compact .qp-area textarea { min-height: 52px; padding: 14px 18px; font-size: 16px; }
.qp-post-inline { flex: none; height: 52px; padding: 0 22px; border-radius: 16px; border: 0; background: var(--green); color: #fff; font-weight: 700; font-size: 15px; }
.qp-post-inline:hover { background: var(--green-dark); }
.qp--compact:not(.is-active) .qp-bar, .qp--compact:not(.is-active) .qp-hint { display: none; }
.qp--compact.is-active .qp-post-inline { display: none; }
.qp--compact .qp-post { background: var(--green); border-color: var(--green); }
.hx-compose .hx-types { border-top: 0; padding-top: 0; }
.hx-compose { gap: 14px; }

/* ---------- Post type labels as coloured pills (home feed) ---------- */
.hx .type-dot { display: inline-flex; align-items: center; gap: 0; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--x-paper) !important; color: var(--x-ink); }
.hx .type-dot::before { display: none; }
.hx .type-dot.t-question { background: #FFF1D6 !important; color: #8A4B00; }
.hx .type-dot.t-poll, .hx .type-dot.t-event { background: #F0E8FA !important; color: #5B2F8F; }
.hx .type-dot.t-news, .hx .type-dot.t-community, .hx .type-dot.t-announcement { background: #E3F1EA !important; color: #0B5A40; }
.hx .type-dot.t-traffic, .hx .type-dot.t-safety { background: #FDE8E0 !important; color: #9A3412; }
.hx .type-dot.t-sale, .hx .type-dot.t-property, .hx .type-dot.t-business, .hx .type-dot.t-service { background: #FFF4CC !important; color: #6B4A00; }
.hx .type-dot.t-job, .hx .type-dot.t-opportunity { background: #E4EEF8 !important; color: #1E4A75; }
.hx .type-dot.t-photo, .hx .type-dot.t-video, .hx .type-dot.t-audio { background: #E9F0F6 !important; color: #24445F; }
html[data-theme="dark"] .hx .type-dot { background: #1E2A25 !important; color: #E6EEE9 !important; }
html[data-theme="dark"] .qp-post-inline { background: #0B6E4F; color: #fff; }
.qp--compact:not(.is-active) .qp-area textarea { height: 52px !important; min-height: 52px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 640px) { .qp-post-inline { padding: 0 16px; } .hx-types { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; } .hx-types::-webkit-scrollbar { display: none; } .hx-type { flex: none; } }

/* ---------- Post pop-up (home) ---------- */
html.pm-lock { overflow: hidden; }
.pm { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 16px; }
.pm-back { position: absolute; inset: 0; background: rgba(16, 32, 26, .55); }
.pm-panel { position: relative; width: 100%; max-width: 760px; max-height: 92vh; display: flex; flex-direction: column; background: var(--card); border-radius: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); overflow: hidden; }
.pm-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.pm-head h2 { font-size: 22px; }
.pm-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--soft); font-size: 16px; color: var(--ink); }
.pm-body { overflow-y: auto; padding: 18px 20px 24px; overscroll-behavior: contain; }
.pm-form { gap: 16px; }
.type-grid--row { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.type-grid--row .type-opt span { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; min-height: 68px; padding: 8px 6px; font-size: 12px; line-height: 1.2; border-radius: 12px; }
.type-grid--row .type-opt input:checked + span { padding: 7px 5px; }
.type-grid--row .to-ic { font-size: 20px; font-style: normal; line-height: 1; }
@media (max-width: 640px) { .type-grid--row { grid-template-columns: repeat(4, minmax(0, 1fr)); } .type-grid--row .type-opt span { min-height: 62px; font-size: 11px; } }
.hx-type span { font-size: 15px; line-height: 1; }
@media (max-width: 640px) {
  .pm { padding: 0; align-items: stretch; }
  .pm-panel { max-height: none; height: 100%; border-radius: 0; }
}
html[data-theme="dark"] .pm-panel { background: #151D19; }
/* The home page has its own post buttons + pop-up, so the sidebar "Post something" box is not repeated there */
.hx .side-post { display: none; }
.hx-type-more { background: var(--x-ink); color: #fff; border-color: var(--x-ink); }
.hx-type-more:hover { color: #fff; background: #1E332B; }
html[data-theme="dark"] .hx-type-more { background: #E6EEE9; color: #0F1512; }
.pm-form fieldset { min-width: 0; max-width: 100%; }

/* =====================================================================
   Marketplace
   ===================================================================== */
.mk { max-width: 1240px; margin: 0 auto; padding: 24px 20px 100px; display: flex; flex-direction: column; gap: 18px; }
.mk-hero { background: var(--x-ink); color: var(--x-cream); border-radius: 28px; padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; position: relative; overflow: hidden; }
.mk-hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 181, 43, .25), transparent 70%); pointer-events: none; }
.mk-hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; color: var(--x-cream); }
.mk-hero p { margin: 6px 0 0; color: var(--x-sage); font-size: 16px; }
.mk-search { display: flex; gap: 8px; background: #fff; border-radius: 18px; padding: 6px; position: relative; z-index: 1; }
.mk-q, .mk-where { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 0 12px; height: 48px; }
.mk-q { flex: 1; min-width: 0; }
.mk-q input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 16px; color: var(--ink); background: transparent; }
.mk-where { border-left: 1px solid var(--line); }
.mk-where select { border: 0; outline: none; font: inherit; font-size: 15px; color: var(--ink); background: transparent; max-width: 170px; }
.mk-go { height: 48px; padding: 0 22px; border-radius: 14px; border: 0; background: var(--green); color: #fff; font-weight: 700; font-size: 15px; }
.mk-go:hover { background: var(--green-dark); }
.mk-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.mk-sell { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--x-gold); color: var(--x-ink); font-weight: 800; font-size: 15px; }
.mk-sell:hover { background: #F6C552; color: var(--x-ink); }
.mk-biz { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--x-ink-3); color: var(--x-cream); font-weight: 600; font-size: 14px; }
.mk-biz:hover { background: var(--x-ink-2); color: var(--x-cream); }

.mk-cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 6px; }
.mk-cats::-webkit-scrollbar { display: none; }
.mk-cat { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; }
.mk-cat span { font-size: 17px; line-height: 1; }
.mk-cat small { font-size: 12px; color: var(--muted); font-weight: 500; }
.mk-cat:hover { border-color: var(--x-ink); color: var(--ink); }
.mk-cat.on { background: var(--x-ink); border-color: var(--x-ink); color: #fff; }
.mk-cat.on small { color: var(--x-gold); }

.mk-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.mk-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mk-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mk-count { font-size: 15px; color: var(--muted); }
.mk-count b { color: var(--ink); font-size: 17px; }
.mk-clear { font-weight: 700; margin-left: 4px; }
.mk-sort { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.mk-sort a { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border-radius: 999px; color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.mk-sort a.on { background: var(--x-ink); color: #fff; }
.mk-alert { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #FFF6DC; border: 1px solid #F3DE9C; border-radius: 16px; padding: 10px 14px; font-size: 14px; color: #5C4300; }

/* Cards */
.mk-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.mk-grid .product-card { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--card); transition: transform .15s, box-shadow .15s; box-shadow: none; }
.mk-grid .product-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 32, 26, .1); }
.mk-grid .product-img { aspect-ratio: 1 / 1; position: relative; }
.mk-grid .product-img img { width: 100%; height: 100%; object-fit: cover; }
.mk-grid .product-body { padding: 12px 14px 14px; gap: 4px; }
.mk-grid .price { font-family: var(--display); font-size: 20px; font-weight: 800; color: var(--x-ink); }
.mk-grid .price small { font-family: var(--body); font-size: 12px; font-weight: 600; color: var(--green); }
.mk-grid .product-title { font-weight: 600; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-grid .is-top { border-color: var(--x-gold); box-shadow: 0 0 0 2px rgba(242, 181, 43, .35); }

.mk-empty { background: var(--card); border: 1px dashed var(--line); border-radius: 22px; padding: 40px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mk-empty > span { font-size: 40px; }

.mk-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }
.mk-sellcard { background: var(--green); color: #fff; border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.mk-sellcard b { font-family: var(--display); font-size: 21px; }
.mk-sellcard p { margin: 0 0 6px; color: #D4EDE1; font-size: 14px; line-height: 1.5; }
.mk-sidecard { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.mk-sidecard b { font-size: 15px; }
.mk-sidecard p { margin: 0 0 4px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.mk-safety ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; line-height: 1.7; }

@media (max-width: 980px) {
  .mk-body { grid-template-columns: minmax(0, 1fr); }
  .mk-side { position: static; }
}
@media (max-width: 640px) {
  .mk { padding: 12px 12px 110px; gap: 14px; }
  .mk-hero { padding: 20px 16px; border-radius: 22px; }
  .mk-search { flex-wrap: wrap; }
  .mk-q { flex-basis: 100%; }
  .mk-where { border-left: 0; border-top: 1px solid var(--line); flex: 1 1 0; min-width: 0; }
  .mk-where select { max-width: none; width: 100%; }
  .mk-go { margin-top: 4px; }
  .mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mk-grid .price { font-size: 17px; }
  .mk-grid .product-title { font-size: 14px; }
  .mk-cats { margin-right: -12px; }
}
html[data-theme="dark"] .mk-search { background: #1B2621; }
html[data-theme="dark"] .mk-q input, html[data-theme="dark"] .mk-where select { color: #E6EEE9; }
html[data-theme="dark"] .mk-hero { background: #0B1210; border: 1px solid #22302A; }
html[data-theme="dark"] .mk-hero h1 { color: var(--x-cream); }
html[data-theme="dark"] .mk-cat, html[data-theme="dark"] .mk-sort a { color: #E6EEE9; }
html[data-theme="dark"] .mk-cat.on, html[data-theme="dark"] .mk-sort a.on { background: #E6EEE9; color: #0F1512; }
html[data-theme="dark"] .mk-grid .price { color: #E6EEE9; }
html[data-theme="dark"] .mk-alert { background: #2E2614; color: #F3D48A; border-color: #4A3D1C; }

/* ---------- Our own long articles ---------- */
.article-thumb { display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--soft); }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.article-body figure.art-fig { margin: 18px 0; }
.article-body figure.art-fig img { width: 100%; max-height: 520px; object-fit: cover; object-position: center 20%; border-radius: 16px; background: var(--soft); }
.article-body figure.art-fig.art-fig--small img { max-width: 360px; max-height: none; object-fit: contain; margin: 0 auto; }
.article-body figure.art-fig figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; text-align: center; }
.article-body .facts-table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 15px; }
.article-body .facts-table th, .article-body .facts-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article-body .facts-table th { width: 38%; color: var(--muted); font-weight: 600; }
.article-body .art-note { background: var(--soft-2); border-radius: 14px; padding: 12px 16px; font-size: 14px; color: var(--ink-2); }
.article-body .art-qs { background: #FFF6DC; border-radius: 16px; padding: 14px 18px; }
.article-body .art-qs h2 { margin-top: 0; }
html[data-theme="dark"] .article-body .art-qs { background: #2E2614; color: #F3D48A; }
html[data-theme="dark"] .article-body { color: #E6EEE9; }

/* General live chat on the home page (compact) */
.live--compact { margin: 0; }
.live--compact .live-feed { height: 260px; }
.live--compact .live-emoji-row { display: none; }
.live--compact .live-head h3 { font-size: 16px; }
.live-login { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; }
.live-login .muted { flex-basis: 100%; }
/* Biography post → famous person's profile */
.famous-link { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 12px 16px; margin-bottom: 12px; border-radius: 16px; background: #10201A; color: #E6EEE9 !important; text-decoration: none; }
.famous-link span { font-size: 13px; color: #A9BDB3; } .famous-link b { color: #F2B52B; font-size: 14px; }

/* Hashtag suggestions in the post box */
.qp { position: relative; }
.qp-tagdrop { position: absolute; z-index: 30; left: 52px; right: 12px; margin-top: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(15, 26, 20, .14); padding: 6px; display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; }
.qp-tagdrop button { text-align: left; border: 0; background: none; font: inherit; font-weight: 700; padding: 9px 12px; border-radius: 10px; color: var(--green-text); cursor: pointer; }
.qp-tagdrop button.on, .qp-tagdrop button:hover { background: var(--green-soft); }
.qp-taghints { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 2px; font-size: 13px; }
.qp-taghints span { color: var(--muted); font-weight: 600; }
.qp-taghints button { border: 0; background: var(--green-soft); color: var(--green-text); font: inherit; font-weight: 700; font-size: 13px; padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.qp-taghints button:hover { background: #CDE9DB; }
html[data-theme="dark"] .qp-tagdrop { background: var(--card); border-color: var(--line); }

/* ===== Floating live chat (partials.live-float) ===== */
.lchat { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 64; }
@media (min-width: 1000px) { .lchat { right: 24px; bottom: 24px; } }
.lchat-fab { position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; background: #0B6E4F; color: #fff; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 10px 28px rgba(11, 110, 79, .35), 0 2px 6px rgba(0, 0, 0, .15); transition: transform .15s ease; }
.lchat-fab:hover { transform: scale(1.05); }
.lchat-fab:focus-visible { outline: 3px solid #F2B52B; outline-offset: 3px; }
.lchat.is-open .lchat-fab { background: #10201A; }
.lchat-live { position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); background: #E0362C; color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 999px; box-shadow: 0 0 0 2px #fff; }
.lchat-badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #F2B52B; color: #10201A; font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; animation: lchat-pop .3s ease; }
@keyframes lchat-pop { from { transform: scale(.4); } to { transform: scale(1); } }
.lchat-peek { position: absolute; right: 70px; bottom: 8px; width: max-content; max-width: min(260px, calc(100vw - 110px)); background: #fff; color: #10201A; border-radius: 16px 16px 4px 16px; padding: 9px 13px; font-size: 13px; line-height: 1.35; box-shadow: 0 10px 28px rgba(15, 26, 20, .18); cursor: pointer; }
.lchat-panel { position: absolute; right: 0; bottom: 74px; width: min(380px, calc(100vw - 32px)); height: min(540px, calc(100vh - 190px)); background: #fff; border-radius: 22px; box-shadow: 0 18px 50px rgba(15, 26, 20, .28); display: flex; flex-direction: column; overflow: hidden; }
.lchat-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 16px; background: #10201A; color: #fff; }
.lchat-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lchat-head b { font-size: 15px; }
.lchat-head small { font-size: 12px; color: #A9BDB3; }
.lchat-icon { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lchat-icon:hover { background: rgba(255, 255, 255, .2); }
.lchat-feed { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 4px; background: #F5F6F3; }
.lchat-empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }
.lchat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.lchat-form input { flex: 1; min-width: 0; height: 44px; border-radius: 999px; border: 1px solid var(--line); padding: 0 16px; font: inherit; font-size: 16px; background: #F5F6F3; }
.lchat-form button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #0B6E4F; color: #fff; display: grid; place-items: center; cursor: pointer; }
.lchat-form button:disabled { opacity: .45; cursor: default; }
.lchat-err, .lchat-note { margin: 0; padding: 0 14px 10px; font-size: 13px; color: var(--red); }
.lchat-note { color: var(--muted); }
.lchat-join { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.lchat-join small { flex-basis: 100%; color: var(--muted); font-size: 12px; }
/* phones: the open chat takes most of the screen, above the bottom menu */
@media (max-width: 640px) {
  .lchat-panel { position: fixed; left: 8px; right: 8px; width: auto; bottom: calc(160px + env(safe-area-inset-bottom)); height: auto; top: calc(70px + env(safe-area-inset-top)); }
}
/* keep the other floating buttons clear of it */
body:has(.lchat) .to-top { bottom: calc(160px + env(safe-area-inset-bottom)); }
@media (min-width: 1000px) { body:has(.lchat) .to-top { bottom: 96px; right: 31px; } }
body:has(.lchat) .earn-pop { bottom: calc(156px + env(safe-area-inset-bottom)); }
@media (min-width: 1000px) { body:has(.lchat) .earn-pop { bottom: 96px; } }
html[data-theme="dark"] .lchat-panel, html[data-theme="dark"] .lchat-form, html[data-theme="dark"] .lchat-peek { background: var(--card); color: var(--ink); }
html[data-theme="dark"] .lchat-feed { background: var(--bg); }
html[data-theme="dark"] .lchat-form input { background: var(--soft); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .lchat-live, html[data-theme="dark"] .lchat-badge { box-shadow: 0 0 0 2px var(--bg); }

/* ---- Guide articles: icon cards, tip boxes, steps (content packs) ---- */
.article-body .ab-lead { font-size: 1.08em; }
.article-body figure.ab-cover img { aspect-ratio: 1200/630; max-height: none; object-fit: cover; }
.article-body .ab-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 14px 0 20px; }
.article-body .ab-card { display: flex; gap: 12px; align-items: flex-start; background: var(--card, #fff); border: 1px solid var(--line, #e6ebe8); border-radius: 16px; padding: 14px; }
.article-body .ab-card b { display: block; font-size: 15px; line-height: 1.3; margin-bottom: 4px; }
.article-body .ab-card p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: var(--ink-2, #3a4a43); }
.article-body .ab-ico { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; line-height: 1; }
.article-body .ab-i0 { background: #E7F6EF; } .article-body .ab-i1 { background: #FFF4D9; } .article-body .ab-i2 { background: #E8F0FE; }
.article-body .ab-i3 { background: #FDECEF; } .article-body .ab-i4 { background: #F1EAFE; } .article-body .ab-i5 { background: #E3F7F7; }
.article-body .ab-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--soft, #f1f4f2); color: var(--ink-2, #3a4a43); margin: 0 6px 4px 0; }
.article-body .ab-c-g { background: #E7F6EF; color: #0B6E4F; } .article-body .ab-c-y { background: #FFF4D9; color: #8A5A00; } .article-body .ab-c-o { background: #FDE8DD; color: #A2400F; }
.article-body .ab-box { display: flex; gap: 12px; border-radius: 16px; padding: 14px 16px; margin: 16px 0; border: 1px solid transparent; }
.article-body .ab-box b { display: block; margin-bottom: 2px; }
.article-body .ab-box p { margin: 0; font-size: 15px; line-height: 1.55; }
.article-body .ab-bi { font-size: 22px; line-height: 1.2; }
.article-body .ab-tip { background: #FFF8E6; border-color: #F6E1A6; }
.article-body .ab-warn { background: #FDEEEE; border-color: #F5C9C9; }
.article-body .ab-good { background: #ECF8F2; border-color: #C3E7D5; }
.article-body .ab-ask { background: #EEF2FF; border-color: #D3DBFB; }
.article-body ol.ab-steps { list-style: none; counter-reset: abs; padding: 0; margin: 14px 0 20px; }
.article-body ol.ab-steps li { counter-increment: abs; position: relative; padding: 0 0 14px 52px; margin: 0; min-height: 38px; }
.article-body ol.ab-steps li::before { content: counter(abs); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--green, #0B6E4F); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.article-body ol.ab-steps li:not(:last-child)::after { content: ''; position: absolute; left: 17px; top: 40px; bottom: 2px; width: 2px; background: var(--line, #e6ebe8); }
.article-body ol.ab-steps li b { display: block; }
.article-body ol.ab-steps li span { display: block; font-size: 15px; line-height: 1.55; color: var(--ink-2, #3a4a43); }
.article-body ul.ab-checks { list-style: none; padding: 0; margin: 12px 0 18px; }
.article-body ul.ab-checks li { position: relative; padding-left: 30px; margin: 0 0 8px; }
.article-body ul.ab-checks li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: #E7F6EF; color: #0B6E4F; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.article-body .ab-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0 18px; }
.article-body .ab-stats div { background: var(--soft, #f1f4f2); border-radius: 14px; padding: 12px 14px; }
.article-body .ab-stats b { display: block; font-size: 22px; color: var(--green, #0B6E4F); }
.article-body .ab-stats span { font-size: 13px; color: var(--muted, #6b7a73); }
html[data-theme="dark"] .article-body .ab-tip, html[data-theme="dark"] .article-body .ab-warn,
html[data-theme="dark"] .article-body .ab-good, html[data-theme="dark"] .article-body .ab-ask { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
html[data-theme="dark"] .article-body .ab-box p, html[data-theme="dark"] .article-body .ab-box b { color: var(--ink); }
@media (max-width: 560px) { .article-body .ab-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; } .article-body .ab-stats div { padding: 10px; } .article-body .ab-stats b { font-size: 17px; } .article-body .ab-stats span { font-size: 12px; line-height: 1.35; display: block; } .article-body .ab-cards { grid-template-columns: 1fr; } }

/* ---- Polish (v2.66.5) ---- */
/* Floating Ask button: round icon on laptop-size screens too, so the pill never covers the feed's left edge */
@media (min-width: 1000px) and (max-width: 1499px) {
  .ask-fab { left: auto; right: 26px; bottom: 104px; width: 52px; height: 52px; padding: 0; justify-content: center; border-radius: 50%; }
  .ask-fab .ask-fab-text { display: none; }
  .ask-fab .ask-fab-icon { font-size: 22px; }
}
/* Post header on phones: name stays on one line; the long post-type label shrinks with "…" */
@media (max-width: 560px) {
  .post-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .post-tags { flex-shrink: 1; min-width: 0; max-width: 118px; }
  .post-tags .type-dot { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: block; position: relative; padding-left: 13px; }
  .post-tags .type-dot::before { position: absolute; left: 0; top: 50%; margin-top: -3.5px; }
}
/* Phones/tablets: the Ask button sits above the live-chat bubble instead of hiding behind it */
@media (max-width: 999px) { body:has(.lchat) .ask-fab { right: 22px; bottom: calc(158px + env(safe-area-inset-bottom)); } }

/* ---- Star ratings (posts, members, businesses, famous people) ---- */
.rt { display: flex; flex-direction: column; gap: 12px; }
.rt-card { padding: 16px 18px; margin-top: 12px; }
.rt-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.rt-score { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.rt-score > b { grid-row: span 2; font-family: var(--display); font-size: 38px; line-height: 1; letter-spacing: -0.02em; }
.rt-stars { position: relative; display: inline-block; color: #D9DED9; font-size: 18px; letter-spacing: 2px; line-height: 1; }
.rt-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; color: #F2B52B; }
.rt-score small { color: var(--muted); font-size: 13px; }
.rt-bars { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 3px; }
.rt-bars div { display: grid; grid-template-columns: 26px 1fr 24px; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.rt-bars i { height: 7px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.rt-bars em { display: block; height: 100%; background: #F2B52B; border-radius: 99px; transition: width .3s ease; }
.rt-bars small { text-align: right; }
.rt-form { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.rt--post .rt-form { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px 14px; border-top: 0; padding-top: 0; }
.rt-q { font-weight: 700; font-size: 15px; }
.rt-pick { display: flex; align-items: center; gap: 2px; }
.rt-pick label { font-size: 30px; line-height: 1; color: #D9DED9; cursor: pointer; padding: 0 2px; transition: transform .1s ease, color .1s ease; user-select: none; }
.rt-pick label.on { color: #F2B52B; }
.rt-pick label:hover { transform: scale(1.15); }
.rt-pick label:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px; }
.rt-word { margin-left: 8px; font-size: 13px; font-weight: 700; color: var(--muted); min-width: 70px; }
.rt-c { display: flex; gap: 8px; }
.rt-c input { flex: 1; min-width: 0; height: 40px; border-radius: 12px; border: 1px solid var(--line); padding: 0 12px; font: inherit; font-size: 14px; background: var(--card); color: var(--ink); }
.rt-msg { margin: 0; font-size: 13px; font-weight: 600; color: var(--green); }
.rt-login { margin: 0; font-size: 14px; color: var(--muted); }
.rt-login a { font-weight: 700; color: var(--green); }
.rt-reviews { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.rt-review { font-size: 13px; } .rt-review p { margin: 3px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.rt-review .rt-s { color: #F2B52B; letter-spacing: 1px; }
.rt-side .rt-score > b { font-size: 34px; }
html[data-theme="dark"] .rt-stars, html[data-theme="dark"] .rt-pick label:not(.on) { color: #3A4741; }
/* Block option in the Report modal + note on a blocked person's post */
.report-block { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-top: 12px; padding: 12px; border-radius: 14px; background: #FDEEEE; border: 1px solid #F5C9C9; }
html[data-theme="dark"] .report-block { background: rgba(240,123,101,.1); border-color: rgba(240,123,101,.3); }
.blocked-note { padding: 18px; }
/* Terms of Use agreement (sign-up, log-in, accept screen) */
.terms-agree { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.terms-agree p { margin: 0; }
.terms-agree a { font-weight: 700; }
.terms-check { align-items: flex-start; gap: 10px; line-height: 1.45; }
.terms-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.terms-zero { font-size: 13px; line-height: 1.45; color: var(--ink-2); background: var(--soft); border-radius: 12px; padding: 10px 12px; }
.terms-agree.is-notice > p:first-child { font-size: 13px; color: var(--muted); }
.terms-points { margin: 0 0 16px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; }
