/* Aixplor — design system v5: warm minimal, ranked list layout, terracotta accent */
@font-face {
  font-family: "Poppins Fallback"; src: local("Arial");
  ascent-override: 92.33%; descent-override: 30.78%; line-gap-override: 8.79%; size-adjust: 113.73%;
}
:root {
  --bg: #fdfbf9; --surface: #ffffff; --soft: #f6f1ed; --soft2: #efe8e3;
  --txt: #1d1b19; --dim: #6e6863; --dim2: #a39c96;
  --line: #ece5df; --line2: #ddd4cd;
  --acc: #d2704f; --acc-ink: #ffffff; --acc-dim: #e9a58d;
  --hot1: #f8e4dd; --hot2: #faebe5; --hot3: #fcf3ef;
  --live: #2fa84f;
  --shadow: 0 24px 60px -28px rgba(60,35,20,.28);
  --shadow-sm: 0 8px 24px -14px rgba(60,35,20,.22);
  --r: 22px; --r-sm: 14px;
  --ease: cubic-bezier(.22,.8,.3,1);
  --font: "Poppins", "Poppins Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #161412; --surface: #1e1b19; --soft: #24201d; --soft2: #2d2825;
  --txt: #f3eee9; --dim: #aaa29b; --dim2: #776f69;
  --line: #2c2724; --line2: #3a3430;
  --acc: #e5866a; --acc-ink: #1a1210; --acc-dim: #8f4f3b;
  --hot1: #33231e; --hot2: #2c211d; --hot3: #251e1b;
  --shadow: 0 24px 60px -24px rgba(0,0,0,.7);
  --shadow-sm: 0 8px 24px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body {
  font-family: var(--font); background: var(--bg); color: var(--txt);
  line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
h1, h2, h3 { font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: 0; }
input, select, textarea { font: inherit; color: var(--txt); }
select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a39c96' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: calc(100% - 16px) 50%; padding-right: 40px !important;
}
::selection { background: var(--acc); color: var(--acc-ink); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.svg { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ci { display: inline-flex; color: var(--acc); opacity: .75; font-size: 1.05em; }
.ico { stroke-width: 1.8; }

/* ═══ header ═══ */
#header { position: sticky; top: 0; z-index: 60; background: var(--bg); }
.topnav-in { display: flex; align-items: center; gap: 16px; padding: 18px 0 14px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-size: 25px; font-weight: 500; letter-spacing: -.04em; }
.logo-mark { width: 30px; height: 30px; color: var(--acc); flex: none; }
.logo b { font-weight: 600; }
.logo i { font-style: normal; color: var(--acc); }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px;
  border: 1px solid var(--line2); font-size: 13px; color: var(--dim); white-space: nowrap; transition: .2s var(--ease);
}
.live-pill:hover { border-color: var(--dim2); }
.live-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 18%, transparent); }
.live-pill .g { color: var(--live); font-weight: 500; }
.live-pill b { color: var(--txt); font-weight: 500; }
.live-pill.m-live { display: none; margin-bottom: 14px; } /* phones only: the header pill has no room there */
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
[dir="rtl"] .nav { margin-left: 0; margin-right: auto; }
.nav > a, .more-btn {
  padding: 7px 13px; border-radius: 99px; color: var(--dim); font-size: 15.5px; font-weight: 400;
  transition: .18s var(--ease); cursor: pointer; white-space: nowrap;
}
.nav > a:hover, .more-btn:hover { color: var(--txt); }
.nav > a.on, .more-btn.on { color: var(--txt); font-weight: 500; }
.head-tools { display: flex; align-items: center; gap: 2px; }
.icon-btn {
  position: relative; width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; font-size: 19px; color: var(--txt); transition: .18s var(--ease);
}
.icon-btn:hover { background: var(--soft); }
.icon-btn.on { color: var(--acc); }
.icon-btn .flag { font-size: 16px; }
.pill {
  position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: var(--acc); color: var(--acc-ink); font-size: 10px; font-weight: 600;
  display: none; place-items: center;
}
.m-tools { display: none; margin-left: auto; gap: 2px; }
[dir="rtl"] .m-tools { margin-left: 0; margin-right: auto; }

/* mobile app chrome: bottom tab bar + "more" sheet (shown ≤880px) */
.tabbar { display: none; }
.sheet-overlay {
  position: fixed; inset: 0; z-index: 120; background: rgba(30,20,14,.38);
  opacity: 0; visibility: hidden; transition: opacity .22s var(--ease), visibility .22s;
}
.sheet-overlay.open { opacity: 1; visibility: visible; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface);
  border-radius: 26px 26px 0 0; padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .28s var(--ease); max-height: 85vh; overflow-y: auto;
}
.sheet-overlay.open .sheet { transform: none; }
.sheet-grab { display: block; width: 40px; height: 5px; border-radius: 9px; background: var(--line2); margin: 0 auto 14px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 18px;
  background: var(--soft); font-size: 13px; font-weight: 500; text-align: center; line-height: 1.25;
}
.sheet-grid a i { font-style: normal; font-size: 22px; }
.sheet-grid a.on { background: var(--hot1); color: var(--acc); }
.sheet-grid a:active { transform: scale(.96); }
.sheet-row { display: flex; gap: 8px; margin-top: 12px; }
.sheet-row select { flex: 1; min-height: 48px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line2); background-color: var(--surface); font-size: 16px; }
.sheet-row .btn-ghost { width: 48px; height: 48px; padding: 0; justify-content: center; font-size: 20px; }
body.locked { overflow: hidden; }

/* dropdowns */
.more-wrap { position: relative; }
.more-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 200px; z-index: 70;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .18s var(--ease);
  max-height: 380px; overflow-y: auto;
}
.more-wrap:hover .more-menu, .more-wrap:focus-within .more-menu { opacity: 1; visibility: visible; transform: none; }
.head-tools .more-menu, .nav .more-menu { left: auto; right: 0; }
[dir="rtl"] .more-menu { left: 0; right: auto; }
.more-menu a { display: block; padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--dim); cursor: pointer; }
.more-menu a:hover { background: var(--soft); color: var(--txt); }
.more-menu a.cur { color: var(--acc); background: var(--soft); }

/* category pill bar */
.catbar-wrap { padding-bottom: 6px; }
.catbar {
  display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 99px; background: var(--soft);
  overflow-x: auto; scrollbar-width: none;
}
.catbar::-webkit-scrollbar { display: none; }
.catbar a {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 99px;
  font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; color: var(--txt); white-space: nowrap; transition: .18s var(--ease); flex: none;
}
.catbar a:hover { background: var(--surface); }
.catbar a.on { background: var(--acc); color: var(--acc-ink); }
.catbar a .ico { font-size: 18px; color: var(--acc); opacity: .7; }
.catbar a.on .ico { color: var(--acc-ink); opacity: 1; }
.catbar a:hover .ico { opacity: 1; }
.catbar .cb-explore { margin-left: auto; color: var(--acc); position: sticky; right: 0; background: var(--soft); box-shadow: -18px 0 14px -6px var(--soft); }
.catbar .cb-explore:hover { background: var(--surface); }

/* ═══ buttons ═══ */
.btn-main {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px;
  border-radius: 99px; border: 0; background: var(--acc); color: var(--acc-ink);
  font-weight: 500; font-size: 16px; transition: .2s var(--ease); white-space: nowrap;
}
.btn-main:hover { filter: brightness(1.06); }
.btn-main.sm { padding: 8px 16px; font-size: 14px; }
.btn-main.full { width: 100%; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 99px;
  border: 1px solid var(--line2); background: var(--surface); color: var(--txt); font-weight: 500; font-size: 14.5px;
  transition: .2s var(--ease);
}
.btn-ghost:hover { border-color: var(--acc); color: var(--acc); }
.chip-btn {
  padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line2); background: var(--surface);
  font-size: 14px; color: var(--dim); transition: .18s var(--ease); white-space: nowrap;
}
.chip-btn:hover { color: var(--txt); border-color: var(--dim2); }
.chip-btn.on { color: var(--acc-ink); background: var(--acc); border-color: var(--acc); }
.chip-btn.tall { padding: 11px 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 99px;
  border: 1px solid var(--line2); background: var(--surface); font-size: 13.5px; color: var(--dim); transition: .16s var(--ease);
}
.chip:hover { color: var(--acc); border-color: var(--acc-dim); }

/* ═══ layout ═══ */
main#app { width: min(1180px, 100% - 32px); margin-inline: auto; padding: 28px 0 70px; flex: 1; }
#footer { border-top: 1px solid var(--line); }
.foot-min { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 22px 0; color: var(--dim2); font-size: 13px; }
.foot-min b { color: var(--txt); font-weight: 500; }
.foot-min a:hover { color: var(--acc); }
.foot-note { margin-left: auto; }
[dir="rtl"] .foot-note { margin-left: 0; margin-right: auto; }

/* ═══ palette overlay ═══ */
.palette-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(30,20,14,.35); backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 0;
}
.palette-overlay.open { display: flex; }
.palette-box {
  width: min(620px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; animation: pop .2s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.palette-box input { width: 100%; padding: 18px 22px; border: 0; outline: 0; background: none; font-size: 17px; border-bottom: 1px solid var(--line); }
.pal-results { max-height: 46vh; overflow-y: auto; padding: 6px; }
.pal-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; font-size: 14.5px; }
.pal-row:hover { background: var(--soft); }
.pal-row i { font-style: normal; width: 28px; display: grid; place-items: center; font-size: 18px; color: var(--acc); opacity: .8; }
.pal-row b { font-weight: 500; }
.pal-row em { margin-left: auto; font-style: normal; color: var(--dim2); font-size: 12.5px; }
[dir="rtl"] .pal-row em { margin-left: 0; margin-right: auto; }
.pal-empty { padding: 26px; text-align: center; color: var(--dim2); }

/* ═══ home hero ═══ */
.hero-c { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 34px; position: relative; z-index: 40; }
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 99px; border: 1px solid var(--line2); background: var(--surface); }
.seg button, .seg a {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 16px; border-radius: 99px;
  font-size: 15.5px; font-weight: 500; color: var(--acc); transition: .18s var(--ease);
}
.seg .svg { font-size: 17px; }
.seg .on { background: var(--acc); color: var(--acc-ink); }
.seg .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hero-c h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 600; letter-spacing: -.035em; margin: 34px 0 30px; text-wrap: balance; }
.hero-c h1 .acc { color: var(--acc); }
.hero-c h1 .bub {
  display: inline-grid; place-items: center; width: .45em; height: .45em; border-radius: 50%; vertical-align: middle;
  background: var(--hot2); color: var(--acc); font-size: .5em; margin: 0 .25em; position: relative; top: -.08em;
}
.claim-row { display: flex; gap: 14px; width: min(1070px, 100%); align-items: stretch; }
.hero-search-wrap { position: relative; flex: 1.6; min-width: 0; z-index: 50; }
.hero-search {
  display: flex; align-items: center; gap: 12px; height: 100%; min-height: 54px; padding: 0 18px;
  border-radius: 99px; border: 1px solid var(--line2); background: var(--surface); transition: .2s var(--ease);
}
.hero-search:focus-within, .claim-row select:focus { border-color: var(--acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 14%, transparent); outline: 0; }
.hs-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--dim); font-size: 15px; flex: none; }
.hero-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 18px; }
.hero-search input::placeholder { color: var(--dim); }
.claim-row select { flex: .9; min-width: 0; min-height: 54px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line2); background-color: var(--surface); font-size: 15px; color: var(--dim); transition: .2s var(--ease); }
.claim-row .btn-main { padding: 0 26px; min-height: 54px; font-size: 16.5px; }
.hero-sugg {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 90; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 6px;
  box-shadow: var(--shadow); display: none; max-height: 390px; overflow-y: auto;
}
.hero-sugg.open { display: block; }
.sugg-row { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 12px; font-size: 14.5px; cursor: pointer; }
.sugg-row:hover, .sugg-row.on { background: var(--soft); }
.sugg-row b { font-weight: 500; }
.sugg-row b mark { background: none; color: var(--acc); }
.sugg-row em { margin-left: auto; flex: none; font-style: normal; color: var(--dim2); font-size: 12.5px; }
[dir="rtl"] .sugg-row em { margin-left: 0; margin-right: auto; }
.sugg-cat { width: 26px; font-style: normal; display: grid; place-items: center; font-size: 17px; flex: none; color: var(--acc); opacity: .8; }
.sugg-row.all { border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; margin-top: 4px; color: var(--acc); }
.sugg-empty { padding: 18px; text-align: center; color: var(--dim2); font-size: 13.5px; }

/* home: list + sidebar */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.side { position: sticky; top: 150px; display: flex; flex-direction: column; gap: 28px; padding-top: 4px; }
.side-block h4 { display: flex; align-items: center; gap: 8px; font-size: 16.5px; font-weight: 600; margin-bottom: 12px; }
.side-block h4 .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); }
.side-block h4 a { margin-left: auto; font-size: 14px; font-weight: 400; color: var(--acc); display: inline-flex; align-items: center; gap: 3px; }
.side-block h4 a:hover { text-decoration: underline; }
.side-block > p { color: var(--dim); font-size: 14px; line-height: 1.5; }
.mini { display: flex; align-items: center; gap: 11px; padding: 7px 8px; margin: 0 -8px; border-radius: 12px; transition: .16s var(--ease); }
.mini:hover { background: var(--soft); }
.mini div { min-width: 0; flex: 1; }
.mini b { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini em { display: block; font-style: normal; font-size: 12.5px; color: var(--dim2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .n { flex: none; color: var(--acc); font-size: 13px; font-weight: 500; }
.spot { display: block; padding: 16px; border-radius: 18px; background: var(--hot2); transition: .2s var(--ease); }
.spot:hover { background: var(--hot1); }
.spot-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.spot-head b { font-weight: 600; font-size: 15.5px; }
.spot-head em { display: block; font-style: normal; color: var(--dim); font-size: 12.5px; }
.spot p { color: var(--dim); font-size: 13.5px; line-height: 1.5; }
.side-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ═══ ranked list rows ═══ */
.list { display: flex; flex-direction: column; gap: 0; }
.item {
  position: relative; display: flex; align-items: center; gap: 22px; padding: 18px 20px 18px 22px;
  border-bottom: 1px solid var(--line); transition: background .2s var(--ease);
}
.item:hover { background: var(--hot3); }
.item.hot { border-bottom: 0; border-radius: var(--r); margin-bottom: 14px; }
.item.hot1 { background: var(--hot1); }
.item.hot2 { background: var(--hot2); }
.item.hot3 { background: var(--hot3); }
.item.hot:hover { filter: brightness(.985); }
[data-theme="dark"] .item.hot:hover { filter: brightness(1.12); }
.list .item:not(.hot) { border-radius: 0; }
.list:not(.ranked) .item:first-child { border-top: 1px solid var(--line); }
.item-rank { flex: none; width: 40px; text-align: center; font-size: 21px; font-weight: 500; color: var(--dim); }
.item.hot .item-rank { color: var(--acc); }
.item-body { flex: 1; min-width: 0; }
.item-head { display: flex; align-items: baseline; gap: 14px; }
.item-title { font-size: 19px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.item-title::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.item-price { flex: none; color: var(--acc); font-size: 17px; font-weight: 500; }
.item-desc { color: var(--dim); font-size: 16px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; font-size: 14px; color: var(--dim2); }
.item-meta b { color: var(--txt); font-weight: 500; }
.item-meta .dom { color: var(--dim); }
.item-meta .sep { opacity: .7; }
.item-meta .ver { color: var(--acc); }
.item-meta .clk:empty, .clk-chip:empty { display: none; }
.item-meta a.sd { position: relative; z-index: 2; color: inherit; }
.item-meta a.sd:hover { color: var(--acc); text-decoration: underline; }
.item-acts { display: inline-flex; gap: 4px; margin-left: auto; position: relative; z-index: 2; opacity: 0; transition: opacity .2s var(--ease); }
.item:hover .item-acts, .item-acts:focus-within, .item-acts:has(.on) { opacity: 1; }
.badge-verified {
  flex: none; display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%;
  background: var(--acc); color: var(--acc-ink); font-size: 9.5px; vertical-align: 2px; margin-left: 4px;
}
.badge-verified.big { width: auto; height: auto; border-radius: 99px; padding: 3px 11px; font-size: 12px; font-weight: 500; vertical-align: middle; }

.tool-ico {
  flex: none; border-radius: 18px; display: grid; place-items: center; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
}
.tool-ico img { width: 62%; height: 62%; object-fit: contain; }
.tool-ico.letter { background: linear-gradient(145deg, var(--hot1), var(--soft2)); color: var(--acc); font-weight: 600; border: 0; letter-spacing: -.02em; }
.tool-ico.letter img { display: none; }
.tool-ico.sm { border-radius: 9px; }

.act {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 32px; height: 32px; padding: 0 9px;
  border-radius: 99px; border: 1px solid var(--line2); background: var(--surface); color: var(--dim);
  font-size: 13px; transition: .16s var(--ease);
}
.act:hover { color: var(--acc); border-color: var(--acc-dim); }
.act.fav.on, .act.cmp.on { color: var(--acc); border-color: var(--acc); background: var(--hot3); }
.act.big { height: 44px; padding: 0 18px; font-size: 14.5px; }
.price { display: inline-block; font-size: 13px; font-weight: 500; color: var(--acc); padding: 3px 11px; border-radius: 99px; background: var(--hot2); white-space: nowrap; }

/* ═══ page heads / filters ═══ */
.page-head { padding: 10px 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -.035em; }
.page-head p { color: var(--dim); flex-basis: 100%; max-width: 640px; font-size: 16px; }
.page-head.center-head { flex-direction: column; text-align: center; align-items: center; }
.page-head.center-head p { margin-inline: auto; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; align-items: center; }
.filters input[type="search"], .filters select, .cat-filter {
  padding: 11px 18px; border-radius: 99px; border: 1px solid var(--line2); background-color: var(--surface); outline: none; font-size: 14.5px;
  transition: .2s var(--ease);
}
.filters input[type="search"]:focus, .filters select:focus, .cat-filter:focus { border-color: var(--acc); }
.filters input[type="search"] { min-width: 240px; flex: 1; }
.cat-filter { margin-top: 10px; width: min(380px, 100%); }
.price-chips { display: flex; gap: 2px; flex-wrap: wrap; padding: 4px; border-radius: 99px; background: var(--soft); }
.price-chips button { padding: 7px 14px; border-radius: 99px; color: var(--dim); font-size: 14px; transition: .16s var(--ease); }
.price-chips button:hover { color: var(--txt); }
.price-chips button.on { background: var(--acc); color: var(--acc-ink); }
.count { margin: 16px 0 10px; color: var(--dim2); font-size: 13.5px; }
.center { text-align: center; margin: 28px 0 8px; }
.empty { text-align: center; padding: 60px 20px; color: var(--dim); font-size: 15.5px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head.mt { margin-top: 44px; }
.sec-head h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.sec-head a { color: var(--acc); font-size: 14.5px; white-space: nowrap; }
.sec-head a:hover { text-decoration: underline; }
.shelf-sec { margin-top: 56px; }

/* charts tabs */
.tabs { display: flex; flex-basis: 100%; margin-top: 8px; }

/* categories */
.cat-group { margin: 0 0 34px; }
.cat-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cat-group-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--hot2); color: var(--acc); font-size: 18px; }
.cat-group-head h2 { font-size: 18px; font-weight: 600; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.cat-card {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: 99px;
  background: var(--soft); transition: .18s var(--ease);
}
.cat-card:hover { background: var(--hot1); }
.cat-ico { display: inline-flex; font-size: 18px; color: var(--acc); opacity: .75; }
.cat-card:hover .cat-ico { opacity: 1; }
.cat-card div { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.cat-card h3 { font-size: 15px; font-weight: 500; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-card em { font-style: normal; color: var(--dim2); font-size: 13px; }
.cat-arrow { color: var(--acc); opacity: 0; transform: translateX(-4px); transition: .18s var(--ease); }
.cat-card:hover .cat-arrow { opacity: 1; transform: none; }

/* stacks */
.stacks-list { display: flex; flex-direction: column; gap: 48px; margin-top: 18px; }
.stack-block-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.stack-ico { font-size: 22px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--hot2); flex: none; }
.stack-block-head h2 { font-size: 22px; }
.stack-block-head p { color: var(--dim); font-size: 15px; }

/* ═══ compare ═══ */
#cmpTray {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%) translateY(90px); z-index: 90;
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 99px; box-shadow: var(--shadow);
  transition: .3s var(--ease); opacity: 0;
}
#cmpTray.show { transform: translateX(-50%); opacity: 1; }
.tray-icons { display: flex; gap: 6px; }
.cmp-table-wrap { overflow-x: auto; margin-top: 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.cmp-table { width: 100%; border-collapse: collapse; }
.cmp-table td { padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: top; min-width: 160px; }
.cmp-table tr:last-child td { border-bottom: 0; }
.cmp-table td:first-child { color: var(--dim2); font-size: 13px; min-width: 90px; width: 110px; }
.cmp-head { text-align: center; }
.cmp-head .tool-ico { margin: 0 auto 10px; }
.cmp-head h3 { font-size: 17px; margin-bottom: 8px; }
.cmp-desc { color: var(--dim); font-size: 14px; }

/* ═══ news / tutorials / prompts ═══ */
.news-rows { display: flex; flex-direction: column; }
.news-row { display: flex; align-items: baseline; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); transition: .16s var(--ease); }
.news-row:first-child { border-top: 1px solid var(--line); }
.news-row:hover h3 { color: var(--acc); }
.news-row h3 { flex: 1; font-size: 16px; font-weight: 500; letter-spacing: 0; line-height: 1.4; transition: .16s; }
.news-tag { flex: none; font-size: 12.5px; font-weight: 500; color: var(--acc); background: var(--hot2); padding: 2px 10px; border-radius: 99px; }
.news-row time, .news-meta time { flex: none; color: var(--dim2); font-size: 13px; }
.news-list { display: flex; flex-direction: column; max-width: 780px; margin-top: 14px; }
.news-item { padding: 26px 0; border-bottom: 1px solid var(--line); }
.news-item h2 { font-size: 21px; margin: 10px 0 8px; line-height: 1.35; }
.news-item p { color: var(--dim); font-size: 15.5px; }
.news-meta { display: flex; gap: 12px; align-items: center; }

.tut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 14px; }
.tut-card { display: flex; flex-direction: column; gap: 10px; }
.tut-thumb { position: relative; aspect-ratio: 16/9; border-radius: 18px; display: grid; place-items: center; font-size: 38px; overflow: hidden; background: var(--soft); }
.tut-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.tut-card:hover .tut-thumb img { transform: scale(1.04); }
.tut-time { position: absolute; right: 10px; bottom: 10px; font-style: normal; font-size: 11.5px; background: rgba(0,0,0,.65); color: #fff; padding: 2px 9px; border-radius: 99px; }
.tut-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; color: #fff; background: rgba(20,10,5,.3); opacity: 0; transition: .2s; }
.tut-card:hover .tut-play { opacity: 1; }
.tut-body { display: flex; flex-direction: column; gap: 4px; padding: 0 2px; }
.tut-tags { display: flex; gap: 8px; align-items: center; font-size: 12.5px; }
.tut-level { color: var(--acc); font-weight: 500; }
.tut-tool { color: var(--dim2); }
.tut-card h3 { font-size: 15px; font-weight: 500; line-height: 1.4; letter-spacing: 0; }
.tut-card:hover h3 { color: var(--acc); }

.prompt-group { margin: 30px 0; }
.prompt-group h2 { font-size: 20px; margin-bottom: 14px; }
.prompt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.prompt-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; transition: .2s var(--ease); }
.prompt-card:hover { border-color: var(--line2); box-shadow: var(--shadow-sm); }
.prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.prompt-head h3 { font-size: 15.5px; font-weight: 500; }
.prompt-card pre {
  font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 12.5px; line-height: 1.6;
  color: var(--dim); background: var(--soft); border-radius: 14px;
  padding: 12px 14px; white-space: pre-wrap; word-break: break-word; max-height: 160px; overflow-y: auto;
}

/* ═══ tool page ═══ */
.crumbs { padding: 4px 0 18px; color: var(--dim2); font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--acc); }
.crumbs b { color: var(--txt); font-weight: 500; }
.tool-hero { display: flex; gap: 26px; align-items: center; background: var(--hot2); border-radius: 28px; padding: 32px; flex-wrap: wrap; }
.tool-hero-main { flex: 1; min-width: 250px; }
.tool-hero h1 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.03em; }
.tool-desc { color: var(--dim); font-size: 17px; margin: 8px 0 14px; max-width: 640px; }
.tool-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tool-meta .chip { background: var(--surface); }
.tool-cta { display: flex; flex-direction: column; gap: 10px; min-width: 240px; }
.cta-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ═══ toasts ═══ */
#toasts { position: fixed; bottom: 22px; right: 22px; z-index: 110; display: flex; flex-direction: column; gap: 8px; }
[dir="rtl"] #toasts { right: auto; left: 22px; }
.toast {
  display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 99px; padding: 10px 18px; font-size: 14px;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); transition: .3s var(--ease);
}
.toast.show { opacity: 1; transform: none; }

/* ═══ static pages (about / contact / legal) ═══ */
.prose { max-width: 760px; margin: 0 auto; padding: 10px 0 20px; }
.prose h1 { font-size: clamp(32px, 4.4vw, 46px); letter-spacing: -.035em; margin-bottom: 14px; }
.prose h2 { font-size: 21px; margin: 34px 0 10px; }
.prose p, .prose li { color: var(--dim); font-size: 16px; line-height: 1.75; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.prose li::marker { color: var(--acc); }
.prose b { color: var(--txt); font-weight: 500; }
.prose a { color: var(--acc); text-decoration: underline; text-decoration-color: var(--acc-dim); text-underline-offset: 3px; }
.prose .lead { font-size: 18.5px; color: var(--txt); line-height: 1.6; }
.prose .meta-line { font-size: 14px; color: var(--dim2); margin-bottom: 18px; }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 26px; }
.prose .contact-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 20px; background: var(--hot2); color: var(--txt); text-decoration: none; transition: background .18s var(--ease); }
.prose a.contact-card:hover { background: var(--hot1); }
.contact-card > span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--acc); font-size: 18px; flex: none; }
.contact-card b { display: block; font-weight: 500; }
.contact-card em { display: block; font-style: normal; color: var(--dim); font-size: 13.5px; white-space: nowrap; }
.prose .contact-card { gap: 12px; padding: 16px; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.contact-form label { display: flex; flex-direction: column; gap: 7px; font-weight: 500; font-size: 14px; color: var(--txt); }
.contact-form input, .contact-form select, .contact-form textarea { padding: 14px 20px; border-radius: 99px; border: 1px solid var(--line2); background-color: var(--surface); outline: none; font-size: 15px; transition: .2s var(--ease); }
.contact-form textarea { border-radius: 22px; resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 14%, transparent); }
.contact-form .full, .contact-form .btn-main { grid-column: 1/-1; }
.prose .fine { grid-column: 1/-1; color: var(--dim2); font-size: 13px; text-align: center; }

.foot-links { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 20px; padding-bottom: 6px; }
.foot-links a { color: var(--dim); font-size: 14px; }

/* ad slots (render only once AdSense IDs are configured in app.js) */
.ad-slot { position: relative; min-height: 120px; padding: 22px 12px 12px; margin: 14px 0; border-radius: var(--r); background: var(--soft); }
.ad-side { min-height: 270px; margin: 0; }
.ad-label { position: absolute; top: 6px; left: 14px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim2); }

/* ═══ custom dropdown (enhanceSelect) ═══ */
.dd { position: relative; min-width: 0; }
.dd > select { display: none; }
.dd-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 100%; min-height: 44px; padding: 0 16px 0 18px;
  border-radius: 99px; border: 1px solid var(--line2); background: var(--surface); color: var(--txt);
  font-size: 14.5px; text-align: left; cursor: pointer; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.dd-btn:hover { border-color: var(--dim2); }
.dd.open .dd-btn, .dd-btn:focus-visible { border-color: var(--acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 14%, transparent); outline: 0; }
.dd-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-label.ph { color: var(--dim); }
.dd-chev { font-size: 15px; color: var(--dim2); transform: rotate(90deg); transition: transform .2s var(--ease); }
.dd.open .dd-chev { transform: rotate(-90deg); }
.dd-ico { font-style: normal; width: 22px; display: grid; place-items: center; flex: none; color: var(--acc); opacity: .75; font-size: 18px; }
.dd-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 95; width: max(100%, 300px); max-height: min(420px, 60vh);
  overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-radius: 20px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s;
}
.dd.open .dd-menu { opacity: 1; visibility: visible; transform: none; }
.dd-opt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 13px; font-size: 15px; color: var(--txt); cursor: pointer; }
.dd-opt.on { background: var(--soft); }
.dd-opt span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-check { color: var(--acc); font-weight: 600; visibility: hidden; }
.dd-opt.sel { font-weight: 500; }
.dd-opt.sel .dd-check { visibility: visible; }
.dd-opt.sel .dd-ico, .dd-opt.on .dd-ico { opacity: 1; }
.claim-row .dd { flex: .9; }
.claim-row .dd-btn { min-height: 54px; font-size: 15px; }
.filters .dd { flex: 0 1 230px; }
.filters .dd-menu { width: max(100%, 280px); }

/* ═══ stats page ═══ */
.stat-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 980px; margin: 30px auto 0; }
.stat-cards.small { margin-top: 18px; }
.stat-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 16px;
  border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-sm); text-align: center;
}
.stat-card b {
  display: inline-flex; align-items: center; gap: 12px; font-size: clamp(30px, 4vw, 44px); font-weight: 600;
  font-family: "SF Mono", ui-monospace, Menlo, monospace; letter-spacing: -.02em; color: var(--txt);
}
.stat-cards.small .stat-card { padding: 20px 14px; border-radius: 22px; }
.stat-cards.small .stat-card b { font-size: 26px; }
.stat-card em { font-style: normal; color: var(--dim); font-size: 15px; }
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 5px color-mix(in srgb, var(--live) 16%, transparent); flex: none; }
.stat-note { max-width: 620px; margin: 26px auto 0; text-align: center; color: var(--dim2); font-size: 13.5px; }

/* ═══ stats page: visitor analytics ═══ */
:root { --chart: #d2704f; --chart-fill: rgba(210,112,79,.22); }
[data-theme="dark"] { --chart: #c96a4a; --chart-fill: rgba(201,106,74,.28); } /* validated against the dark surface */
.an { max-width: 980px; margin: 54px auto 0; }
.an-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.an-head h2 { font-size: 24px; }
.an-head .dd { flex: 0 0 200px; }
.an-card { background: var(--surface); border-radius: 26px; box-shadow: var(--shadow-sm); padding: 18px; min-width: 0; }
.an-chart { padding: 22px 22px 14px; }
.an-total { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.an-total b { font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 34px; font-weight: 600; letter-spacing: -.02em; }
.an-total em { font-style: normal; color: var(--dim); font-size: 15px; }
.an-plot { position: relative; }
.an-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.an-plot text { font-size: 11px; fill: var(--dim2); font-family: var(--font); }
.an-plot .g { stroke: var(--line); stroke-width: 1; }
.an-plot .ln { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.an-plot .f1 { stop-color: var(--chart); stop-opacity: .26; }
.an-plot .f2 { stop-color: var(--chart); stop-opacity: 0; }
.an-plot .xh { stroke: var(--dim2); stroke-width: 1; stroke-dasharray: 3 3; }
.an-plot .dot { fill: var(--chart); stroke: var(--surface); stroke-width: 2; }
.an-plot .hit { fill: transparent; cursor: crosshair; }
.an-tip {
  position: absolute; top: 0; min-width: 120px; padding: 8px 12px; border-radius: 12px; pointer-events: none;
  background: var(--txt); color: var(--bg); font-size: 13px; box-shadow: var(--shadow-sm);
}
.an-tip em { display: block; font-style: normal; opacity: .7; font-size: 12px; }
.an-tip b { font-weight: 600; }
.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.seg.sm { padding: 3px; margin-bottom: 12px; }
.seg.sm button { font-size: 14px; padding: 5px 14px; color: var(--dim); }
.seg.sm button.on { color: var(--acc-ink); }
.an-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.an-kpi { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-sm); padding: 16px 16px 14px; min-width: 0; }
.an-kpi b { display: block; font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 24px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.an-kpi em { display: block; font-style: normal; color: var(--dim); font-size: 13px; margin-top: 2px; }
.an-split { display: block; height: 6px; border-radius: 9px; background: var(--soft2); margin: 10px 0 6px; overflow: hidden; }
.an-split i { display: block; height: 100%; background: var(--chart); border-radius: 9px; transition: width .4s var(--ease); }
.an-nvr small { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--dim2); }
.an-nvr .sw { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.an-nvr .sw.n { background: var(--chart); } .an-nvr .sw.r { background: var(--soft2); margin-left: 6px; }
.an-live { margin-top: 18px; }
.an-live-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.an-live-head h3 { font-size: 17px; }
.an-live-head em { font-style: normal; color: var(--dim2); font-size: 13px; margin-left: auto; }
.an-live .live-dot { animation: livePulse 1.8s ease-in-out infinite; }
@keyframes livePulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--live) 0%, transparent); } }
.an-feed { display: flex; flex-direction: column; }
.an-ev { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.an-ev:last-of-type { border-bottom: 0; }
.an-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.an-pager .pg { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line2); background: var(--surface); color: var(--txt); font-size: 14px; font-weight: 500; transition: .16s var(--ease); }
.an-pager .pg:hover:not(:disabled):not(.on) { border-color: var(--acc); color: var(--acc); }
.an-pager .pg.on { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.an-pager .pg.arrow { font-size: 17px; }
.an-pager .pg:disabled { opacity: .35; cursor: default; }
.an-more { display: block; margin: 8px auto 0; padding: 7px 16px; border-radius: 99px; border: 1px solid var(--line2); color: var(--acc); font-size: 13.5px; font-weight: 500; }
.an-more:hover { border-color: var(--acc); background: var(--hot3); }
.an-ev p { flex: 1; min-width: 0; font-size: 14.5px; color: var(--dim); }
.an-ev p b { color: var(--txt); font-weight: 500; }
.an-ev time { flex: none; font-size: 12.5px; color: var(--dim2); }
.an-ev .tool-ico { flex: none; }
.an-row .tool-ico { flex: none; }
.an-list { display: flex; flex-direction: column; gap: 4px; }
.an-row { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px; border-radius: 12px; overflow: hidden; }
.an-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--chart-fill); border-radius: 12px; z-index: 0; }
.an-row > *:not(.an-bar) { position: relative; z-index: 1; }
.an-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.an-row b { font-family: "SF Mono", ui-monospace, Menlo, monospace; font-weight: 600; font-size: 14.5px; }
.an-flag { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--line); }
.an-flag.none { display: grid; place-items: center; box-shadow: none; color: var(--acc); font-size: 16px; }
.an-ico { display: grid; place-items: center; width: 20px; color: var(--acc); font-size: 17px; flex: none; }
.an-fav { width: 16px; height: 16px; border-radius: 4px; flex: none; margin: 0 2px; }
.an-empty { color: var(--dim2); font-size: 14px; padding: 18px 6px; text-align: center; }
.an.loading .an-card { opacity: .55; transition: opacity .2s; }

/* ═══ scrollbar ═══ */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ═══ responsive ═══ */
@media (max-width: 1400px) {
  .nav > a, .more-btn { padding: 7px 10px; font-size: 15px; }
}
@media (max-width: 1180px) {
  .live-pill .opt { display: none; }
}
@media (max-width: 960px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 880px) {
  html { scrollbar-gutter: auto; -webkit-text-size-adjust: 100%; }
  body { padding-bottom: env(safe-area-inset-bottom); }
  #header { padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--line); }
  .wrap, main#app { width: auto; margin-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
  .nav, .head-tools { display: none; }
  .m-tools { display: flex; }
  .topnav-in { padding: 10px 0 8px; gap: 10px; }
  .catbar-wrap { padding-bottom: 10px; }
  .catbar { padding: 4px; }
  .catbar a { font-size: 14px; padding: 6px 12px; }
  main#app { padding: 18px 0 34px; }

  /* bottom tab bar — only in the installed app (standalone), see below; in a browser
     the browser's own bottom toolbar lives there, so nav moves into the header */
  .tabbar {
    display: none; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px -14px rgba(60,35,20,.25);
    padding: 6px max(6px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-right));
  }
  .tabbar a, .tabbar button {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 50px; border-radius: 14px; color: var(--dim2); font-size: 10.5px; font-weight: 500;
  }
  .tabbar .svg { font-size: 23px; }
  .tabbar .on { color: var(--acc); }
  .tabbar .on .svg { stroke-width: 2.3; }
  .tabbar a:active, .tabbar button:active { background: var(--soft); }
  .tabbar .pill { top: 4px; right: calc(50% - 22px); }

  #cmpTray { bottom: calc(16px + env(safe-area-inset-bottom)); max-width: calc(100% - 24px); }
  #toasts { left: 16px; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); align-items: center; }
  .palette-overlay { padding: calc(10px + env(safe-area-inset-top)) 12px 0; }
  .palette-box { border-radius: 20px; }
  .pal-results { max-height: 60vh; }

  /* inputs ≥16px so iOS Safari doesn't zoom on focus */
  input, select, textarea, .palette-box input, .filters input[type="search"], .filters select, .cat-filter, .claim-row select { font-size: 16px; }

  .claim-row { flex-wrap: wrap; gap: 10px; }
  .hero-search-wrap { flex: 1 1 100%; }
  .claim-row select { flex: 1; }
  .filters { gap: 8px; }
  .filters select { flex: 1 1 140px; }
  .price-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .price-chips::-webkit-scrollbar { display: none; }
  .price-chips button { flex: none; }
  .side { grid-template-columns: minmax(0, 1fr); }
  .shelf-sec { margin-top: 40px; }
  .foot-min { flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px 0; }
  .foot-note { margin-left: 0; }
  .tool-cta { min-width: 0; width: 100%; }
  .cta-row .act.big { flex: 1; white-space: nowrap; }
  .catbar .cb-explore { display: none; }

  /* touch: press feedback instead of hover */
  .item:active { background: var(--hot3); }
  .item.hot:active { filter: brightness(.97); }
  .cat-card:active, .mini:active, .chip:active, .btn-main:active, .btn-ghost:active { transform: scale(.98); }
}
@media (max-width: 600px) {
  .topnav-in .live-pill { display: none; }
  .live-pill.m-live { display: inline-flex; }
  .logo { font-size: 22px; }
  .logo-mark { width: 26px; height: 26px; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg button, .seg a { font-size: 14px; padding: 6px 13px; white-space: nowrap; flex: none; }
  .hero-c { padding-bottom: 24px; }
  .hero-c h1 { font-size: clamp(30px, 9vw, 40px); margin: 22px 0 20px; }
  .hero-search { min-height: 50px; }
  .claim-row select, .claim-row .dd, .claim-row .btn-main { flex: 1 1 100%; min-height: 50px; }
  .claim-row .dd-btn { min-height: 50px; }
  .filters .dd { flex: 1 1 140px; }
  .dd-menu { width: 100%; }
  .item { gap: 12px; padding: 14px 12px; }
  .item.hot { margin-bottom: 8px; border-radius: 18px; }
  .item-rank { width: 24px; font-size: 15px; }
  .item .tool-ico { width: 48px !important; height: 48px !important; border-radius: 14px !important; }
  .item-head { gap: 8px; }
  .item-title { font-size: 16px; }
  .item-price { font-size: 12.5px; }
  .item-desc { font-size: 13.5px; }
  .item-meta { font-size: 12px; gap: 2px 6px; }
  .item-meta b + .sep, .item-meta .dom { display: none; }
  .item-acts { display: none; }
  .page-head h1 { font-size: 28px; }
  .page-head p { font-size: 14.5px; }
  .sec-head h2 { font-size: 19px; }
  .prompt-grid { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .stat-cards.small { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat-cards.small .stat-card { padding: 14px 6px; }
  .stat-cards.small .stat-card b { font-size: 20px; }
  .stat-cards.small .stat-card em { font-size: 12px; }
  .an { margin-top: 40px; }
  .an-head h2 { font-size: 20px; }
  .an-head .dd { flex: 0 0 160px; }
  .an-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .an-kpi.an-nvr { grid-column: 1 / -1; }
  .an-kpi b { font-size: 21px; }
  .an-ev p { font-size: 13.5px; }
  .an-card { border-radius: 22px; padding: 14px; }
  .an-total b { font-size: 28px; }
  .prose p, .prose li { font-size: 15px; }
  .tut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tut-card h3 { font-size: 13.5px; }
  .tool-hero { padding: 20px; gap: 16px; border-radius: 22px; }
  .tool-hero .tool-ico { width: 72px !important; height: 72px !important; }
  .tool-desc { font-size: 15px; }
  .filters input[type="search"] { min-width: 0; flex: 1 1 100%; }
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .news-row { flex-wrap: wrap; gap: 6px 12px; }
  .news-row h3 { flex-basis: 100%; order: 3; font-size: 15px; }
  .news-item h2 { font-size: 18px; }
  .cmp-table td { padding: 12px 14px; min-width: 140px; font-size: 14px; }
}
/* installed to home screen: no browser toolbar, so use the app-style bottom tab bar */
@media (max-width: 880px) and (display-mode: standalone) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); overscroll-behavior-y: none; }
  .tabbar { display: grid; }
  .m-tools .browser-only { display: none; }
  #cmpTray { bottom: calc(76px + env(safe-area-inset-bottom)); }
  #toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (hover: none) {
  .item:hover { background: transparent; }
  .item.hot1:hover { background: var(--hot1); } .item.hot2:hover { background: var(--hot2); } .item.hot3:hover { background: var(--hot3); }
  .item.hot:hover { filter: none; }
  .cat-card:hover { background: var(--soft); }
}
