/* FindForCheap: dark by default (TikTok crowd, phone-first), light when the phone asks for it.
   Owner is visually impaired: strong contrast, big prices, big tap targets. */
:root {
  --bg: #0E0E10;
  --bg2: #17171B;
  --card: #1C1C21;
  --line: #2E2E35;
  --text: #FFFFFF;
  --text2: #C9C9D1;
  --accent: #FFC400;
  --accentInk: #111111;
  --hot: #FF5A36;
  --good: #38D39F;
  --pic: #FFFFFF;
  --r: 16px;
  --gutter: clamp(16px, 5vw, 64px);   /* side margin: 16px on phones, up to 64px on desktop */
  --maxw: 1360px;
  --shadow: 0 1px 0 rgba(255,255,255,.04), 0 10px 30px rgba(0,0,0,.35);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F4F4F1;
    --bg2: #FFFFFF;
    --card: #FFFFFF;
    --line: #DEDED8;
    --text: #0D0D0F;
    --text2: #3D3D45;
    --hot: #E0401C;
    --good: #0B8A5E;
    --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 150px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar { max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 10px var(--gutter) 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 850; font-size: 22px; letter-spacing: -.02em; }
.logo .mark { display: flex; }
.logo b { color: var(--accent); font-weight: 850; }
.search { flex: 1 1 320px; order: 2; position: relative; display: flex; align-items: center; min-width: 0; }
.search .sicon { position: absolute; left: 14px; color: var(--text2); pointer-events: none; }
.search input {
  width: 100%; height: 46px; padding: 0 16px 0 44px; border-radius: 999px; border: 2px solid var(--line);
  background: var(--bg2); color: var(--text); font-size: 17px; outline: none;
}
.search input:focus { border-color: var(--accent); }
.search input::placeholder { color: var(--text2); opacity: .85; }
.saved-btn {
  order: 1; margin-left: auto; display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px;
  border-radius: 999px; border: 2px solid var(--line); text-decoration: none; font-weight: 700; font-size: 16px;
}
.saved-btn .count { background: var(--accent); color: var(--accentInk); border-radius: 999px; min-width: 24px; height: 24px; padding: 0 7px; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.saved-btn.on { border-color: var(--accent); }
@media (min-width: 760px) { .search { order: 1; } .saved-btn { order: 2; margin-left: 0; } }

.cats { max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 4px var(--gutter) 10px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; display: flex; align-items: center; gap: 7px; height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--bg2); border: 2px solid var(--line); text-decoration: none; font-weight: 750; font-size: 17px; white-space: nowrap;
}
.cat .n { color: var(--text2); font-weight: 600; font-size: 14px; }
.cat.on { background: var(--accent); border-color: var(--accent); color: var(--accentInk); }
.cat.on .n { color: var(--accentInk); opacity: .75; }

/* ---------- page ---------- */
main { max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 22px var(--gutter) 56px; outline: none; min-height: 60vh; }
.loading { padding: 80px 0; text-align: center; color: var(--text2); font-size: 19px; }
.hero { padding: 18px 0 8px; }
.hero h1 { font-size: clamp(30px, 6.4vw, 54px); line-height: 1.04; margin: 0 0 10px; letter-spacing: -.03em; font-weight: 900; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 0; color: var(--text2); font-size: 18px; max-width: 640px; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; font-weight: 700; font-size: 15px; }
.stat b { color: var(--accent); font-size: 18px; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 22px 0 8px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
.tile { position: relative; display: block; border-radius: var(--r); overflow: hidden; text-decoration: none; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tile .pics { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); aspect-ratio: 1; }
.tile .pics img { width: 100%; height: 100%; object-fit: contain; background: var(--pic); }
.tile .lbl { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 0; }
.tile .lbl b { font-size: 19px; white-space: nowrap; }
.tile .lbl span { color: var(--text2); font-size: 14px; font-weight: 600; }

h2.sec { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-size: 25px; letter-spacing: -.02em; margin: 30px 0 12px; font-weight: 850; }
h2.sec small { font-size: 15px; color: var(--text2); font-weight: 600; letter-spacing: 0; }
h2.sec a.more { margin-left: auto; font-size: 16px; color: var(--accent); text-decoration: none; font-weight: 750; white-space: nowrap; }
.page-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 6px 0 4px; }
.page-h h1 { margin: 0; font-size: clamp(28px, 5vw, 40px); letter-spacing: -.03em; font-weight: 900; }
.page-h .sub { color: var(--text2); font-size: 16px; font-weight: 600; }
.note { color: var(--text2); margin: 4px 0 0; font-size: 16px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; position: sticky; top: var(--chipsTop, 132px); z-index: 10; background: var(--bg); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 42px; padding: 0 15px; border-radius: 999px; border: 2px solid var(--line); background: var(--bg2); cursor: pointer; font-weight: 700; font-size: 16px; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.chip.on { border-color: var(--text); background: var(--text); color: var(--bg); }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; } }
.card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.card .pic { position: relative; display: block; aspect-ratio: 1; background: var(--pic); }
.card .pic img { width: 100%; height: 100%; object-fit: contain; }
.ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg2); color: var(--text); font-weight: 750; font-size: 15px; text-align: center; padding: 12px; }
.ph-i { font-size: 44px; line-height: 1; }
.badges { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.badge { font-size: 13px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: #111; color: #fff; line-height: 1.2; }
.badge.hot { background: var(--hot); color: #fff; }
.badge.top { background: var(--accent); color: #111; }
.heart { position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(17,17,17,.78); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.heart.on { color: var(--hot); background: #fff; }
.heart.on svg path { fill: currentColor; }
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .name { font-weight: 750; font-size: 17px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; margin: 0; }
.card .meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-height: 28px; }
.price { font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.price small { font-size: 13px; font-weight: 700; color: var(--text2); letter-spacing: 0; margin-right: 2px; }
.flip { font-size: 15px; font-weight: 800; color: var(--good); }
.sold { font-size: 14px; color: var(--text2); font-weight: 650; }
.btns { display: flex; gap: 8px; margin-top: auto; }
.buy { flex: 1; min-width: 0; white-space: nowrap; height: 48px; border-radius: 12px; background: var(--accent); color: var(--accentInk); font-weight: 850; font-size: 17px; display: flex; align-items: center; justify-content: center; text-decoration: none; gap: 6px; }
.buy:active { transform: translateY(1px); }
.vid { flex: none; width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.vid:hover { border-color: var(--text); }
.budget { height: 44px; border-radius: 12px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center;
  gap: 6px; text-decoration: none; font-weight: 750; font-size: 16px; color: var(--text2); }
.budget b { color: var(--good); font-weight: 850; }
.budget:hover { border-color: var(--text); color: var(--text); }
.empty { padding: 60px 10px; text-align: center; color: var(--text2); font-size: 18px; }
.empty b { color: var(--text); display: block; font-size: 22px; margin-bottom: 6px; }
.howto { margin-top: 26px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 12px; }
@media (min-width: 760px) { .howto { grid-template-columns: repeat(3, 1fr); } }
.howto div { display: flex; gap: 12px; align-items: flex-start; }
.howto .num { flex: none; width: 36px; height: 36px; border-radius: 999px; background: var(--accent); color: #111; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.howto b { display: block; font-size: 17px; }
.howto span { color: var(--text2); font-size: 15px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--bg2); }
.foot-in { max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 30px var(--gutter) 40px; }
.foot-cols { display: grid; gap: 22px; }
@media (min-width: 760px) { .foot-cols { grid-template-columns: repeat(3, 1fr); } }
.foot h3 { margin: 0 0 8px; font-size: 17px; }
.foot a { display: flex; align-items: center; min-height: 40px; text-decoration: none; font-weight: 600; color: var(--text); }
.foot a:hover { text-decoration: underline; }
.sheet-links { display: flex; flex-wrap: wrap; gap: 0 14px; }
.legal { color: var(--text2); font-size: 14px; margin: 18px 0 0; max-width: 820px; }
.toTop { position: fixed; right: 16px; bottom: 18px; z-index: 30; width: 52px; height: 52px; border-radius: 999px; border: 0; background: var(--accent); color: #111; font-size: 24px; font-weight: 900; box-shadow: 0 8px 24px rgba(0,0,0,.35); cursor: pointer; display: none; }
.toTop.show { display: block; }

/* ---------- find numbers ---------- */
.fnum { align-self: flex-start; font-size: 14px; font-weight: 850; color: var(--accent); text-decoration: none; letter-spacing: .02em; margin-bottom: -4px; }
.fnum:hover { text-decoration: underline; }
.numbox { margin-top: 16px; max-width: 420px; }
.numbox label { display: block; margin-bottom: 8px; font-size: 17px; }
.numrow { display: flex; align-items: center; gap: 8px; background: var(--bg2); border: 2px solid var(--line); border-radius: 14px; padding: 4px 4px 4px 14px; }
.numrow:focus-within { border-color: var(--accent); }
.numrow span { font-size: 22px; font-weight: 900; color: var(--accent); }
.numrow input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; color: var(--text); font-size: 22px; font-weight: 800; outline: none; }
.numrow button { height: 44px; padding: 0 22px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accentInk); font-weight: 850; font-size: 17px; cursor: pointer; }
.grid.one { grid-template-columns: minmax(0, 340px); }

/* ---------- show more ---------- */
.more-wrap { display: flex; justify-content: center; padding: 18px 0 6px; }
.more-btn { height: 48px; padding: 0 26px; border-radius: 999px; border: 2px solid var(--line); background: var(--bg2); font-weight: 800; font-size: 16px; cursor: pointer; }
.more-btn:hover { border-color: var(--text); }
.card { content-visibility: auto; contain-intrinsic-size: auto 420px; }

/* ---------- phone tab bar ---------- */
.tabbar { display: none; }
@media (max-width: 759px) {
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: color-mix(in srgb, var(--bg2) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px;
    text-decoration: none; color: var(--text2); font-size: 13px; font-weight: 750; border-radius: 12px; }
  .tabbar a.on { color: var(--accent); }
  .saved-btn { display: none; }
  .search { order: 2; flex-basis: 100%; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .toTop { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* ---------- share, new, price filters ---------- */
.toprow { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: -4px; }
.toprow .fnum { margin-bottom: 0; }
.share { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 10px; border-radius: 10px; border: 2px solid var(--line);
  background: transparent; font-size: 14px; font-weight: 750; cursor: pointer; color: var(--text); }
.share:hover { border-color: var(--text); }
@media (max-width: 420px) { .share span { display: none; } .share { width: 40px; padding: 0; justify-content: center; } }
.badge.new { background: #7C5CFF; color: #fff; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 0; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: none; height: 42px; padding: 0 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2);
  display: inline-flex; align-items: center; text-decoration: none; font-weight: 800; font-size: 16px; white-space: nowrap; }
.filter.on { background: var(--accent); border-color: var(--accent); color: var(--accentInk); }
#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); z-index: 60;
  background: var(--text); color: var(--bg); font-weight: 800; font-size: 16px; padding: 12px 18px; border-radius: 12px; opacity: 0;
  pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 760px) { #toast { bottom: 28px; } }

/* ---------- Disclaimer & Terms ---------- */
.legal-page { max-width: 760px; }
.legal-page .lead { font-size: 20px; font-weight: 750; margin: 14px 0 6px; }
.legal-page h2 { font-size: 21px; margin: 26px 0 6px; }
.legal-page p, .legal-page li { color: var(--text2); font-size: 17px; line-height: 1.6; }
.legal-page ul { padding-left: 22px; margin: 6px 0; }
.legal-page a { color: var(--accent); font-weight: 750; }
.legal .terms-link { display: inline; min-height: 0; color: var(--accent); font-weight: 800; text-decoration: underline; }

/* ---------- bolder home header + Pick of the week ---------- */
.hero2 { display: grid; gap: 22px; align-items: start; }
@media (min-width: 900px) { .hero2 { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; } }
.kicker { margin: 0 0 8px; color: var(--accent); font-weight: 850; letter-spacing: .12em; text-transform: uppercase; font-size: 14px; }
.hero2 h1 { font-size: clamp(38px, 9vw, 74px); line-height: .98; text-transform: uppercase; letter-spacing: -.035em; }
.paste-hint { margin-top: 12px !important; font-size: 16px !important; }
.paste-hint a { color: var(--accent); font-weight: 800; }
.pick { position: relative; }
.pick-label { display: inline-block; margin-bottom: 8px; font-weight: 900; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 899px) { .pick .card { max-width: 340px; } }

/* ---------- promo banner ---------- */
.banner { margin: 22px 0 6px; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--r); scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; min-height: 150px; padding: 20px 22px; display: flex; flex-direction: column; justify-content: center;
  gap: 4px; text-decoration: none; color: #fff; position: relative; }
.slide .s-k { font-size: 13px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.slide .s-t { font-size: clamp(24px, 5vw, 34px); line-height: 1.05; font-weight: 900; letter-spacing: -.02em; }
.slide .s-x { font-size: 16px; font-weight: 600; opacity: .95; }
.slide .s-b { align-self: flex-start; margin-top: 10px; background: #fff; color: #111; font-weight: 900; padding: 10px 18px; border-radius: 999px; font-size: 16px; }
.s-coupon { background: linear-gradient(120deg, #FFC400, #FF8A00); color: #111; }
.s-coupon .s-b { background: #111; color: #fff; }
.s-tg { background: linear-gradient(120deg, #1C8ED6, #2AABEE); }
.s-yt { background: linear-gradient(120deg, #C4001F, #FF0033); }
.dots { display: flex; justify-content: center; gap: 8px; padding: 10px 0 0; }
.dots button { width: 12px; height: 12px; border-radius: 999px; border: 0; background: var(--line); cursor: pointer; padding: 0; }
.dots button.on { background: var(--accent); width: 28px; }

/* ---------- ranks + variety tags ---------- */
.rank { position: absolute; left: 8px; top: calc(var(--rankTop, 0px) + 8px); z-index: 2; display: none; }
.card .rank { display: flex; align-items: center; justify-content: center; left: auto; right: 58px; top: 10px; min-width: 40px; height: 40px; padding: 0 8px;
  border-radius: 12px; background: var(--accent); color: #111; font-weight: 950; font-size: 22px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.vtag { font-size: 13px; font-weight: 800; padding: 3px 9px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--text); white-space: nowrap; }

/* ---------- paste a link ---------- */
.pastebox { display: flex; gap: 8px; margin: 14px 0; max-width: 680px; }
.pastebox input { flex: 1; min-width: 0; height: 52px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg2); color: var(--text); font-size: 17px; outline: none; }
.pastebox input:focus { border-color: var(--accent); }
.pastebox button { height: 52px; padding: 0 22px; border-radius: 14px; border: 0; background: var(--accent); color: var(--accentInk); font-weight: 900; font-size: 17px; cursor: pointer; }
.pasting { padding: 18px 0; font-size: 18px; font-weight: 750; }
.pasted { max-width: 520px; display: grid; gap: 8px; padding: 18px; border-radius: var(--r); border: 2px solid var(--accent); background: var(--bg2); }
.pasted b { font-size: 20px; }
.pasted span { color: var(--text2); }
.muted { color: var(--text2); font-weight: 600; }
/* fix 2026-11-17: the header's grid column grew wider than a phone screen */
.hero2 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .hero2 { grid-template-columns: minmax(0, 1fr) 320px; } }
.hero2 > * { min-width: 0; }
.hero2 .kicker { color: var(--accent); }
/* rank number sits in the badge column (top-left) instead of over the badges */
.card .rank { position: static; display: flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 8px;
  border-radius: 12px; background: var(--accent); color: #111; font-weight: 950; font-size: 22px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
