/* Dawarly — one stylesheet for the whole site.
   Every colour is a token below; dark mode only swaps the tokens.
   Logical properties (inline-start/end) are used everywhere so Arabic (RTL) and English (LTR) both work. */

@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/readex-pro-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/readex-pro-arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/readex-pro-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/readex-pro-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/readex-pro-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/readex-pro-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- colours ---------- */
:root {
  color-scheme: light;
  --bg: #F2F5FA;      /* page */
  --surf: #FFFFFF;    /* cards, header */
  --ink: #0E1624;     /* main text (dark walnut) */
  --mut: #4F5B6E;     /* secondary text */
  --line: #DDE3EC;    /* hairlines */
  --line2: #C3CCDA;   /* soft borders of buttons and tags */
  --ctl: #6F7C90;     /* borders of form fields (3:1 against the card colour, for accessibility) */
  --acc: #0B5FE0;     /* blue — the "ruler" colour */
  --acc-hover: #094FC0;
  --acc-ink: #FFFFFF; /* text on blue */
  --link: #0A55C8;
  --focus: #0A55C8;
  --ok: #0A7D73;
  --err: #C2255C;
  --star: #B77900;
  --star-off: #8E8077;
  --hero: #0B1426;
  --hero-ink: #FFFFFF;
  --hero-mut: #BFCBE0;
  --pill-ok: #0A7D73;
  --ok-bg: #E3F3F1;   --ok-fg: #075F57;
  --warn-bg: #FFF1CC; --warn-fg: #6B4400;
  --err-bg: #FBE6EE;  --err-fg: #9F1A4A;
  --info-bg: #E4EEF9; --info-fg: #1A4F8B;
  --mut-bg: #E8EDF5;  --mut-fg: #46536A;
  --mine-bg: #DCE9FF;
  --danger-bg: #C2255C; --danger-fg: #FFFFFF;
  --hi: #0E1624; --hi-ink: #FFFFFF;   /* the second 'strong' colour: ink in light mode, white in dark mode */
  --overlay: rgba(8, 14, 26, .62);
  --shadow: 0 1px 2px rgba(14, 22, 36, .06), 0 8px 24px rgba(14, 22, 36, .08);
  --shadow-lg: 0 10px 40px rgba(8, 14, 26, .28);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #05070B; --surf: #0A0E15; --ink: #F2F6FC; --mut: #9BA5B6; --line: #171E2A; --line2: #283245; --ctl: #7B8799;
    --acc: #2B8CFF; --acc-hover: #5BA3FF; --acc-ink: #04101F;
    --link: #5AA9FF; --focus: #5AA9FF;
    --ok: #3CCFBF; --err: #FF8FAE;
    --star: #FFB400; --star-off: #5E6A7D;
    --hero: #080C14;
    --ok-bg: #0A2421;   --ok-fg: #7FE3D7;
    --warn-bg: #2B1F06; --warn-fg: #FFD27A;
    --err-bg: #2E0F1A;  --err-fg: #FFB3C8;
    --info-bg: #0D1D30; --info-fg: #9CC8F5;
    --mut-bg: #121822;  --mut-fg: #C2CCDB;
    --mine-bg: #0F2A52;
    --danger-bg: #FF8FAE; --danger-fg: #2A0A14;
    --hi: #F2F6FC; --hi-ink: #060A12;
    --shadow: 0 1px 2px rgba(0, 0, 0, .6), 0 8px 24px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #05070B; --surf: #0A0E15; --ink: #F2F6FC; --mut: #9BA5B6; --line: #171E2A; --line2: #283245; --ctl: #7B8799;
  --acc: #2B8CFF; --acc-hover: #5BA3FF; --acc-ink: #04101F;
  --link: #5AA9FF; --focus: #5AA9FF;
  --ok: #3CCFBF; --err: #FF8FAE;
  --star: #FFB400; --star-off: #5E6A7D;
  --hero: #080C14;
  --ok-bg: #0A2421;   --ok-fg: #7FE3D7;
  --warn-bg: #2B1F06; --warn-fg: #FFD27A;
  --err-bg: #2E0F1A;  --err-fg: #FFB3C8;
  --info-bg: #0D1D30; --info-fg: #9CC8F5;
  --mut-bg: #121822;  --mut-fg: #C2CCDB;
  --mine-bg: #0F2A52;
  --danger-bg: #FF8FAE; --danger-fg: #2A0A14;
  --hi: #F2F6FC; --hi-ink: #060A12;
  --shadow: 0 1px 2px rgba(0, 0, 0, .6), 0 8px 24px rgba(0, 0, 0, .55);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 400 1rem/1.65 "Readex Pro", system-ui, "Segoe UI", Tahoma, Arial, sans-serif;
}
main { flex: 1 0 auto; outline: none; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3, p, ul, ol, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { line-height: 1.35; text-wrap: balance; }
h1 { font-size: clamp(1.5rem, 3.6vw, 2rem); }
h2 { font-size: 1.4rem; margin-bottom: 16px; }
.h3 { font-size: 1.1rem; margin: 6px 0 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
::placeholder { color: var(--mut); opacity: .9; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hero :focus-visible, .cta :focus-visible { outline-color: var(--acc); }
.search .btn:focus-visible { outline-color: var(--focus); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 12px; top: -64px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 10px; }
.muted { color: var(--mut); }
.center { text-align: center; }
.center-text { text-align: center; }
.hint { display: block; margin-top: 4px; color: var(--mut); font-size: .84rem; }
body.modal-open { overflow: hidden; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 18px; }
.wrap.narrow { max-width: 560px; padding-block: 34px 6px; }
.sec { padding-block: 34px 6px; }
.row-center { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.row-end { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.stack { display: grid; gap: 12px; }

/* ---------- cards ---------- */
.card { background: var(--surf); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.card h1 { margin-bottom: 10px; }
.card.center p { margin-bottom: 6px; color: var(--mut); }
.card.center .btn, .card.center .row-center { margin-top: 12px; }
.empty { padding: 30px 20px; }
.setup h1 { margin-bottom: 12px; }
.setup p { margin-bottom: 10px; }
.legal h1 { margin-bottom: 16px; }
.legal p { margin-bottom: 12px; }
.back { display: inline-block; margin-bottom: 14px; color: var(--mut); }
.back:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 8px 18px; border: 1px solid transparent; border-radius: 10px;
  background: var(--acc); color: var(--acc-ink); font-weight: 500; line-height: 1.3; text-align: center;
  transition: background-color .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--acc-hover); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; border-color: var(--line2); color: var(--ink); }
.btn.ghost:hover { background: var(--hi); border-color: var(--hi); color: var(--hi-ink); }
.btn.light { background: var(--hi); color: var(--hi-ink); }
.btn.light:hover { background: var(--hi); filter: brightness(.92); }
.btn.small { min-height: 36px; padding: 4px 12px; font-size: .9rem; }
.btn.full { width: 100%; margin-top: 10px; }
.btn.danger { background: var(--danger-bg); color: var(--danger-fg); }
.btn.danger:hover { filter: brightness(.94); }
.btn.danger-text, .danger-text { color: var(--err); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.busy { opacity: .7; cursor: progress; }
.linkbtn { padding: 4px 2px; border: 0; background: none; color: var(--link); font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { text-decoration-thickness: 2px; }
a.linkbtn { display: inline-block; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--surf); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 10px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 9px; flex: none; font-size: 1.2rem; font-weight: 700; }
.logo img { width: 38px; height: 38px; display: block; }
.nav { display: flex; gap: 4px; margin-inline-start: 14px; }
.navlink { display: flex; align-items: center; padding: 8px 12px; border-radius: 10px; color: var(--mut); font-size: .95rem; }
.navlink:hover { background: var(--bg); color: var(--ink); }
.navlink.on { color: var(--ink); font-weight: 500; box-shadow: inset 0 -3px 0 var(--acc); border-radius: 10px 10px 0 0; }
.dot {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-inline-start: 6px; padding: 0 6px;
  border-radius: 10px; background: var(--acc); color: var(--acc-ink); font-size: .75rem; font-weight: 700; line-height: 1;
}
.sp { flex: 1; }
.auth-btns { display: flex; gap: 8px; }
.short { display: none; }
.menu { display: none; padding: 4px 10px; }
.acct { max-width: 210px; }
.acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ruler strip under the hero */
.tape {
  height: 20px;
  background:
    linear-gradient(90deg, var(--acc-ink) 0 2px, transparent 2px) 0 0 / 50px 16px repeat-x,
    linear-gradient(90deg, var(--acc-ink) 0 1px, transparent 1px) 0 0 / 10px 8px repeat-x,
    var(--acc);
}

/* ---------- hero + search ---------- */
.hero { padding: 52px 0 46px; background: var(--hero); color: var(--hero-ink); }
.hero h1 { max-width: 17em; margin-bottom: 10px; font-size: clamp(1.8rem, 4.6vw, 3rem); line-height: 1.3; }
.hero p { max-width: 34em; margin-bottom: 24px; color: var(--hero-mut); }
.search { display: flex; gap: 6px; max-width: 640px; padding: 6px; border-radius: 14px; background: var(--surf); }
.search input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border: 0; background: transparent; color: var(--ink); }
.search:focus-within { outline: 3px solid var(--acc); outline-offset: 2px; }
.search input:focus-visible { outline: 0; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 24px; color: var(--hero-mut); font-size: .9rem; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust svg { flex: none; color: var(--acc); }
.trust b { color: var(--hero-ink); font-weight: 500; }

/* ---------- games ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.game {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px; text-align: start;
  background: var(--surf); border: 1px solid var(--line); border-radius: 14px;
}
.game:hover { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc); }
.game[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--acc); }
.game b { display: block; font-weight: 500; line-height: 1.35; }
.game small { display: block; color: var(--mut); font-size: .82rem; }
.tile { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: #fff; font-weight: 700; font-size: .9rem; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.chips, .filter-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 14px; border-radius: 999px;
  border: 1px solid var(--line2); background: var(--surf); color: var(--ink); font-size: .9rem;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
#f-sort, .filter-end select { min-height: 36px; padding: 4px 10px; border: 1px solid var(--ctl); border-radius: 10px; background: var(--surf); color: var(--ink); }

/* ---------- listing cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 16px; }
.grid > .card { grid-column: 1 / -1; }
.lcard {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surf); border: 1px solid var(--line); border-radius: 16px;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
a.lcard:hover { border-color: var(--hi); box-shadow: var(--shadow); transform: translateY(-2px); }
.lcard-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--mut-bg); }
.lcard-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph { background: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(0, 0, 0, .2)), var(--tile, #6C4DF6); }
.ph-mark { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 2rem; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.thumb .ph-mark { font-size: 1.1rem; }
.pill {
  position: absolute; top: 10px; inset-inline-start: 10px; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 500; background: var(--surf); color: var(--ink);
}
.pill.ok { background: var(--pill-ok); color: #fff; }
.lcard-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.lcard-body h3 {
  font-size: 1rem; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--mut); font-size: .86rem; }
.seller-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; color: var(--mut); font-size: .86rem; }
.seller-line > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price { font-size: 1.2rem; font-weight: 700; }
.lcard-body .price { margin-top: 2px; }
.stars { display: inline-flex; align-items: center; gap: 4px; color: var(--star); white-space: nowrap; }
.stars-n { color: var(--mut); font-size: .85rem; }

.skel .lcard-img { background: var(--mut-bg); }
.skel .lcard-body i { display: block; height: 12px; border-radius: 6px; background: var(--mut-bg); }
.skel .lcard-body i:nth-child(1) { width: 82%; height: 16px; }
.skel .lcard-body i:nth-child(2) { width: 52%; }
.skel .lcard-body i:nth-child(3) { width: 34%; }
.skel .lcard-img, .skel i { animation: pulse 1.2s ease-in-out infinite; }

/* ---------- how it works + call to action ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: s; }
.step { position: relative; padding: 20px; background: var(--surf); border: 1px solid var(--line); border-radius: 16px; }
.step::before {
  counter-increment: s; content: counter(s); width: 30px; height: 30px; margin-bottom: 10px; display: grid; place-items: center;
  border-radius: 50%; background: var(--pill-ok); color: #fff; font-weight: 700;
}
.step b { display: block; font-weight: 500; }
.step span { color: var(--mut); font-size: .92rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; background: var(--hero); border-color: transparent; color: var(--hero-ink); }
.cta h2 { margin-bottom: 6px; }
.cta p { color: var(--hero-mut); }

/* ---------- footer ---------- */
#footer { margin-top: 48px; border-top: 1px solid var(--line); }
.foot { display: grid; gap: 6px; padding-block: 26px 36px; color: var(--mut); font-size: .9rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-links a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- forms ---------- */
.f { display: block; margin-bottom: 14px; }
.f > label { display: block; margin-bottom: 5px; font-size: .92rem; font-weight: 500; }
.f input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]),
.f select, .f textarea, .search-line input, .composer textarea {
  display: block; width: 100%; min-height: 44px; padding: 9px 12px;
  border: 1px solid var(--ctl); border-radius: 10px; background: var(--surf); color: var(--ink);
}
.f input[type=color] { display: block; width: 100%; height: 44px; padding: 3px; border: 1px solid var(--ctl); border-radius: 10px; background: var(--surf); }
.f input[type=file] { display: block; width: 100%; padding: 8px 0; }
textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
.f input:focus-visible, .f select:focus-visible, .f textarea:focus-visible, .search-line input:focus-visible, .composer textarea:focus-visible { border-color: var(--focus); outline-offset: 0; }
[aria-invalid="true"] { border-color: var(--err) !important; }
.err { display: block; margin-top: 4px; color: var(--err); font-size: .84rem; font-style: normal; }
.err:empty { display: none; }
.form-msg { margin: 6px 0; color: var(--err); font-size: .92rem; }
.form-msg:empty { display: none; }
.form-msg.ok { color: var(--ok); }
.chk { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0 4px; font-size: .92rem; cursor: pointer; }
.chk input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--link); }
.chk a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg span { display: block; padding: 9px; text-align: center; border: 1px solid var(--ctl); border-radius: 10px; }
.seg input:checked + span { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); font-weight: 500; }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.note { margin-top: 14px; color: var(--mut); font-size: .84rem; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 12px; }
.inline-form { display: flex; align-items: flex-end; gap: 10px; }
.inline-form .f { flex: 1; min-width: 0; margin-bottom: 0; }
.inline-form .btn { flex: none; }
.imgbox { display: grid; place-items: center; min-height: 120px; margin-bottom: 8px; overflow: hidden; background: var(--bg); border: 1px dashed var(--ctl); border-radius: 12px; }
.imgbox img { display: block; width: 100%; max-height: 240px; object-fit: contain; }
.imgbox .muted { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px; }

.search-line { margin-bottom: 4px; }

/* ---------- modal + toasts ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px; background: var(--overlay); overflow: auto; }
.dlg {
  position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 36px); max-height: calc(100dvh - 36px); overflow: auto;
  padding: 26px 24px 22px; background: var(--surf); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .16s ease-out;
}
.dlg.wide { max-width: 660px; }
.dlg h2 { margin: 0 0 14px; margin-inline-end: 36px; font-size: 1.25rem; }
.dlg-text { margin-bottom: 14px; color: var(--mut); }
.x {
  position: absolute; top: 10px; inset-inline-end: 10px; width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--mut); font-size: 1.7rem; line-height: 1;
}
.x:hover { background: var(--bg); color: var(--ink); }
#toasts { position: fixed; z-index: 80; inset-inline: 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 8px; padding-inline: 16px; pointer-events: none; }
.toast {
  max-width: min(92vw, 460px); padding: 11px 18px; border-radius: 12px; background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow-lg); font-size: .95rem; pointer-events: auto; animation: toast-in .2s ease-out; transition: opacity .25s;
}
.toast.ok { border-inline-start: 5px solid var(--ok); }
.toast.err { background: var(--danger-bg); color: var(--danger-fg); }
.toast.out { opacity: 0; }

/* ---------- badges, tags, notices ---------- */
.badge { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .78rem; font-weight: 500; line-height: 1.7; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge.warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge.err { background: var(--err-bg); color: var(--err-fg); }
.badge.info { background: var(--info-bg); color: var(--info-fg); }
.badge.mut { background: var(--mut-bg); color: var(--mut-fg); }
.badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; padding: 1px 12px; border: 1px solid var(--line2); border-radius: 999px; background: var(--surf); font-size: .85rem; color: var(--ink); }
.tag.ok { background: var(--ok-bg); border-color: transparent; color: var(--ok-fg); }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--info-bg); color: var(--info-fg); font-size: .88rem; }
.notice svg { flex: none; margin-top: 3px; }
.notice.err { background: var(--err-bg); color: var(--err-fg); }
.notice.warn { background: var(--warn-bg); color: var(--warn-fg); }
.status-line { display: inline-block; margin: 10px 0 6px; padding: 3px 14px; border-radius: 999px; background: var(--mut-bg); color: var(--mut-fg); font-size: .9rem; }
.status-line.pending { background: var(--warn-bg); color: var(--warn-fg); }
.status-line.rejected { background: var(--err-bg); color: var(--err-fg); }

/* ---------- listing page ---------- */
.ldetail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.lmain { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.lmain h1 { overflow-wrap: anywhere; }
.lmedia { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: var(--mut-bg); }
.lmedia img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lmedia .ph-mark { font-size: 3.4rem; }
.lmain .meta { gap: 8px; }
.desc { padding: 16px 18px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surf); border: 1px solid var(--line); border-radius: 14px; }
.seller-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.seller-card .meta { margin-top: 2px; }
.avatar { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--acc); color: var(--acc-ink); font-weight: 700; }
.reviews { display: grid; gap: 10px; }
.review { padding: 14px 16px; background: var(--surf); border: 1px solid var(--line); border-radius: 14px; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: .88rem; }
.review p { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.obox { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 10px; }
.big-price { font-size: 1.9rem; font-weight: 700; line-height: 1.25; }
.summary { display: grid; gap: 2px; margin-bottom: 14px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.summary span { font-weight: 700; font-size: 1.1rem; }
.summary small { color: var(--mut); }

/* ---------- seller / admin lists ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.list { display: grid; gap: 10px; }
.lrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; background: var(--surf); border: 1px solid var(--line); border-radius: 14px; }
.thumb { position: relative; flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: 12px; background: var(--mut-bg); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lrow-main { flex: 1 1 220px; min-width: 0; }
.lrow-title { font-weight: 500; overflow-wrap: anywhere; }
.lrow-title:hover { text-decoration: underline; }
.lrow-main .meta { margin-top: 4px; }
.lrow .price { flex: none; font-size: 1.1rem; }
.lrow-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.arow { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px 16px; }
.arow-main { display: grid; flex: 1 1 280px; gap: 6px; min-width: 0; }
.arow-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.note-box { padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font-size: .92rem; }
.gform { display: block; margin-bottom: 4px; }
.admin-panel { min-height: 120px; }

/* ---------- tabs + order rows ---------- */
.tabbar { display: flex; gap: 6px; margin-bottom: 16px; padding-bottom: 1px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: 4px; flex: none; margin-bottom: -1px; padding: 10px 16px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--mut); white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { border-bottom-color: var(--acc); color: var(--ink); font-weight: 500; }
.count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--mut-bg); color: var(--mut-fg); font-size: .78rem; text-align: center; }
.orow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; background: var(--surf); border: 1px solid var(--line); border-radius: 14px; }
a.orow:hover { border-color: var(--line2); box-shadow: var(--shadow); }
.orow.needs { border-inline-start: 5px solid var(--acc); }
.orow-main { flex: 1 1 240px; min-width: 0; }
.orow-main b { font-weight: 500; overflow-wrap: anywhere; }
.orow-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.needs-tag { padding: 1px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-fg); font-size: .78rem; font-weight: 500; }

/* ---------- one order + chat ---------- */
.order-page { display: grid; gap: 14px; }
.order-page .back { margin-bottom: 0; justify-self: start; }
.ohead { display: grid; gap: 12px; }
.ohead h1 { font-size: 1.35rem; overflow-wrap: anywhere; }
.ohead-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; }
.ohead-top > div:first-child { flex: 1 1 280px; min-width: 0; }
.ohead-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ohead .linkbtn { justify-self: start; }
.hint-box { padding: 12px 14px; border-radius: 12px; background: var(--info-bg); color: var(--info-fg); font-size: .92rem; }
.oactions { display: flex; flex-wrap: wrap; gap: 10px; }
.oactions[hidden] { display: none; }
.chat { display: grid; gap: 12px; }
.chat-log {
  display: flex; flex-direction: column; gap: 10px; min-height: 180px; max-height: 460px; padding: 14px; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
}
.msg { align-self: flex-start; max-width: min(82%, 520px); padding: 8px 12px 6px; background: var(--surf); border: 1px solid var(--line); border-radius: 14px; }
.msg.mine { align-self: flex-end; background: var(--mine-bg); border-color: transparent; }
.msg.r-admin { background: var(--info-bg); color: var(--info-fg); border-color: transparent; }
.msg-who { display: flex; align-items: center; gap: 6px; color: var(--mut); font-size: .8rem; }
.msg.r-admin .msg-who, .msg.r-admin time { color: inherit; }
.role-tag { padding: 0 8px; border-radius: 999px; background: var(--mut-bg); color: var(--mut-fg); font-size: .72rem; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg time { display: block; margin-top: 2px; color: var(--mut); font-size: .72rem; text-align: end; }
.sysmsg { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; align-self: center; gap: 4px 10px; padding: 4px 14px; border-radius: 14px; background: var(--mut-bg); color: var(--mut-fg); font-size: .82rem; text-align: center; }
.sysmsg time { opacity: .85; }
.composer { display: flex; align-items: flex-end; gap: 10px; }
.composer textarea { flex: 1; min-width: 0; min-height: 56px; }
.composer .btn { flex: none; }

/* review stars */
.stars-input { padding: 0; margin: 0 0 14px; border: 0; min-width: 0; }
.stars-input legend { padding: 0; margin-bottom: 6px; font-weight: 500; }
.stars-row { display: flex; gap: 2px; }
.star { position: relative; cursor: pointer; line-height: 1; }
.star input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.star > span:first-of-type { display: block; padding: 2px 3px; border-radius: 6px; color: var(--star-off); font-size: 2.1rem; }
.star input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.stars-row[data-n="1"] .star:nth-child(-n+1) > span:first-of-type,
.stars-row[data-n="2"] .star:nth-child(-n+2) > span:first-of-type,
.stars-row[data-n="3"] .star:nth-child(-n+3) > span:first-of-type,
.stars-row[data-n="4"] .star:nth-child(-n+4) > span:first-of-type,
.stars-row[data-n="5"] .star:nth-child(-n+5) > span:first-of-type { color: var(--star); }

/* ---------- loading ---------- */
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 70px 0; color: var(--mut); }
.spin { width: 20px; height: 20px; border: 3px solid var(--line2); border-top-color: var(--focus); border-radius: 50%; animation: spin .8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .55; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .ldetail { display: flex; flex-direction: column; gap: 14px; }
  .lmain { display: contents; }
  .lmain > .desc, .lmain > .h3, .lmain > .seller-card, .lmain > .reviews, .lmain > p.muted { order: 2; }
  .obox { order: 1; position: static; }
}
@media (max-width: 820px) {
  .bar-cur { display: none; }
  .nav-cur { display: block; margin-top: 10px; align-self: flex-start; }
  .menu { display: inline-flex; }
  .nav {
    display: none; position: absolute; inset-inline: 0; top: 100%; flex-direction: column; gap: 0; margin: 0; padding: 6px 18px 12px;
    background: var(--surf); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .top.open .nav { display: flex; }
  .navlink { padding: 13px 6px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .navlink.on { box-shadow: inset 3px 0 0 var(--acc); padding-inline-start: 12px; border-radius: 0; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 14px; }
  .bar { gap: 6px; }
  .long { display: none; }
  .short { display: inline; }
  .auth-btns .btn:not(.ghost) { display: none; }
  .acct-name, .offers-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hero { padding: 36px 0 32px; }
  .search .btn span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .two { grid-template-columns: 1fr; }
  .dlg { padding: 24px 18px 20px; }
  .lrow-actions { width: 100%; }
  .lcard-body { padding: 12px 14px 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .inline-form { flex-direction: column; align-items: stretch; }
  .msg { max-width: 92%; }
  .composer { flex-direction: column; align-items: stretch; }
  .ohead-side { align-items: flex-start; }
  .cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.check { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.check input { inline-size: 18px; block-size: 18px; accent-color: var(--acc); }

/* account menu, wallet, notifications */
.small { font-size: .85rem; }
.umenu { position: relative; display: flex; align-items: center; gap: 6px; }
.offers-btn { position: relative; gap: 6px; }
.umenu .acct { gap: 6px; }
.umenu-panel {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 40; inline-size: min(300px, calc(100vw - 32px));
  padding: 8px; background: var(--surf); color: var(--ink); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow-lg);
}
.umenu-head { display: grid; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; overflow-wrap: anywhere; }
.umenu-list { display: grid; gap: 2px; }
.umenu-item {
  display: flex; align-items: center; gap: 12px; inline-size: 100%; padding: 10px; border: 0; border-radius: 10px; background: transparent;
  color: var(--ink); font: inherit; text-align: start; text-decoration: none; cursor: pointer;
}
.umenu-item span { flex: 1; }
.umenu-item:hover, .umenu-item:focus-visible { background: var(--bg); }
.umenu-item.out { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; padding-top: 12px; color: var(--mut); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { display: grid; gap: 6px; }
.stat-n { font-size: 1.6rem; font-weight: 700; }
.note { margin-bottom: 18px; }
.fb-text { margin: 6px 0; overflow-wrap: anywhere; }
.sound-box { display: grid; gap: 8px; justify-items: start; }
.sound-box p { margin: 0; }

/* profile */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xs { width: 22px; height: 22px; font-size: .62rem; }
.avatar.sm { width: 38px; height: 38px; font-size: .85rem; }
.avatar.lg { width: 96px; height: 96px; font-size: 1.9rem; }
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { text-decoration: underline; }
.rank { display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.rank.bronze { background: #F2DFC9; color: #6B3F14; }
.rank.silver { background: #E6E8EC; color: #3A4150; }
.rank.gold { background: #FBEBB5; color: #6B4E00; }
:root[data-theme="dark"] .rank.bronze { background: #4A3220; color: #F0C9A0; }
:root[data-theme="dark"] .rank.silver { background: #353A44; color: #D5D9E0; }
:root[data-theme="dark"] .rank.gold { background: #4D3F10; color: #F5DA7A; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rank.bronze { background: #4A3220; color: #F0C9A0; }
  :root:not([data-theme="light"]) .rank.silver { background: #353A44; color: #D5D9E0; }
  :root:not([data-theme="light"]) .rank.gold { background: #4D3F10; color: #F5DA7A; }
}
.pcard { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px 22px; margin-bottom: 14px; }
.pmain { flex: 1 1 260px; min-width: 0; display: grid; gap: 8px; justify-items: start; }
.pmain h1 { margin: 0; overflow-wrap: anywhere; }
.pmain p { margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.bio { overflow-wrap: anywhere; white-space: pre-line; }
.av-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.privacy { display: grid; gap: 2px; margin: 0; padding: 0; border: 0; }
.privacy legend { padding: 0; margin-bottom: 4px; font-weight: 600; }
.umenu-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; text-decoration: none; color: inherit; }
.umenu-who { display: grid; min-width: 0; gap: 2px; overflow-wrap: anywhere; }
.seller-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }

/* chat media + seen ticks */
.msg-media { margin: 4px 0; }
.msg-media img, .msg-media video { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; background: var(--line); }
.msg-media .spin { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--mut); border-radius: 50%; animation: dwspin .8s linear infinite; }
@keyframes dwspin { to { transform: rotate(360deg); } }
.msg-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 2px; }
.msg-foot time { margin: 0; display: inline; }
.ticks { color: var(--mut); font-size: .72rem; white-space: nowrap; }
.ticks.seen { color: var(--info-fg, #2a7bd8); }
.icon-btn { padding-inline: 10px; }

.rvrow .rv-comment { margin: 4px 0 0; overflow-wrap: anywhere; }

.ono { font-weight: 600; direction: ltr; unicode-bidi: isolate; }
.oid { direction: ltr; unicode-bidi: isolate; user-select: all; overflow-wrap: anywhere; font-size: .8rem; }

.msg.deleted { background: transparent; border: 1px dashed var(--line); color: var(--mut); }
.msg.deleted .msg-foot { margin-top: 0; }
.msg-foot .linkbtn { margin-inline-end: auto; }
.logrow { display: flex; flex-direction: column; gap: 6px; }
.logrow .log-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* hire a pro */
.jlist { display: grid; gap: 12px; margin-top: 12px; }
.jcard { display: flex; gap: 12px; align-items: flex-start; color: inherit; text-decoration: none; }
.jcard:hover { border-color: var(--accent); }
.jthumb { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; flex: none; background: var(--line); }
.jmain { flex: 1; min-width: 0; display: grid; gap: 6px; }
.jtop { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.jtop h1, .jtop b { margin: 0; overflow-wrap: anywhere; }
.chipx { background: var(--line); border-radius: 999px; padding: 1px 10px; font-size: .8rem; }
.urg { color: var(--err-fg, #c0392b); font-weight: 600; }
.jdesc { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.jgallery { display: flex; gap: 8px; flex-wrap: wrap; }
.jgallery img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; background: var(--line); }
.offer { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.offer-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.thread { display: grid; gap: 8px; }
.thread-log { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; padding: 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } .jthumb { width: 64px; height: 64px; } }

/* seller verification */
.kyc { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0 0 16px; display: grid; gap: 12px; }
.kyc legend { font-weight: 700; padding-inline: 6px; }
.kyc-prev { max-width: 220px; max-height: 160px; border-radius: 10px; object-fit: cover; display: block; margin-top: 6px; }
.kyc-row { display: flex; gap: 10px; flex-wrap: wrap; }
.kyc-th { display: grid; gap: 4px; width: 150px; color: inherit; text-decoration: none; }
.kyc-th img { width: 150px; height: 110px; object-fit: cover; border-radius: 10px; background: var(--line); }
.kyc-th.vid { width: 220px; }
.kyc-th video { width: 220px; max-height: 180px; border-radius: 10px; background: #000; }
.kyc-th small { color: var(--mut); }

.stat.big .stat-n { font-size: 1.9rem; }
.price.pos { color: var(--ok-fg); }

/* ---- v17: verified badge, tradesperson profile, reports, statistics, invitations, app install ---- */
.verified { display: inline-flex; align-items: center; gap: 4px; }
.verified svg { flex: none; }
.promini { align-items: center; }
.offer-who { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.area-filter { min-width: 150px; max-width: 220px; }
.report-btn { color: var(--mut); }
.row-start { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.two.top { align-items: start; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 14px; }
.gcard { display: grid; gap: 8px; align-content: start; min-width: 0; }
.gpair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gpic { margin: 0; display: grid; gap: 4px; min-width: 0; }
.gpic img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--line); }
.gpic figcaption { font-size: .78rem; color: var(--mut); text-align: center; }
.gcap { margin: 0; overflow-wrap: anywhere; }
.stats5 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--acc); }
.chart .bar.zero { fill: var(--line2); }
.chart text { fill: var(--mut); font-size: 9px; }
.toplist { margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; }
.refcode { font-size: 1.2rem; letter-spacing: .08em; padding: 2px 10px; border-radius: 8px; background: var(--mut-bg); color: var(--mut-fg); }
.pwabox { gap: 12px; }
@media (max-width: 520px) { .gpair { gap: 6px; } .area-filter { max-width: none; flex: 1 1 140px; } }
.report-link { padding: 4px 2px; border: 0; background: none; color: var(--link); font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* v18: deposit proof */
.proof-img { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; border-radius: 8px; }

/* v23: users list shows balances, with a sort chip beside the search box */
.search-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.search-line input { flex: 1 1 220px; min-width: 0; }

/* v28: darker dark mode, with a white second colour for secondary actions and hover edges */

/* theme switch */
.switch { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 44px; padding: 0; background: none; border: 0; }
.switch-track { position: relative; display: block; width: 52px; height: 28px; border-radius: 999px; background: var(--mut-bg); border: 1px solid var(--line2); transition: background .2s; direction: ltr; }
.switch-ico { position: absolute; top: 6px; display: block; color: var(--mut); line-height: 0; }
.switch-ico.sun { left: 7px; } .switch-ico.moon { right: 7px; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--hi); box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .2s; }
.switch[aria-checked="true"] .switch-thumb { transform: translateX(24px); }
.switch[aria-checked="true"] .switch-track { background: var(--surf); }
.switch:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .switch-thumb, .switch-track { transition: none; } }

.cur-select { flex: none; min-height: 36px; padding: 4px 8px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surf); color: var(--ink); font-size: .9rem; }
.nav-cur { display: none; }

.chat-log { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; min-height: 200px; overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surf); }

/* help bot */
.sb-fab { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 45; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--acc); color: var(--acc-ink); font-weight: 500; box-shadow: var(--shadow-lg); direction: ltr; }
.sb-fab:hover { background: var(--acc-hover); }
.sb-fab:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sb-dot { position: absolute; top: -6px; right: -4px; }
.sb-panel { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 60px); z-index: 46; display: flex; flex-direction: column; width: min(390px, calc(100vw - 32px)); height: min(580px, calc(100vh - 110px)); background: var(--surf); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; background: var(--hero); color: var(--hero-ink); }
.sb-head .btn.ghost { color: var(--hero-ink); border-color: transparent; background: transparent; }
.sb-head .btn.ghost:hover { background: var(--hi); color: var(--hi-ink); }
.sb-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.sb-chat { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.sb-msg { display: flex; }
.sb-msg.me { justify-content: flex-end; }
.sb-b { max-width: 92%; padding: 9px 12px; border-radius: 14px; background: var(--mut-bg); color: var(--ink); display: flex; flex-direction: column; gap: 8px; overflow-wrap: anywhere; }
.sb-msg.me .sb-b { background: var(--acc); color: var(--acc-ink); }
.sb-b p { margin: 0; }
.sb-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-links { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.linkish { background: none; border: 0; padding: 4px 2px; color: var(--link); text-decoration: underline; font-size: .9rem; display: inline-flex; gap: 6px; align-items: center; }
.sb-form { display: flex; gap: 8px; }
.sb-in { flex: 1; min-width: 0; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--ctl); background: var(--surf); color: var(--ink); }
.sb-in:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.sb-sub { display: flex; align-items: center; gap: 8px; }
.sb-list { display: flex; flex-direction: column; gap: 8px; }
.sb-artwrap { display: flex; flex-direction: column; gap: 6px; }
.sb-art { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surf); color: var(--ink); text-align: start; }
.sb-art:hover, .sb-art.on { border-color: var(--acc); }
.sb-ans { padding: 10px 12px; border-radius: 12px; background: var(--surf); border: 1px dashed var(--line2); font-size: .95rem; }
.sb-ans p { margin: 0; }
.sb-tk { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surf); color: var(--ink); text-align: start; }
.sb-tk:hover { border-color: var(--acc); }
.sb-tk-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--mut); }
.sb-thread .sb-log { max-height: 280px; min-height: 120px; }
.sb-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sb-detail { margin-top: 12px; }
.sb-trow { width: 100%; text-align: start; }
@media (max-width: 520px) { .sb-fab-t { display: none; } .sb-fab { padding: 0 14px; } }
