/* ==========================================================================
   DozoDeal — public theme. Dark-first, score-forward. Toggle sets [data-theme].
   ========================================================================== */

/* Light is the default theme; dark is opt-in via [data-theme="dark"]. */
:root {
    --bg: #f4f5fb;
    --bg-2: #eceef8;
    --panel: #ffffff;
    --panel-2: #f7f8fd;
    --panel-3: #eef1f9;
    --line: #e6e9f4;
    --line-2: #d4dae9;
    --ink: #131832;
    --ink-2: #414c6c;
    --muted: #6d7794;

    --brand: #7c3aed;
    --brand-2: #9333ea;
    --brand-strong: #6d28d9;
    --accent: #e11d63;
    --gold: #d97706;

    --grab-a: #7c3aed;
    --grab-b: #db2777;

    --steal: #059669;
    --hot: #d97706;
    --great: #7c3aed;
    --good: #2563eb;
    --fair: #64748b;

    --ok: #059669;
    --bad: #dc2626;
    --warn: #d97706;

    --radius: 16px;
    --radius-sm: 11px;
    --radius-lg: 22px;
    --maxw: 1220px;
    --shadow: 0 1px 2px rgba(16,24,40,.05), 0 16px 36px -24px rgba(16,24,40,.28);
    --shadow-lg: 0 24px 60px -28px rgba(16,24,40,.32);
    --header-h: 66px;

    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #0a0e18;
    --bg-2: #0e1424;
    --panel: #141b2e;
    --panel-2: #1a2338;
    --panel-3: #212c46;
    --line: #232d48;
    --line-2: #2f3b5c;
    --ink: #eef1fb;
    --ink-2: #b3bdda;
    --muted: #7c88ab;

    --brand: #8b5cf6;
    --brand-2: #a855f7;
    --brand-strong: #7c3aed;
    --accent: #fb7185;
    --gold: #f59e0b;

    --steal: #10b981;
    --hot: #f59e0b;
    --great: #8b5cf6;
    --good: #38bdf8;
    --fair: #64748b;

    --ok: #34d399;
    --bad: #f87171;
    --warn: #fbbf24;

    --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 18px 40px -22px rgba(0,0,0,.75);
    --shadow-lg: 0 30px 70px -30px rgba(0,0,0,.8);

    color-scheme: dark;
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        radial-gradient(1100px 620px at 78% -8%, rgba(139,92,246,.16), transparent 60%),
        radial-gradient(900px 520px at 8% 4%, rgba(219,39,119,.10), transparent 55%),
        var(--bg);
    color: var(--ink);
    font-size: 15.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.18; font-weight: 800; letter-spacing: -.02em; font-family: 'Sora', 'Plus Jakarta Sans', sans-serif; }
p { margin: 0 0 .8em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.grad { background: linear-gradient(100deg, var(--brand-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.row-center { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 12px; background: var(--panel); padding: 8px 14px; border-radius: 8px; z-index: 200; }

/* ------------------------------------------------------------- buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: .92rem;
    background: var(--panel-2); color: var(--ink); border: 1px solid var(--line-2);
    transition: transform .12s, filter .15s, background .15s, border-color .15s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); border-color: var(--brand); }
.btn:active { transform: translateY(0); }
.btn--grab {
    background: linear-gradient(120deg, var(--grab-a), var(--grab-b));
    color: #fff; border-color: transparent;
    box-shadow: 0 10px 26px -12px rgba(219,39,119,.7);
}
.btn--grab:hover { filter: brightness(1.08); border-color: transparent; }
.btn--ghost { background: transparent; }
.btn--sm { padding: 8px 13px; font-size: .84rem; }
.btn--lg { padding: 14px 22px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink-2);
    transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }

/* -------------------------------------------------------------- header ---- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--line);
}
.site-header__bar { display: flex; align-items: center; gap: 14px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand__mark {
    width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, var(--grab-a), var(--grab-b));
    box-shadow: 0 8px 20px -8px rgba(124,58,237,.8);
}
.brand__word { font-family: 'Sora', sans-serif; font-size: 1.28rem; letter-spacing: -.03em; }
.brand__word span { color: var(--brand-2); }
.brand__logo { height: 34px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.site-nav a { padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); background: var(--panel-2); }
.site-nav a.is-active { color: var(--ink); background: var(--panel-2); }
.site-nav a.nav-submit { color: var(--brand-2); }
.searchbox {
    position: relative; margin-left: auto; flex: 0 1 340px; display: flex; align-items: center; gap: 8px;
    background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 0 12px; height: 42px;
    color: var(--muted);
}
.searchbox:focus-within { border-color: var(--brand); }
.searchbox input { flex: 1; background: none; border: 0; color: var(--ink); outline: none; font-size: .92rem; min-width: 0; }
.searchbox__suggest {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 120;
    background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg);
    padding: 6px; max-height: 60vh; overflow-y: auto;
}
.searchbox__suggest a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 9px; font-size: .9rem; color: var(--ink-2); }
.searchbox__suggest a:hover, .searchbox__suggest a.is-active { background: var(--panel-2); color: var(--ink); }
.searchbox__suggest .sg-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 8px 10px 4px; }
.site-header__actions { display: flex; align-items: center; gap: 8px; }
.alerts-btn { background: linear-gradient(120deg, var(--grab-a), var(--grab-b)); color: #fff; border-color: transparent; }
.nav-toggle { display: none; }
.nav-scrim { position: fixed; inset: 0; background: rgba(4,7,15,.6); z-index: 95; backdrop-filter: blur(2px); }

/* --------------------------------------------------------------- flash ---- */
.flash { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; font-size: .9rem; font-weight: 600;
    border: 1px solid var(--line-2); background: var(--panel); }
.flash svg { flex: none; }
.flash--success { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 10%, var(--panel)); }
.flash--error { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 10%, var(--panel)); }
.flash--info { color: var(--brand-2); border-color: color-mix(in srgb, var(--brand) 40%, transparent); background: color-mix(in srgb, var(--brand) 10%, var(--panel)); }

/* ---------------------------------------------------------------- hero ---- */
.hero { padding: 46px 0 26px; }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; color: var(--ink-2);
    background: var(--panel-2); border: 1px solid var(--line-2); padding: 6px 12px; border-radius: 999px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--steal); box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); } 70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.hero__title { font-size: clamp(2.6rem, 6vw, 4.1rem); margin: 16px 0 12px; line-height: 1.02; }
.hero__sub { font-size: 1.08rem; color: var(--ink-2); max-width: 46ch; }
.hero__cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero__how { color: var(--brand-2); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.hero__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.statcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.statcard--accent { background: linear-gradient(150deg, color-mix(in srgb, var(--brand) 28%, var(--panel)), var(--panel)); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.statcard__val { display: block; font-family: 'Sora', sans-serif; font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; }
.statcard__label { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); font-weight: 600; margin-top: 4px; }

/* ---------------------------------------------------------------- rails --- */
.rail-wrap { padding: 6px 0 4px; }
.rail { display: flex; gap: 10px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail__chip { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px;
    background: var(--panel); border: 1px solid var(--line-2); font-weight: 700; font-size: .88rem; }
.rail__chip:hover { border-color: var(--c); }
.rail__chip img { width: 20px; height: 20px; object-fit: contain; border-radius: 5px; }
.rail__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.rail--cats { padding-top: 2px; }
.rail__cat { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 10px; font-weight: 600; font-size: .85rem;
    color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--line); }
.rail__cat:hover { color: var(--c); border-color: var(--c); }
.rail__cat svg { color: var(--c); }

/* ----------------------------------------------------------- ad slots ----- */
.ad-slot { margin: 18px 0; text-align: center; border: 1px dashed var(--line-2); border-radius: 14px; padding: 12px; background: var(--panel-2); }
.ad-slot__label { display: block; font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.deal-grid__ad { grid-column: 1 / -1; }

/* --------------------------------------------------------- feed layout ---- */
.feed-section { padding: 20px 0 60px; }
.feed-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 26px; align-items: start; }
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.feed-head h2 { font-size: 1.4rem; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar__sorts { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; font-weight: 600; font-size: .84rem;
    color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--line-2); }
.chip:hover { color: var(--ink); border-color: var(--brand); }
.chip.is-active { background: var(--brand-strong); border-color: transparent; color: #fff; }
.chip--live { margin-left: auto; }
.chip--live[aria-pressed="false"] .live-dot { background: var(--muted); animation: none; }

/* --------------------------------------------------------- deal grid ------ */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.feed-aside .deal-grid, .feed-main .deal-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.deal { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); transition: transform .16s, border-color .16s, box-shadow .16s; display: flex; flex-direction: column; }
.deal:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow-lg); }
.deal.is-new { animation: dealIn .5s ease; }
@keyframes dealIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
.deal__media { position: relative; display: block; aspect-ratio: 4/3; background: var(--panel-2); }
.deal__media img { width: 100%; height: 100%; object-fit: cover; }
.deal__store { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px;
    border-radius: 999px; font-size: .72rem; font-weight: 800; color: #fff; background: color-mix(in srgb, var(--c) 82%, #000);
    backdrop-filter: blur(4px); box-shadow: 0 4px 12px -4px rgba(0,0,0,.6); }
.deal__store img { width: 14px; height: 14px; object-fit: contain; border-radius: 3px; background:#fff; }
.deal__flash { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px; border-radius: 999px;
    font-size: .68rem; font-weight: 800; color: #1a1204; background: var(--gold); }
.deal__off { position: absolute; bottom: 10px; left: 10px; display: flex; align-items: baseline; gap: 3px; padding: 5px 9px;
    border-radius: 10px; font-size: 1rem; font-weight: 800; color: #fff; background: linear-gradient(120deg, var(--grab-a), var(--grab-b)); }
.deal__off small { font-size: .6rem; font-weight: 700; text-transform: uppercase; opacity: .85; }
.deal__score { position: absolute; bottom: -22px; right: 12px; }
.deal__body { padding: 26px 15px 15px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.deal__title { font-size: .96rem; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; font-family: 'Plus Jakarta Sans', sans-serif; }
.deal__title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deal__title a:hover { color: var(--brand-2); }
.deal__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.deal__price .price { font-family: 'Sora', sans-serif; font-size: 1.28rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.deal__price .price--na { font-size: 1rem; color: var(--muted); }
.deal__price .mrp { color: var(--muted); text-decoration: line-through; font-size: .88rem; }
.deal__price .save { font-size: .74rem; font-weight: 700; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); padding: 2px 7px; border-radius: 6px; }
.coupon { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; padding: 5px 10px; border-radius: 9px;
    border: 1px dashed var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); font-size: .78rem; font-weight: 700; color: var(--ink); }
.coupon code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .04em; }
.coupon__hint { color: var(--brand-2); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.coupon.is-copied .coupon__hint::after { content: ' ✓'; }
.deal__meta { display: flex; align-items: center; gap: 12px; font-size: .76rem; color: var(--muted); margin-top: auto; }
.deal__ago { display: inline-flex; align-items: center; gap: 4px; }
.deal__cat { color: var(--ink-2); font-weight: 600; }
.deal__cat:hover { color: var(--brand-2); }
.deal__actions { display: flex; gap: 8px; align-items: center; }
.deal__actions .btn--grab { flex: 1; padding: 9px 12px; font-size: .86rem; }
.vote { display: inline-flex; align-items: center; gap: 5px; padding: 9px 11px; border-radius: 999px; font-weight: 700; font-size: .82rem;
    border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink-2); transition: color .15s, border-color .15s; }
.vote:hover, .vote.is-voted { color: var(--gold); border-color: var(--gold); }
.vote.is-voted { background: color-mix(in srgb, var(--gold) 14%, transparent); }

/* ------------------------------------------------------------ score ring -- */
.score { position: relative; display: inline-grid; place-items: center; width: var(--sz); height: var(--sz); }
.score__svg { transform: rotate(0deg); filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); }
.score__track { stroke: color-mix(in srgb, var(--line-2) 70%, transparent); }
.score__val { stroke: var(--tone); transition: stroke-dashoffset 1s cubic-bezier(.4,0,.2,1); }
.score__num { fill: var(--ink); font-family: 'Sora', sans-serif; font-weight: 800; }
.score__label { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); font-size: .62rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .08em; color: var(--tone); white-space: nowrap; }
.score--steal { --tone: var(--steal); } .score--hot { --tone: var(--hot); } .score--great { --tone: var(--great); }
.score--good { --tone: var(--good); } .score--fair { --tone: var(--fair); }
.deal__score .score { background: var(--panel); border-radius: 50%; padding: 3px; box-shadow: 0 8px 20px -6px rgba(0,0,0,.7); }

/* --------------------------------------------------------------- aside ---- */
.feed-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 14px); }
.aside-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.aside-card h3 { display: flex; align-items: center; gap: 7px; font-size: 1rem; margin-bottom: 8px; }
.aside-card p { font-size: .88rem; color: var(--ink-2); }
.aside-card--score { background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 16%, var(--panel)), var(--panel)); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.aside-card--alert { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--panel)); border-color: color-mix(in srgb, var(--accent) 26%, var(--line)); }
.aside-card__more { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; color: var(--brand-2); font-weight: 700; font-size: .85rem; }
.score-legend { display: grid; gap: 6px; margin: 10px 0; font-size: .84rem; color: var(--ink-2); }
.score-legend li { display: flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot--steal { background: var(--steal); } .dot--hot { background: var(--hot); } .dot--great { background: var(--great); } .dot--good { background: var(--good); }

/* ---------------------------------------------------------- empty state --- */
.empty-state { text-align: center; padding: 56px 20px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.empty-state svg { color: var(--line-2); margin: 0 auto 12px; }
.empty-state h3, .empty-state h1 { color: var(--ink); margin-bottom: 8px; }
.empty-state p { max-width: 42ch; margin: 0 auto 16px; }
.empty-state--tall { padding: 84px 20px; }
.err-code { font-family: 'Sora', sans-serif; font-size: 4rem; font-weight: 800; color: var(--brand-2); display: block; line-height: 1; }

/* ------------------------------------------------------------ pagination -- */
.pager { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 30px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.pager a:hover { border-color: var(--brand); color: var(--ink); }
.pager .is-current { background: var(--brand-strong); border-color: transparent; color: #fff; }
.pager__gap { border: 0; background: none; }

/* --------------------------------------------------------- page heroes ---- */
.page-hero { padding: 34px 0 8px; }
.page-hero--plain { padding: 40px 0 6px; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-hero p { color: var(--ink-2); max-width: 60ch; }
.page-hero__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-hero__brand { display: flex; align-items: center; gap: 16px; }
.page-hero__brand img { width: 60px; height: 60px; object-fit: contain; background: #fff; border-radius: 16px; padding: 8px; }
.page-hero__mark { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb,var(--c) 50%, #000)); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--ink-2); font-weight: 600; }
.crumbs a:hover { color: var(--brand-2); }
.crumbs--top { padding-top: 18px; }

/* -------------------------------------------------------------- tiles ----- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tile-grid--cats { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.store-tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.store-tile:hover { transform: translateY(-3px); border-color: var(--c); }
.store-tile__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.store-tile__head img { width: 40px; height: 40px; object-fit: contain; background:#fff; border-radius: 10px; padding: 4px; }
.store-tile__mark { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color:#fff; background: var(--c); }
.store-tile p { font-size: .85rem; color: var(--muted); min-height: 2.4em; }
.store-tile__meta { display: flex; gap: 14px; font-size: .8rem; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 10px; }
.cat-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.cat-tile:hover { transform: translateY(-3px); border-color: var(--c); }
.cat-tile__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.cat-tile strong { font-size: 1rem; }
.cat-tile__count { font-size: .8rem; color: var(--muted); }

/* --------------------------------------------------------- deal page ------ */
.deal-page__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 16px 0 8px; align-items: start; }
.deal-gallery__main { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1/1; }
.deal-gallery__main img { width: 100%; height: 100%; object-fit: contain; padding: 22px; }
.deal-gallery__off { position: absolute; top: 14px; left: 14px; padding: 6px 12px; border-radius: 10px; font-weight: 800; color:#fff; background: linear-gradient(120deg, var(--grab-a), var(--grab-b)); }
.deal-gallery__flash { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items:center; gap:4px; padding: 6px 11px; border-radius: 999px; font-size: .74rem; font-weight: 800; color:#1a1204; background: var(--gold); }
.deal-gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.deal-gallery__thumbs img { width: 62px; height: 62px; object-fit: contain; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 5px; cursor: pointer; flex: none; }
.buy-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-lg); position: sticky; top: calc(var(--header-h) + 12px); }
.buy-panel__store { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-weight: 800; font-size: .8rem; color: #fff; background: var(--c); margin-bottom: 10px; }
.buy-panel__store img { width: 16px; height: 16px; object-fit: contain; background:#fff; border-radius: 4px; }
.buy-panel__title { font-size: 1.5rem; line-height: 1.2; }
.buy-panel__sub { color: var(--ink-2); margin-top: 6px; }
.buy-panel__scorebox { display: flex; align-items: center; gap: 20px; margin: 18px 0; padding: 16px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); }
.buy-panel__pricing { flex: 1; }
.bp-price { font-family: 'Sora', sans-serif; font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.bp-price--na { font-size: 1.2rem; color: var(--muted); }
.bp-sub { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.bp-sub .mrp { text-decoration: line-through; color: var(--muted); }
.bp-sub .off { font-weight: 800; color: var(--accent); }
.bp-save { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; font-weight: 700; color: var(--ok); margin-top: 6px; }
.badge-low { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; color: var(--steal); background: color-mix(in srgb, var(--steal) 15%, transparent); }
.coupon--lg { padding: 10px 14px; font-size: .9rem; margin: 4px 0 10px; width: 100%; justify-content: center; }
.buy-panel__couponnote { font-size: .82rem; color: var(--ink-2); margin-bottom: 12px; }
.buy-panel__row { display: flex; gap: 10px; margin-top: 12px; }
.vote--lg { padding: 11px 16px; }
.buy-panel__disclosure { font-size: .74rem; color: var(--muted); margin-top: 14px; display: flex; gap: 6px; }
.buy-panel__stamp { font-size: .72rem; color: var(--muted); margin-top: 8px; }

.deal-page__cols { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 26px; align-items: start; padding: 24px 0; }
.deal-page__main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.deal-page__aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 12px); }
.card-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card-panel h2 { display: flex; align-items: center; gap: 8px; font-size: 1.25rem; margin-bottom: 12px; }

/* score breakdown */
.breakdown__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.breakdown__head p { font-size: .88rem; color: var(--ink-2); }
.breakdown__list { display: grid; gap: 14px; }
.signal__top { display: flex; justify-content: space-between; font-size: .86rem; margin-bottom: 5px; }
.signal__name { font-weight: 700; }
.signal__weight { color: var(--muted); font-size: .76rem; }
.signal__bar { height: 8px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.signal__bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .8s; }
.signal__foot { display: flex; justify-content: space-between; font-size: .74rem; color: var(--muted); margin-top: 4px; }
.signal__pts { color: var(--brand-2); font-weight: 700; }
.breakdown__more { display: inline-flex; align-items: center; gap: 5px; margin-top: 16px; color: var(--brand-2); font-weight: 700; font-size: .86rem; }

/* price chart */
.chart__head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.chart__legend { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); }
.chart__legend strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.chart__svg { width: 100%; height: 200px; margin: 14px 0 8px; --brand: var(--brand-2); }
.chart__note { font-size: .78rem; color: var(--muted); }

.mini-deals { display: flex; flex-direction: column; gap: 4px; }
.mini-deal { display: flex; gap: 10px; padding: 8px; border-radius: 11px; }
.mini-deal:hover { background: var(--panel-2); }
.mini-deal img { width: 52px; height: 52px; object-fit: cover; border-radius: 9px; background: var(--panel-2); flex: none; }
.mini-deal__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.mini-deal__title { font-size: .84rem; font-weight: 600; line-height: 1.3; }
.mini-deal__meta { display: flex; align-items: center; justify-content: space-between; }
.mini-deal__meta strong { font-family: 'Sora', sans-serif; font-size: .92rem; }
.mini-deal__score { font-size: .74rem; font-weight: 800; color: var(--brand-2); background: color-mix(in srgb, var(--brand) 14%, transparent); padding: 1px 7px; border-radius: 6px; }

/* prose */
.prose { color: var(--ink-2); line-height: 1.75; }
.prose--page, .prose--intro { font-size: 1.02rem; }
.prose h2 { color: var(--ink); font-size: 1.3rem; margin: 1.4em 0 .5em; }
.prose ul { list-style: disc; padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose a { color: var(--brand-2); font-weight: 600; }
.prose strong { color: var(--ink); }

/* ---------------------------------------------------------- forms --------- */
.form-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 6px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.input { width: 100%; padding: 11px 14px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink); font-size: .95rem; }
.input:focus { outline: none; border-color: var(--brand); }
textarea.input { resize: vertical; line-height: 1.6; }
.req { color: var(--accent); }
.err { color: var(--bad); font-size: .8rem; margin-top: 5px; }

/* subscribe */
.subscribe-hero { text-align: center; padding: 50px 0 20px; }
.subscribe-hero__badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: .82rem; font-weight: 700; }
.subscribe-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 16px 0 10px; }
.subscribe-hero p { color: var(--ink-2); max-width: 56ch; margin: 0 auto; }
.subscribe-grid { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 24px; align-items: start; }
.subscribe-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-lg); }
.sub-step { padding: 16px 0; border-bottom: 1px solid var(--line); }
.sub-step:last-child { border-bottom: 0; }
.sub-step h3 { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; margin-bottom: 12px; font-family: 'Plus Jakarta Sans'; }
.sub-step__n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; color: #fff; background: var(--brand-strong); flex: none; }
.topic-group { display: flex; flex-direction: column; gap: 10px; }
.topic-list { display: flex; flex-wrap: wrap; gap: 8px; }
.topic { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: .84rem; font-weight: 600; cursor: pointer; }
.topic input { accent-color: var(--brand); }
.topic--all { font-weight: 800; }
.range { width: 100%; accent-color: var(--brand); }
.range-scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 4px; }
.sub-status { margin-top: 12px; font-size: .86rem; font-weight: 600; padding: 10px 12px; border-radius: 10px; }
.sub-status.is-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.sub-status.is-err { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.subscribe-side { display: flex; flex-direction: column; gap: 16px; }
.install-steps { display: grid; gap: 8px; margin-top: 12px; font-size: .84rem; color: var(--ink-2); }
.install-steps li { padding-left: 4px; }
.search-hero { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px 6px 6px 14px; max-width: 620px; margin-top: 16px; color: var(--muted); }
.search-hero input { flex: 1; background: none; border: 0; color: var(--ink); outline: none; font-size: 1rem; }
.search-count { margin-top: 14px; color: var(--ink-2); }

/* --------------------------------------------------------- install bar ---- */
.install-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line-2); box-shadow: 0 -14px 40px -20px rgba(0,0,0,.8);
    animation: barUp .4s ease; padding-bottom: env(safe-area-inset-bottom); }
@keyframes barUp { from { transform: translateY(100%); } to { transform: none; } }
.install-bar__inner { display: flex; align-items: center; gap: 14px; padding: 12px 20px; }
.install-bar__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--grab-a), var(--grab-b)); flex: none; }
.install-bar__text { display: flex; flex-direction: column; line-height: 1.3; }
.install-bar__text strong { font-size: .96rem; }
.install-bar__text span { font-size: .82rem; color: var(--ink-2); }
.install-bar__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.install-bar__close { color: var(--muted); padding: 6px; }
.install-bar__status { padding: 0 20px 10px; font-size: .82rem; font-weight: 600; }

/* --------------------------------------------------------------- footer --- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 40px; padding: 44px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.footer-brand p { color: var(--muted); font-size: .9rem; margin: 12px 0 14px; max-width: 40ch; }
.footer-social { display: flex; gap: 8px; margin-top: 14px; }
.footer-social a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line-2); color: var(--ink-2); }
.footer-social a:hover { color: var(--brand-2); border-color: var(--brand); }
.footer-col h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; font-family: 'Plus Jakarta Sans'; }
.footer-col a { display: block; padding: 5px 0; color: var(--ink-2); font-size: .9rem; }
.footer-col a:hover { color: var(--brand-2); }
.footer-disclosure { display: flex; gap: 8px; align-items: flex-start; margin-top: 30px; padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; font-size: .82rem; color: var(--muted); }
.footer-bottom a { color: var(--ink-2); }

/* --------------------------------------------------------- responsive ----- */
@media (max-width: 1040px) {
    .feed-layout, .deal-page__cols, .subscribe-grid { grid-template-columns: 1fr; }
    .feed-aside, .deal-page__aside { position: static; flex-direction: row; flex-wrap: wrap; }
    .feed-aside > *, .deal-page__aside > * { flex: 1 1 240px; }
    .deal-page__grid { grid-template-columns: 1fr; }
    .buy-panel { position: static; }
}
@media (max-width: 860px) {
    .hero__inner { grid-template-columns: 1fr; gap: 24px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .site-nav { position: fixed; top: 0; left: 0; bottom: 0; width: 78%; max-width: 320px; z-index: 96;
        flex-direction: column; align-items: stretch; gap: 4px; padding: 80px 16px 20px;
        background: var(--panel); border-right: 1px solid var(--line-2); transform: translateX(-100%); transition: transform .25s; }
    .site-nav.is-open { transform: none; box-shadow: var(--shadow-lg); }
    .site-nav a { padding: 12px 14px; font-size: 1rem; }
    .nav-toggle { display: grid; }
    .searchbox { flex-basis: auto; }
    .site-nav a.nav-submit { background: color-mix(in srgb, var(--brand) 14%, transparent); }
}
@media (max-width: 620px) {
    .searchbox { display: none; }
    .hero { padding: 26px 0 16px; }
    .hero__stats { grid-template-columns: 1fr 1fr; }
    .deal-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .footer-grid { grid-template-columns: 1fr; gap: 22px; }
    .install-bar__text span { display: none; }
    .alerts-btn span { display: none; }
    .buy-panel__scorebox { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
