/* ===================== Tachlif — modern violet theme ===================== */
:root {
  --bg: #f4f9f8;
  --bg-tint: #d6f4ef;
  --surface: #ffffff;
  --surface-2: #eaf5f3;
  --border: #dfeeeb;
  --text: #10221f;
  --muted: #5d7671;
  /* Brand teal shifted toward blue/cyan so wide-gamut phone screens (OLED) don't
     render it green. Reads as a clean blue-teal on both phone and desktop. */
  --accent: #0d9bb0;
  --accent-strong: #0a8294;
  --accent-soft: #d3eef3;
  --accent-2: #0891b2;      /* gradient partner + highlights */
  --grad: linear-gradient(120deg, #0d9bb0, #1fbfd0 48%, #22d3ee);
  --danger: #e5484d;
  --danger-soft: #fbe4e5;
  --ok: #16a34a;
  --ok-soft: #dcfce7;
  --gold: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(28, 20, 22, .06), 0 4px 12px rgba(28, 20, 22, .05);
  --shadow: 0 2px 6px rgba(28, 20, 22, .07), 0 16px 40px rgba(153, 27, 27, .12);
  --radius: 18px;
  --radius-sm: 12px;
  --on-accent: #ffffff;
  /* Lock the app to one light palette on every device so the brand teal renders
     identically on phone and desktop (also keeps native controls/scrollbars light). */
  color-scheme: light;
}
/* Single light theme app-wide — the desktop palette leads on every device.
   (Native form controls stay light thanks to color-scheme above.) */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1100px 500px at 90% -100px, var(--bg-tint), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  direction: rtl;
}
a { color: var(--accent-strong); text-decoration: none; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent-soft); }

/* ---- Header ---- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.32rem; cursor: pointer; }
.brand svg.logo-icon { width: 46px; height: 46px; }
@font-face { font-family: "TachlifBrand"; src: url("/assets/fonts/secular-one.woff2") format("woff2"); font-display: swap; }
.logo-icon { width: 46px; height: 46px; display: block; transition: transform .55s cubic-bezier(.34,1.25,.5,1); }
.brand:hover .logo-icon { transform: rotate(180deg); }
.logo-word { font-family: "TachlifBrand", "Segoe UI", Arial, sans-serif; font-size: 1.6rem; letter-spacing: 0; color: var(--accent-strong); line-height: 1; padding-top: 3px; }
.nav { display: flex; gap: 3px; margin-inline-start: auto; align-items: center; flex-wrap: nowrap; min-width: 0; }
/* Primary links live in a shrinkable, horizontally-scrollable track so the action
   buttons (post / theme / user) always stay inline — the header never wraps. */
.nav-scroll { display: flex; align-items: center; gap: 3px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-scroll > a { flex: 0 0 auto; }
/* Action buttons keep their size; only the links track shrinks/scrolls. */
.nav > *:not(.nav-scroll) { flex: 0 0 auto; }
.nav-post { white-space: nowrap; }
.nav a {
  padding: 8px 12px; border-radius: 11px; color: var(--muted); font-weight: 600; font-size: .92rem;
  display: inline-flex; align-items: center; gap: 6px; position: relative; transition: .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { color: var(--accent-strong); background: var(--accent-soft); }
.nav .badge-count {
  background: var(--accent-2); color: #fff; border-radius: 999px; font-size: .68rem;
  min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.theme-toggle {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  width: 38px; height: 38px; border-radius: 11px; cursor: pointer; font-size: 1.05rem;
  display: inline-flex; align-items: center; justify-content: center; transition: .15s;
}
.theme-toggle:hover { background: var(--surface-2); border-color: var(--accent); }

/* ---- Layout ---- */
.container { max-width: 1160px; margin: 0 auto; padding: 26px 22px 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 1.7rem; }
.page-head p { margin: 5px 0 0; color: var(--muted); }
.muted { color: var(--muted); }
.center-narrow { max-width: 460px; margin: 44px auto; }

/* ---- Buttons ---- */
.btn {
  font: inherit; font-weight: 650; cursor: pointer; border: 1px solid transparent;
  border-radius: 12px; padding: 10px 17px; display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2); color: var(--text); transition: transform .06s, background .15s, box-shadow .15s;
}
.btn:hover { background: var(--border); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; border: none; box-shadow: 0 6px 18px rgba(124, 58, 237, .32); }
.btn-primary:hover { filter: brightness(1.06); background: var(--grad); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 22%, transparent); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Forms ---- */
.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 650; font-size: .85rem; margin-bottom: 6px; }
input, select, textarea {
  font: inherit; width: 100%; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: .15s;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.form-error { background: var(--danger-soft); color: var(--danger); padding: 11px 13px; border-radius: 12px; font-size: .88rem; margin-bottom: 14px; }
.form-ok { background: var(--ok-soft); color: var(--ok); padding: 12px 14px; border-radius: 12px; font-size: .92rem; line-height: 1.6; }
.install-pill {
  position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 65;
  background: var(--grad); color: #fff; border: none; cursor: pointer;
  padding: 11px 16px; border-radius: 999px; font: inherit; font-weight: 700; font-size: .9rem;
  box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: 8px; animation: pop .2s ease;
}
.install-pill:hover { filter: brightness(1.06); }
.install-pill .ip-x { opacity: .85; font-size: 1.15rem; line-height: 1; padding: 0 2px; }

/* ---- Cards / grid ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column;
}
.card-body { padding: 15px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.item-card { cursor: pointer; transition: transform .16s, box-shadow .16s; }
.item-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.thumb {
  aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2));
  display: flex; align-items: center; justify-content: center; font-size: 3.2rem; position: relative; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-icon { background: radial-gradient(circle at 50% 38%, var(--accent-soft), var(--surface-2)); }
.thumb-icon .ti { line-height: 1; filter: drop-shadow(0 3px 6px rgba(0,0,0,.12)); }
.thumb .traded-flag {
  position: absolute; inset: 0; background: rgba(15, 11, 22, .58); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; letter-spacing: .06em; font-size: 1.15rem; backdrop-filter: blur(1px);
}
.card-title { font-weight: 750; font-size: 1.04rem; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fav { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; }

/* ---- Chips / badges ---- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 650;
  padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); white-space: nowrap;
}
.chip.cat { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.chip.want { background: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
/* Inside cards a long "wanted" chip (category · sub-category) must never spill
   over the edge — cap it to the card width and trim with an ellipsis. */
.item-card .chip { max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.pct {
  font-weight: 800; font-size: .78rem; padding: 4px 10px; border-radius: 999px;
  background: linear-gradient(120deg, #16a34a, #22c55e); color: #fff;
}
.pct.mid { background: linear-gradient(120deg, #f59e0b, #f97316); }
.new-dot { display: inline-block; margin-inline-start: 6px; font-size: .66rem; font-weight: 800; color: var(--accent-2); }
.status-tag { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: capitalize; }
.status-pending { background: var(--accent-soft); color: var(--accent-strong); }
.status-accepted { background: var(--ok-soft); color: var(--ok); }
.status-declined, .status-cancelled, .status-traded { background: var(--surface-2); color: var(--muted); }
.input-locked { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.status-expired { background: var(--danger-soft); color: var(--danger); }
.chip-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; font-size: .72rem; padding: 3px 9px; }
.card-expired { opacity: .72; }
.card-expired .thumb { filter: grayscale(.6); }

/* ---- Stars ---- */
.stars { display: inline-flex; align-items: center; gap: 1px; color: var(--gold); font-size: .95rem; line-height: 1; }
.stars .s { opacity: .3; }
.stars .s.on { opacity: 1; }
.rating-inline { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; font-size: 2rem; cursor: pointer; }
.star-input .s { color: var(--border); transition: .1s; }
.star-input .s.hot { color: var(--gold); }

/* ---- Pending-ratings banner ---- */
.rate-banner { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; }
.rate-banner-head { font-weight: 700; color: var(--accent-strong); margin-bottom: 8px; }
.rate-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); font-size: .9rem; }
.rate-row:first-of-type { border-top: none; }
.rate-list .rate-row { border-color: var(--border); }

/* ---- Public profile + reviews ---- */
.profile-hero { display: flex; gap: 16px; align-items: center; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.5rem; }
.rating-summary { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.rating-big { text-align: center; flex: none; }
.rating-avg { font-size: 3rem; font-weight: 800; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rating-dist { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 5px; }
.dist-row { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
.dist-star { color: var(--muted); width: 30px; flex: none; }
.dist-track { flex: 1; height: 9px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.dist-fill { display: block; height: 100%; background: var(--gold); }
.dist-num { width: 22px; text-align: end; color: var(--muted); flex: none; }
.reviews { display: flex; flex-direction: column; gap: 12px; }
.review p { font-size: .92rem; line-height: 1.5; }

/* ---- Filters ---- */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .search { flex: 1; min-width: 220px; position: relative; }
.filter-adv { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-adv select { max-width: 210px; flex: 1; min-width: 150px; }
.section-title { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px; font-weight: 750; font-size: .95rem; color: var(--muted); }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.filterbar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(162px, 1fr)); gap: 10px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px; margin-bottom: 24px; box-shadow: var(--shadow-sm);
}
.filterbar .fb-field { height: 44px; padding: 0 13px; margin: 0; width: 100%; min-width: 0; }
.filterbar .fb-search { grid-column: 1 / -1; }
.filterbar .fb-clear { height: 40px; justify-self: start; }
.catbar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; scrollbar-width: thin; }
.catbar .chip { cursor: pointer; font-size: .84rem; padding: 7px 14px; }
.catbar .chip.active { background: var(--grad); color: #fff; border-color: transparent; }

/* ---- Detail ---- */
.detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 30px; }
.detail .gallery { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.detail .gallery .thumb { aspect-ratio: 4/3; font-size: 5rem; }
.detail-side h1 { margin: 0 0 6px; font-size: 1.85rem; }
.owner-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; margin: 16px 0; display: flex; gap: 12px; align-items: center; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.section-label { font-size: .82rem; letter-spacing: normal; word-spacing: -.06em; color: var(--muted); font-weight: 700; margin: 18px 0 8px; }

/* ---- Proposal / match rows ---- */
.swap-row { display: flex; align-items: center; gap: 14px; }
.swap-mini { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.swap-mini .thumb { width: 64px; height: 54px; border-radius: 12px; aspect-ratio: auto; font-size: 1.5rem; flex: none; }
.swap-mini .t { min-width: 0; }
.swap-mini .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swap-arrow { color: var(--accent); font-size: 1.4rem; flex: none; }
.list-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 14px; }
.list-card.new-match { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm); }
.match-group { margin-bottom: 28px; }

/* three-way circle swaps (compact) */
.circle-card { border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); padding: 12px 14px; }
.circle-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.circle-badge { font-weight: 750; color: var(--accent-strong); font-size: .88rem; }
.circle-head .pct { font-size: .74rem; padding: 3px 9px; }
.circle-flow { display: flex; align-items: center; gap: 2px; }
.circle-node { flex: 1 1 0; min-width: 0; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border-radius: 10px; }
.circle-node.me { background: var(--accent-soft); }
.circle-node .thumb { width: 42px; height: 42px; aspect-ratio: auto; border-radius: 10px; font-size: 1.15rem; }
.circle-node b { font-size: .72rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.circle-node span { font-size: .66rem !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.circle-arrow { color: var(--accent); font-size: 1rem; flex: 0 0 auto; }
.circle-arrow:last-child { display: none; }
.circle-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.circle-actions .muted { font-size: .78rem !important; }
.circle-mine { background: var(--surface-2); border-radius: 10px; padding: 9px 12px; margin: 12px 0 4px; font-size: .88rem; }
.circle-mine b { color: var(--accent-strong); }
.circle-breakdown { margin: 14px 0 2px; display: flex; flex-direction: column; gap: 8px; }
.cb-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font-size: .88rem; }
.cb-row.me { background: var(--accent-soft); border-color: var(--accent); }
.cb-who { font-weight: 800; min-width: 74px; color: var(--text); }
.cb-give, .cb-get { color: var(--muted); }
.cb-give b, .cb-get b { color: var(--accent-strong); font-weight: 700; }
.cb-arrow { color: var(--accent-strong); font-weight: 800; }
/* the detail page shows the flow bigger for readability */
.circle-detail .circle-node .thumb { width: 60px; height: 60px; }
.circle-detail .circle-node b { font-size: .82rem; white-space: normal; }
.circle-detail .circle-arrow { font-size: 1.3rem; }
.match-group > h3 { margin: 0 0 10px; font-size: 1.08rem; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs button {
  font: inherit; font-weight: 650; background: none; border: none; color: var(--muted);
  padding: 11px 15px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--accent-strong); border-color: var(--accent); }

/* ---- Chat ---- */
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; padding: 6px 2px; }
.bubble { max-width: 74%; padding: 10px 14px; border-radius: 16px; background: var(--surface-2); }
.bubble.mine { align-self: flex-start; background: var(--grad); color: #fff; }
.bubble .meta { font-size: .7rem; opacity: .75; margin-top: 3px; }
.composer { display: flex; gap: 10px; margin-top: 14px; }
.composer input { flex: 1; }

/* ---- Stats ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 17px; box-shadow: var(--shadow-sm); }
.stat .n { font-size: 2rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .l { color: var(--muted); font-size: .85rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; padding: 11px 13px; border-bottom: 1px solid var(--border); font-size: .9rem; }
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ---- Admin panel ---- */
.admin-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs button { white-space: nowrap; flex: 0 0 auto; }
.stat.stat-hot .n { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--danger); }
.admin-overview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.admin-quicklinks { margin: 12px 0 0; padding-inline-start: 18px; }
.admin-quicklinks li { margin-bottom: 9px; line-height: 1.6; }
.row-suspended { background: var(--danger-soft); }
.chip-warn { background: var(--danger-soft); color: var(--danger); border-color: transparent; font-size: .72rem; padding: 2px 8px; }
.conv-thread { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; padding: 4px; }
.conv-msg { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; }
.conv-meta { font-size: .78rem; margin-bottom: 3px; }
.conv-body { font-size: .92rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }

/* ---- Empty state ---- */
.empty { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty .big { font-size: 3.2rem; margin-bottom: 10px; }

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 11, 22, .55); z-index: 1000; backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s ease;
}
.modal {
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow); width: 100%; max-width: 490px; max-height: 88vh; overflow-y: auto; padding: 24px;
  animation: pop .18s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal h2 { margin: 0 0 14px; font-size: 1.28rem; }
.modal .close { float: inline-end; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--muted); line-height: 1; }
.pick-item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; margin-bottom: 8px; transition: .12s; }
.pick-item:hover { border-color: var(--accent); background: var(--surface-2); }
.pick-item.sel { border-color: var(--accent); background: var(--accent-soft); }
.pick-item .check { font-size: 1.25rem; color: var(--accent); flex: none; line-height: 1; }
.pick-item .thumb { width: 50px; height: 50px; aspect-ratio: auto; border-radius: 10px; font-size: 1.3rem; flex: none; }

/* ---- Toast ---- */
.toasts { position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 1200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #17132a; color: #fff; padding: 13px 17px; border-radius: 13px; box-shadow: var(--shadow);
  font-weight: 600; font-size: .9rem; animation: slideIn .2s ease; max-width: 340px;
}
.toast.err { background: var(--danger); color: #fff; }
.toast.ok { background: var(--grad); color: #fff; }
@keyframes slideIn { from { transform: translateY(12px); opacity: 0; } }

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--accent-soft), var(--bg-tint));
  border: 1px solid var(--border); border-radius: 24px; padding: 32px 30px; margin-bottom: 24px;
}
.hero::after {
  content: ""; position: absolute; inset-inline-start: -60px; top: -60px; width: 240px; height: 240px;
  background: var(--grad); filter: blur(70px); opacity: .28; border-radius: 50%;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: .82rem;
  color: var(--accent-strong); background: color-mix(in srgb, var(--accent) 15%, transparent);
  padding: 5px 13px; border-radius: 999px; margin-bottom: 12px; position: relative;
}
.hero h1 { margin: 0 0 8px; font-size: 2.1rem; position: relative; }
.hero p { margin: 0; color: var(--muted); max-width: 580px; position: relative; }
.hero .grad-word { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- Hero v2 + booking-style search box (Israir-inspired) ---- */
.hero-v2 {
  text-align: center; padding: 44px 24px 44px; border-radius: 26px; position: relative; overflow: hidden;
  background:
    radial-gradient(700px 300px at 80% -40px, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    linear-gradient(160deg, var(--accent-soft), var(--bg-tint));
  border: 1px solid var(--border);
}
.hero-v2 .hero-eyebrow { margin: 0 auto 12px; }
.hero-v2 h1 { font-size: 2.3rem; margin: 0 0 10px; }
.hero-v2 p { color: var(--muted); max-width: 540px; margin: 0 auto; }
.grad-word { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.search-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow);
  padding: 16px; margin: -32px 0 20px; position: relative; z-index: 2;
}
.sb-grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.sb-field { flex: 1 1 148px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sb-field.sb-search { flex: 2 1 230px; }
.sb-field label { font-size: .74rem; font-weight: 700; color: var(--muted); padding-inline-start: 3px; }
.sb-field input, .sb-field select { height: 46px; }
.sb-go {
  flex: 0 0 auto; height: 46px; padding: 0 28px; border: none; border-radius: 12px; background: var(--grad);
  color: #fff; font: inherit; font-weight: 700; cursor: pointer; align-self: flex-end;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 34%, transparent); transition: filter .15s, transform .06s;
}
.sb-go:hover { filter: brightness(1.06); }
.sb-go:active { transform: translateY(1px); }

.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 2px 18px; flex-wrap: wrap; }
.results-bar .muted { font-size: .95rem; }
.rb-actions { display: flex; align-items: center; gap: 8px; }
.rb-sortlabel { font-size: .85rem; color: var(--muted); font-weight: 600; }
.rb-sort { height: 38px; padding: 0 12px; width: auto; }

/* ---- Netflix-style shelves on the home page ---- */
.shelf { margin-bottom: 30px; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.shelf-head h3 { margin: 0; font-size: 1.2rem; }
.shelf-row {
  display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 12px;
  scroll-snap-type: x proximity; scrollbar-width: thin;
}
.shelf-row::-webkit-scrollbar { height: 8px; }
.shelf-row::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.shelf-row .item-card { flex: 0 0 236px; scroll-snap-align: start; }
@media (max-width: 720px) { .shelf-row .item-card { flex: 0 0 74%; } }

.wanted-editor .we-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.wanted-editor .we-row select { flex: 1; }
.wanted-editor .we-row.dup select { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger-soft); }
.inline-warn { background: var(--danger-soft); color: var(--danger); padding: 8px 12px; border-radius: 10px; font-size: .85rem; margin: 2px 0 8px; font-weight: 600; }
.upload-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.upload-row label.btn { cursor: pointer; }
.file-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.file-preview .fp { position: relative; width: 68px; height: 68px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.file-preview .fp img { width: 100%; height: 100%; object-fit: cover; }
.file-preview .fp-x {
  position: absolute; top: 2px; inset-inline-end: 2px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: rgba(0, 0, 0, .6); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.file-preview .fp-x:hover { background: var(--danger); }
.file-preview .fp.sel { outline: 2px solid var(--accent); border-color: var(--accent); }
.detail .gallery .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Favourite heart overlay on the photo ---- */
.thumb-wrap { position: relative; }
.fav-heart {
  position: absolute; top: 10px; inset-inline-start: 10px; width: 36px; height: 36px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 1.15rem; line-height: 1; z-index: 2;
  background: color-mix(in srgb, var(--surface) 90%, transparent); color: #9aa0ab;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.18);
  transition: transform .12s, color .12s;
}
.fav-heart:hover { transform: scale(1.12); }
.fav-heart.on { color: var(--accent); }
.share-btn {
  position: absolute; top: 10px; inset-inline-end: 10px; width: 36px; height: 36px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 1rem; line-height: 1; z-index: 2;
  background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--accent-strong);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.18);
  transition: transform .12s;
}
.share-btn:hover { transform: scale(1.12); }
.ic-share { width: 18px; height: 18px; display: block; }
.btn .ic-share { width: 16px; height: 16px; }
.fav-btn.on { color: var(--accent); border-color: var(--accent); }

/* ---- Category tiles (compact, single scrolling row) ---- */
.cat-tiles { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 22px; scrollbar-width: thin; }
.cat-tile {
  flex: 0 0 auto; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 6px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 13px; cursor: pointer; transition: transform .14s, border-color .14s, box-shadow .14s;
}
.cat-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.cat-tile.active { border-color: var(--accent); background: var(--accent-soft); }
.cat-tile .ct-ico { font-size: 1.2rem; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border-radius: 50%; }
.cat-tile.active .ct-ico { background: var(--surface); }
.cat-tile .ct-name { font-size: .72rem; font-weight: 650; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 66px; }

/* ---- Map ---- */
.map-filters { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.map-filters select, .map-filters input { min-width: 0; height: 42px; }
.map-filters #mapCat, .map-filters #mapCity { flex: 1 1 140px; }
.map-panel { height: 62vh; min-height: 440px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); z-index: 0; }
.map-filters #mapCityGo { flex: 0 0 auto; }

/* Custom city dropdown (same on desktop & mobile — replaces native datalist) */
.ac-list { position: fixed; z-index: 1300; max-height: 264px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; }
.ac-item { padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-item:hover, .ac-item.on { background: var(--accent-soft); color: var(--accent-strong); }

/* self-contained SVG map */
.svgmap-wrap { position: relative; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.svgmap { width: 100%; height: 100%; display: block; }
.svgmap .sea { fill: color-mix(in srgb, var(--accent) 11%, var(--surface-2)); }
.svgmap .land { fill: var(--accent-soft); stroke: var(--accent); stroke-width: .8; stroke-linejoin: round; }
.svgmap .mk { fill: var(--accent); stroke: #fff; stroke-width: .8; cursor: pointer; transition: fill .12s; }
.svgmap .mk:hover { fill: var(--accent-strong); }
.svgmap .citypin { fill: var(--accent-2); stroke: #fff; stroke-width: .6; }
.svgmap .citypin-ring { fill: color-mix(in srgb, var(--accent-2) 22%, transparent); stroke: var(--accent-2); stroke-width: .6; }
.map-tip { position: absolute; z-index: 10; transform: translate(-50%, -100%); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 8px 10px; display: flex; gap: 8px; align-items: center; pointer-events: none; max-width: 240px; }
.map-tip .mt-thumb { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; flex: none; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.map-tip .mt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.map-tip b { display: block; font-size: .85rem; }
.minimap-wrap { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.minimap { height: 170px; z-index: 0; cursor: pointer; }
.minimap-open {
  position: absolute; bottom: 10px; inset-inline-start: 10px; z-index: 500;
  background: var(--surface); color: var(--accent-strong); border: 1px solid var(--border); border-radius: 9px;
  padding: 6px 11px; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm);
}
.minimap-open:hover { background: var(--surface-2); border-color: var(--accent); }
.leaflet-container { font: inherit; background: var(--surface-2); }
.leaflet-control-attribution { font-size: .7rem; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 11px 13px; font-size: .9rem; }
.map-pop { display: flex; gap: 10px; align-items: center; min-width: 190px; }
.map-pop .mp-thumb { width: 54px; height: 54px; border-radius: 10px; overflow: hidden; flex: none; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.map-pop .mp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.map-pop b { display: block; margin-bottom: 2px; }
.leaflet-bar a { background: var(--surface); color: var(--text); border-color: var(--border); }
.leaflet-bar a:hover { background: var(--surface-2); }

/* ---- User menu ---- */
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 9px; background: none; border: 1px solid var(--border); cursor: pointer; padding: 5px 12px 5px 7px; border-radius: 13px; color: var(--text); font: inherit; }
.user-btn:hover { background: var(--surface-2); border-color: var(--accent); }
.user-btn .user-name { font-weight: 700; font-size: 1.02rem; }
.user-btn .user-caret { font-size: .72rem; color: var(--muted); }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: 224px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; z-index: 40; animation: pop .16s ease;
}
.ud-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: flex; flex-direction: column; gap: 1px; }
.ud-head b { font-size: .95rem; }
.ud-head .muted { font-size: .78rem; }
.user-dropdown a, .ud-logout, .ud-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 10px 11px; border-radius: 9px; color: var(--text); font: inherit; font-size: .92rem; background: none; border: none; cursor: pointer; }
.user-dropdown a:hover, .ud-logout:hover, .ud-item:hover { background: var(--surface-2); }
.ud-ico { flex: none; width: 22px; text-align: center; font-size: 1.02rem; }
.ud-logout { color: var(--danger); margin-top: 5px; border-top: 1px solid var(--border); border-radius: 0; padding-top: 11px; }

/* ---- Footer (multi-column) ---- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 56px; }
.footer-cols { max-width: 1160px; margin: 0 auto; padding: 40px 22px 26px; display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.2fr; gap: 30px; }
.footer-brand p { color: var(--muted); font-size: .9rem; margin: 10px 0 0; max-width: 280px; line-height: 1.7; }
.footer-brand b { color: var(--accent-strong); }
.footer-col h4 { font-size: .95rem; margin: 2px 0 13px; }
.footer-col a, .footer-col span { display: block; color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.footer-col a:hover { color: var(--accent-strong); }
.footer-social { display: inline-flex; align-items: center; gap: 7px; }
.profile-locked { opacity: .55; cursor: not-allowed; }
.deal-banner { background: var(--ok-soft); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); border-radius: 12px; padding: 11px 14px; font-size: .92rem; line-height: 1.55; margin-bottom: 12px; }
.deal-banner b { color: var(--ok); }
.footer-bottom {
  border-top: 1px solid var(--border); max-width: 1160px; margin: 0 auto; padding: 15px 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .85rem;
}
.footer-tag { color: var(--accent-strong); font-weight: 700; }

/* subtle card image zoom on hover (Israir-clean) */
.item-card .thumb { transition: transform .2s; }
.item-card:hover .thumb img { transform: scale(1.05); transition: transform .35s ease; }
.item-card .thumb img { transition: transform .35s ease; }

@media (max-width: 720px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 22px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---- Info / legal pages ---- */
.page-doc { max-width: 760px; margin: 0 auto; }
.page-doc h1 { margin: 12px 0 18px; font-size: 1.7rem; }
.page-doc h2 { font-size: 1.12rem; margin: 24px 0 8px; }
.page-doc p, .page-doc li { color: var(--text); line-height: 1.7; }
.page-doc ul { padding-inline-start: 22px; }
.page-doc li { margin-bottom: 6px; }

/* ---- Accessibility widget ---- */
#a11y { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 70; }
.a11y-btn {
  width: 50px; height: 50px; border-radius: 50%; border: none; cursor: pointer; background: var(--grad);
  color: #fff; font-size: 1.55rem; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; transition: transform .12s;
}
.a11y-btn:hover { transform: scale(1.07); }
.a11y-panel {
  position: absolute; bottom: 62px; inset-inline-end: 0; width: 248px; max-height: 76vh; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 14px; animation: pop .18s ease;
}
.a11y-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 1.05rem; }
.a11y-intro { font-size: .78rem; color: var(--muted); margin: 0 0 12px; line-height: 1.4; }
.a11y-x { background: none; border: none; font-size: 1.35rem; cursor: pointer; color: var(--muted); line-height: 1; }
.a11y-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: .9rem; font-weight: 600; }
.a11y-size { display: flex; align-items: center; gap: 6px; }
.a11y-size button { width: 36px; height: 32px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; cursor: pointer; font-weight: 800; color: var(--text); }
.a11y-size button:hover { border-color: var(--accent); }
.a11y-size span { font-size: .78rem; color: var(--muted); min-width: 60px; text-align: center; }
.a11y-opt, .a11y-reset { display: block; width: 100%; text-align: start; padding: 10px 12px; margin-top: 7px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; cursor: pointer; font: inherit; font-size: .9rem; color: var(--text); }
.a11y-opt:hover { border-color: var(--accent); }
.a11y-opt.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); font-weight: 650; }
.a11y-reset { text-align: center; color: var(--muted); margin-top: 12px; font-size: .84rem; }

/* accessibility modes */
.a11y-links a { text-decoration: underline !important; }
.a11y-nomotion, .a11y-nomotion * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.a11y-contrast { --muted: var(--text); --border: #4b4b4b; }
.a11y-contrast .card, .a11y-contrast .list-card, .a11y-contrast input, .a11y-contrast select, .a11y-contrast .filterbar { border-color: #4b4b4b; }
.a11y-grayscale { filter: grayscale(1); }
.a11y-saturate { filter: saturate(1.7); }
.a11y-invert { filter: invert(1) hue-rotate(180deg); }
.a11y-invert img, .a11y-invert .thumb img, .a11y-invert .map-pop img, .a11y-invert .leaflet-tile { filter: invert(1) hue-rotate(180deg); }
.a11y-readable, .a11y-readable * { font-family: Arial, "Segoe UI", "Helvetica Neue", sans-serif !important; }
.a11y-spacing p, .a11y-spacing li, .a11y-spacing .card-title, .a11y-spacing label, .a11y-spacing a, .a11y-spacing .chip { letter-spacing: .035em !important; word-spacing: .12em !important; line-height: 1.85 !important; }
.a11y-bigcursor, .a11y-bigcursor * { cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='36'%20height='36'%20viewBox='0%200%2036%2036'%3E%3Cpath%20d='M6%203L6%2030L13%2023L18%2034L23%2032L18%2021L28%2021Z'%20fill='%23000'%20stroke='%23fff'%20stroke-width='2'/%3E%3C/svg%3E") 6 3, auto !important; }

/* Hamburger + mobile menu are hidden on desktop (nav shows inline instead). */
.hamburger, .mobile-menu { display: none; }

@media (max-width: 720px) {
  .detail { grid-template-columns: 1fr; }
  .nav a span.label { display: none; }
  .page-head h1 { font-size: 1.4rem; }
  .hero h1 { font-size: 1.7rem; }
  .cat-tile { width: 66px; }

  /* Mobile header: logo + wordmark on the right; add-item + hamburger on the left.
     All nav links move into the hamburger menu. */
  .topbar-inner { padding: 9px 12px; gap: 8px; }
  .logo-word { display: inline !important; font-size: 1.35rem; }
  .brand svg.logo-icon, .logo-icon { width: 40px; height: 40px; }
  .nav { flex-wrap: nowrap; gap: 6px; min-width: 0; }
  .nav-scroll { display: none !important; }
  .user-menu { display: none !important; }
  .nav .nav-post { flex: 0 0 auto; margin-inline-start: 0 !important; }
  .nav-post .label { display: inline !important; }
  .hamburger {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 1.3rem; cursor: pointer;
  }
  .mobile-menu[hidden] { display: none; }
  .mobile-menu:not([hidden]) {
    display: flex; flex-direction: column; gap: 2px;
    position: fixed; top: 64px; inset-inline: 12px; z-index: 90;
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: var(--shadow); padding: 8px; max-height: 78vh; overflow-y: auto;
    animation: pop .16s ease;
  }
  .mobile-menu .mm-link {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: start;
    padding: 12px 14px; border-radius: 10px; color: var(--text); background: none; border: none;
    font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
  }
  .mobile-menu .mm-link:hover, .mobile-menu .mm-link:active { background: var(--surface-2); }
  .mobile-menu .mm-link.active { color: var(--accent-strong); background: var(--accent-soft); }
  .mobile-menu .mm-logout { color: var(--danger); }
  .mobile-menu .mm-sep { height: 1px; background: var(--border); margin: 6px 4px; }
  .mobile-menu .mm-user { display: flex; align-items: center; gap: 10px; padding: 8px 12px 10px; }
  .mobile-menu .badge-count { margin-inline-start: auto; }
}

/* Password show/hide eye toggle */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-inline-end: 40px; font-family: inherit; font-size: inherit; letter-spacing: normal; }
.pw-eye {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1.1rem; line-height: 1;
  opacity: .55; padding: 4px;
}
.pw-eye:hover { opacity: 1; }

/* Unverified-account banner (under the top bar) */
.verify-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  background: #fff7ed; color: #9a3412; border-bottom: 1px solid #fed7aa;
  padding: 9px 14px; font-size: .9rem; font-weight: 600;
}
.verify-banner .vb-btn {
  background: #ea580c; color: #fff; border: none; border-radius: 8px;
  padding: 6px 14px; font-weight: 700; cursor: pointer;
}
.verify-banner .vb-btn:hover { background: #c2410c; }
.verify-banner .vb-btn:disabled { opacity: .6; cursor: default; }
.verify-banner .vb-close { background: none; border: none; color: #9a3412; cursor: pointer; font-size: 1rem; opacity: .6; }
.verify-banner .vb-close:hover { opacity: 1; }

/* Branded loading splash (covers first paint until fonts are ready — hides logo FOUT) */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg, #f8fafc); transition: opacity .4s ease;
}
#splash.hide { opacity: 0; pointer-events: none; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.splash-logo { width: 92px; height: 92px; animation: splashSpin 1.6s linear infinite; transform-origin: 50% 50%; }
.splash-word { font-family: "TachlifBrand", "Segoe UI", Arial, sans-serif; font-size: 2rem; color: var(--accent-strong, #0f766e); line-height: 1; }
@keyframes splashSpin { to { transform: rotate(360deg); } }
@keyframes splashPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* תָו (token) UI */
.token-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent-soft, #ccfbf1); color: var(--accent-strong, #0f766e);
  font-weight: 800; border-radius: 999px; padding: 5px 12px; font-size: .95rem;
  margin-inline-start: 6px; text-decoration: none; white-space: nowrap;
  border: none; cursor: pointer; font-family: inherit;
}
.token-pill:hover { filter: brightness(.97); }
.token-chip { background: var(--accent-soft, #ccfbf1) !important; color: var(--accent-strong, #0f766e) !important; font-weight: 700; }
.token-take {
  background: var(--accent-soft, #ccfbf1); color: var(--accent-strong, #0f766e);
  border: 1px solid var(--accent, #14b8a6); font-weight: 800;
}
.token-take:hover:not(:disabled) { background: #99f6e4; }
.token-take:disabled { opacity: .55; cursor: default; }
.ud-tokens { display: block; width: calc(100% - 16px); box-sizing: border-box; text-align: start; padding: 8px 14px; font-size: .85rem; font-weight: 700; color: var(--accent-strong, #0f766e); background: var(--accent-soft, #ccfbf1); border: none; border-radius: 8px; margin: 0 8px 6px; cursor: pointer; font-family: inherit; }
.ud-tokens:hover { filter: brightness(.97); }
.ud-tokens .ud-tok-main { display: block; font-size: .9rem; }
.ud-tokens .ud-tok-sub { display: block; font-size: .72rem; font-weight: 600; opacity: .72; margin-top: 2px; }
.mm-tokens { padding: 8px 12px; font-weight: 700; color: var(--accent-strong, #0f766e); }

/* Help floating button + help center */
.help-fab {
  position: fixed; bottom: 84px; inset-inline-end: 22px; z-index: 70;
  width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
  background: var(--surface); color: var(--accent-strong); font-size: 1.45rem; font-weight: 800;
  box-shadow: var(--shadow); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center; transition: transform .12s;
}
.help-fab:hover { transform: scale(1.08); }
.help-list { max-height: 58vh; overflow-y: auto; margin: 4px -2px 0; padding: 0 2px; }
.help-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.help-item summary { cursor: pointer; padding: 12px 14px; font-weight: 700; list-style: none; background: var(--surface-2); }
.help-item summary::-webkit-details-marker { display: none; }
.help-item[open] summary { color: var(--accent-strong); }
.help-a { padding: 4px 14px 14px; line-height: 1.75; font-size: .92rem; color: var(--text); }

/* First-visit onboarding tour */
.onb { text-align: center; padding: 6px 2px; }
.onb-emoji { font-size: 3rem; line-height: 1; }
.onb-dots { display: flex; gap: 6px; justify-content: center; }
.onb-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: .2s; }
.onb-dots span.on { background: var(--accent); width: 22px; border-radius: 5px; }
