/* =====================================================================
   ACCRA GRID — shell.css
   App shell: ticker, top bar, left rail, bottom tab bar, canvas + context
   column, footer, search overlay, sheets/modals, toasts, designs pill.
   All markup here is rendered by assets/js/app.js (AG.mount).
   ===================================================================== */

:root { --ticker-h: 30px; }
@media (min-width: 1024px) { :root { --ticker-h: 32px; } }

body.ag-shell { padding-left: var(--rail-w); padding-bottom: calc(var(--tab-h) + var(--safe-b)); }
@media (min-width: 1024px) { body.ag-shell { padding-bottom: 0; } }

.ag-skip {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--lime); padding: 10px 14px; border-radius: var(--r-md); font-weight: 600;
  transition: top var(--t-fast) var(--ease-out);
}
.ag-skip:focus { top: 12px; }

/* ---------------------------------------------------------------------
   Top: ticker + bar (ticker scrolls away, bar sticks)
   --------------------------------------------------------------------- */
.ag-top { position: sticky; top: calc(var(--ticker-h) * -1); z-index: 60; }

.ag-ticker {
  height: var(--ticker-h);
  display: flex; align-items: center;
  background: var(--ink); color: #DDE5DF;
  font-family: var(--font-num); font-size: 11px; font-weight: 500; letter-spacing: .01em;
  overflow: hidden; white-space: nowrap;
}
.ag-ticker__viewport { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ag-ticker__track { display: inline-flex; gap: 28px; padding-left: 12px; animation: ag-ticker 48s linear infinite; }
.ag-ticker:hover .ag-ticker__track { animation-play-state: paused; }
.ag-ticker__item { display: inline-flex; align-items: center; gap: 7px; }
.ag-ticker__item b { color: #fff; font-weight: 700; }
.ag-ticker__item .up { color: var(--lime); }
.ag-ticker__item .down { color: var(--coral); }
.ag-ticker__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); flex: none; }
.ag-ticker__dot--live { background: var(--coral); box-shadow: 0 0 0 0 rgba(255, 106, 77, .6); animation: ag-pulse 1.6s infinite; }
.ag-ticker__dot--momo { background: var(--momo); }
@keyframes ag-ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ag-ticker__track { animation: none; } }

.ag-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "logo loc mode bell" "search search search search";
  align-items: center;
  gap: 8px 8px;
  padding: 8px var(--gutter) 10px;
  background: rgba(245, 246, 241, .9);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.ag-bar__logo { grid-area: logo; }
.ag-bar .ag-loc { grid-area: loc; }
.ag-bar .ag-mode { grid-area: mode; }
.ag-bar .ag-bell { grid-area: bell; }
.ag-bar .ag-search-trigger { grid-area: search; }
.ag-bar .ag-wallet-chip, .ag-bar .ag-cart-btn, .ag-bar .ag-avatar-btn { display: none; }

@media (min-width: 1024px) {
  .ag-bar {
    grid-template-columns: minmax(280px, 1fr) auto auto auto auto auto auto;
    grid-template-areas: "search mode loc wallet bell cart me";
    height: calc(var(--top-h) - var(--ticker-h));
    padding: 0 var(--gutter);
    gap: 10px;
  }
  .ag-bar__logo { display: none; }
  .ag-bar .ag-wallet-chip { display: inline-flex; grid-area: wallet; }
  .ag-bar .ag-cart-btn { display: inline-grid; grid-area: cart; }
  .ag-bar .ag-avatar-btn { display: inline-flex; grid-area: me; }
  .ag-bar .ag-search-trigger { max-width: 640px; }
}

/* Logo */
.ag-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.ag-logo__mark { width: 34px; height: 34px; flex: none; }
.ag-logo__word { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.04em; font-variation-settings: "wdth" 85; line-height: 1; }
.ag-logo__word span { color: var(--volta); }
.ag-bar__logo .ag-logo__word { display: none; }
@media (min-width: 400px) { .ag-bar__logo .ag-logo__word { display: inline; } }

/* Location chip */
.ag-loc {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0; height: 40px; padding: 0 10px 0 8px;
  border-radius: var(--r-pill); color: var(--ink); text-align: left;
  transition: background var(--t-fast);
}
.ag-loc:hover { background: var(--paper-2); }
.ag-loc svg { flex: none; width: 18px; height: 18px; color: var(--volta); }
.ag-loc__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.ag-loc__label { font-size: 10px; color: var(--ink-3); font-weight: 500; }
.ag-loc__value { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-loc__value .ag-num { font-size: 11px; color: var(--ink-3); font-weight: 500; }

/* Search trigger (looks like an input, opens the overlay) */
.ag-search-trigger {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 46px; padding: 0 6px 0 14px;
  border-radius: var(--r-md); background: var(--card); color: var(--ink-3);
  box-shadow: var(--sh-0), var(--sh-1); text-align: left; font-size: 14px;
  transition: box-shadow var(--t-fast) var(--ease-out);
}
.ag-search-trigger:hover { box-shadow: 0 0 0 1px var(--line-2), var(--sh-2); }
.ag-search-trigger > svg { width: 20px; height: 20px; color: var(--ink); flex: none; }
.ag-search-trigger__text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-search-trigger .ag-kbd { display: none; }
@media (min-width: 1024px) { .ag-search-trigger .ag-kbd { display: inline-block; } }
.ag-search-trigger__mic {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--volta); color: var(--lime); flex: none;
}
.ag-search-trigger__mic svg { width: 18px; height: 18px; }

/* Wallet chip in the bar */
.ag-wallet-chip {
  align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 6px; border-radius: var(--r-pill);
  background: var(--volta); color: var(--volta-ink);
}
.ag-wallet-chip__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--momo); color: var(--ink); }
.ag-wallet-chip__icon svg { width: 17px; height: 17px; }
.ag-wallet-chip .ag-num { font-size: 13px; font-weight: 700; color: #fff; }
.ag-wallet-chip small { display: block; font-size: 10px; color: var(--volta-mute); line-height: 1; }

.ag-avatar-btn { align-items: center; gap: 8px; height: 44px; padding: 3px 12px 3px 3px; border-radius: var(--r-pill); background: var(--card); box-shadow: var(--sh-0); }
.ag-avatar-btn img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.ag-avatar-btn span { font-size: 13px; font-weight: 650; color: var(--ink); }

/* ---------------------------------------------------------------------
   Left rail (desktop)
   --------------------------------------------------------------------- */
.ag-rail { display: none; }
@media (min-width: 1024px) {
  .ag-rail {
    position: fixed; z-index: 59; inset: 0 auto 0 0; width: var(--rail-w);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 14px 0 64px;
    background: var(--volta); color: var(--volta-mute);
    background-image: var(--grid-dots-dark); background-size: var(--grid-size);
  }
  .ag-rail__logo { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px; border-radius: 16px; transition: transform var(--t-base) var(--ease-spring); }
  .ag-rail__logo:hover { transform: rotate(-6deg) scale(1.04); }
  .ag-rail__logo .ag-logo__mark { width: 44px; height: 44px; }
  .ag-rail__list { display: flex; flex-direction: column; gap: 4px; list-style: none; margin: 0; padding: 0; }
  .ag-rail__item {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    width: 64px; height: 60px; border-radius: 16px; font-size: 10.5px; font-weight: 600; letter-spacing: .01em;
    transition: background var(--t-fast), color var(--t-fast);
  }
  .ag-rail__item svg { width: 22px; height: 22px; transition: transform var(--t-base) var(--ease-spring); }
  .ag-rail__item:hover { color: #fff; background: var(--volta-2); }
  .ag-rail__item:hover svg { transform: translateY(-1px) scale(1.06); }
  .ag-rail__item[aria-current="page"] { color: var(--ink); background: var(--lime); }
  .ag-rail__item[aria-current="page"]::before {
    content: ""; position: absolute; left: -10px; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--lime);
  }
  .ag-rail__badge {
    position: absolute; top: 6px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--coral); color: #fff; font: 700 10px/18px var(--font-num); text-align: center;
  }
  .ag-rail__sep { width: 32px; height: 1px; background: var(--volta-3); margin: 8px 0; }
  .ag-rail__foot { margin-top: auto; }
}

/* ---------------------------------------------------------------------
   Bottom tab bar (mobile)
   --------------------------------------------------------------------- */
.ag-tabbar {
  position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line);
}
@media (min-width: 1024px) { .ag-tabbar { display: none; } }
.ag-tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 44px; color: var(--ink-3); font-size: 10.5px; font-weight: 600;
}
.ag-tab__icon { display: grid; place-items: center; width: 52px; height: 30px; border-radius: var(--r-pill); transition: background var(--t-base) var(--ease-out); }
.ag-tab__icon svg { width: 22px; height: 22px; }
.ag-tab[aria-current="page"] { color: var(--ink); }
.ag-tab[aria-current="page"] .ag-tab__icon { background: var(--lime); }
.ag-tab:active .ag-tab__icon { transform: scale(.92); }
.ag-tab__badge {
  position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--coral); color: #fff; font: 700 10px/18px var(--font-num); text-align: center; border: 2px solid #fff; box-sizing: content-box;
}
/* Centre tab: Susu — raised volta disc */
.ag-tab--susu .ag-tab__icon {
  width: 54px; height: 54px; margin-top: -22px; border-radius: 50%;
  background: var(--volta); color: var(--lime); box-shadow: 0 8px 20px -6px rgba(13, 59, 46, .55), 0 0 0 4px #fff;
}
.ag-tab--susu .ag-tab__icon svg { width: 26px; height: 26px; }
.ag-tab--susu[aria-current="page"] .ag-tab__icon { background: var(--lime); color: var(--volta); }

/* ---------------------------------------------------------------------
   Canvas + optional right context column
   --------------------------------------------------------------------- */
.ag-main { display: block; min-width: 0; }
.ag-canvas { width: 100%; max-width: 1680px; margin-inline: auto; padding: var(--s-4) var(--gutter) var(--s-9); }
.ag-canvas > .ag-content { min-width: 0; }
.ag-ctx { display: none; }
@media (min-width: 1280px) {
  .ag-canvas--ctx { display: grid; grid-template-columns: minmax(0, 1fr) var(--ctx-w); gap: var(--gap); align-items: start; }
  .ag-canvas--ctx > .ag-ctx {
    display: flex; flex-direction: column; gap: var(--gap);
    position: sticky; top: calc(var(--top-h) - var(--ticker-h) + 16px);
    max-height: calc(100vh - (var(--top-h) - var(--ticker-h)) - 32px); overflow-y: auto; scrollbar-width: none;
  }
  .ag-canvas--ctx > .ag-ctx::-webkit-scrollbar { display: none; }
}
@media (min-width: 1024px) { .ag-canvas { padding-top: var(--s-6); } }

/* ---------------------------------------------------------------------
   Footer — the last, biggest bento tile
   --------------------------------------------------------------------- */
.ag-foot { padding: 0 var(--gutter) var(--s-4); }
.ag-foot__tile {
  max-width: 1680px; margin-inline: auto; border-radius: var(--r-2xl); overflow: hidden;
  background: var(--volta); color: var(--volta-ink);
  background-image: var(--grid-dots-dark); background-size: var(--grid-size);
}
.ag-foot a:hover { color: var(--lime); }
.ag-foot__top { display: grid; gap: var(--s-6); padding: var(--s-7) var(--s-5); border-bottom: 1px solid var(--volta-3); }
.ag-foot__brand .ag-logo { color: #fff; }
.ag-foot__brand .ag-logo__word span { color: var(--lime); }
.ag-foot__tagline { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); line-height: .98; letter-spacing: -0.035em; color: #fff; margin-top: var(--s-4); font-variation-settings: "wdth" 84; }
.ag-foot__tagline em { font-style: normal; color: var(--lime); }
.ag-foot__sub { margin-top: var(--s-3); color: var(--volta-mute); font-size: 14px; max-width: 42ch; }
.ag-foot__alerts { display: flex; flex-direction: column; gap: var(--s-3); }
.ag-foot__alerts label { font-size: 13px; font-weight: 600; color: #fff; }
.ag-foot__form { display: flex; gap: 8px; }
.ag-foot__form .ag-input { background: var(--volta-2); border-color: var(--volta-3); color: #fff; }
.ag-foot__form .ag-input::placeholder { color: var(--volta-mute); }
.ag-foot__apps { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-store-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px 0 12px; border-radius: var(--r-md);
  background: var(--ink); color: #fff; border: 1px solid rgba(255, 255, 255, .14); transition: transform var(--t-fast) var(--ease-out);
}
.ag-store-btn:hover { transform: translateY(-2px); color: #fff !important; }
.ag-store-btn svg { width: 22px; height: 22px; color: var(--lime); }
.ag-store-btn small { display: block; font-size: 10px; color: #A9B4AC; line-height: 1.1; }
.ag-store-btn b { display: block; font-size: 14px; line-height: 1.15; }

.ag-foot__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); padding: var(--s-7) var(--s-5); }
.ag-foot__col h3 { font-family: var(--font-num); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); margin-bottom: var(--s-3); }
.ag-foot__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.ag-foot__col a { display: inline-flex; align-items: center; min-height: 32px; font-size: 14px; color: var(--volta-ink); }

.ag-foot__regions { padding: 0 var(--s-5) var(--s-7); }
.ag-foot__regions h3 { font-family: var(--font-num); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); margin-bottom: var(--s-3); }
.ag-region-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; list-style: none; padding: 0; margin: 0; }
.ag-region-grid li {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--volta-2); box-shadow: var(--sh-inset); min-width: 0;
}
.ag-region-grid b { font-family: var(--font-num); font-size: 13px; color: #fff; }
.ag-region-grid span { font-size: 10.5px; color: var(--volta-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ag-foot__pay { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-6) var(--s-5); border-top: 1px solid var(--volta-3); }
.ag-pay-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ag-trust-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.ag-trust { display: flex; gap: 10px; align-items: flex-start; }
.ag-trust svg { flex: none; width: 20px; height: 20px; color: var(--lime); margin-top: 1px; }
.ag-trust b { display: block; color: #fff; font-size: 13px; }
.ag-trust span { display: block; color: var(--volta-mute); font-size: 12px; }

.ag-foot__base {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-4) var(--s-5); background: rgba(0, 0, 0, .18); font-size: 12px; color: var(--volta-mute);
}
.ag-social { display: flex; gap: 6px; }
.ag-social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--volta-2); color: var(--volta-ink); }
.ag-social a:hover { background: var(--lime); color: var(--ink) !important; }
.ag-social svg { width: 18px; height: 18px; }

@media (min-width: 640px) {
  .ag-foot__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ag-region-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .ag-trust-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .ag-foot { padding-bottom: var(--s-6); }
  .ag-foot__top { grid-template-columns: 1.3fr 1fr; padding: var(--s-9) var(--s-8) var(--s-8); align-items: end; }
  .ag-foot__cols { padding: var(--s-8); }
  .ag-foot__regions { padding: 0 var(--s-8) var(--s-8); }
  .ag-foot__pay { flex-direction: row; justify-content: space-between; align-items: center; padding: var(--s-6) var(--s-8); }
  .ag-foot__pay .ag-trust-row { flex: 1; max-width: 860px; }
  .ag-foot__base { padding: var(--s-4) var(--s-8) var(--s-4) calc(var(--s-8) + 150px); }
}

/* ---------------------------------------------------------------------
   Scrim, sheet (bottom sheet on phones / right drawer on desktop), modal
   --------------------------------------------------------------------- */
.ag-scrim {
  position: fixed; inset: 0; z-index: 90; background: rgba(11, 15, 12, .5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity var(--t-base) var(--ease-out);
}
.ag-scrim.is-open { opacity: 1; pointer-events: auto; }

.ag-sheet {
  position: fixed; z-index: 95; left: 0; right: 0; bottom: 0;
  max-height: 90vh; display: flex; flex-direction: column;
  background: var(--paper); border-radius: var(--r-2xl) var(--r-2xl) 0 0; box-shadow: var(--sh-3);
  transform: translateY(105%); transition: transform var(--t-slow) var(--ease-out); visibility: hidden;
}
.ag-sheet.is-open { transform: none; visibility: visible; }
.ag-sheet__grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 10px auto 0; flex: none; }
.ag-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-5); flex: none; }
.ag-sheet__head h2 { font-size: var(--fs-lg); }
.ag-sheet__body { padding: 0 var(--s-5) calc(var(--s-6) + var(--safe-b)); overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 1024px) {
  .ag-sheet { left: auto; top: 12px; right: 12px; bottom: 12px; width: 440px; max-height: none; border-radius: var(--r-2xl); transform: translateX(110%); }
  .ag-sheet__grab { display: none; }
  .ag-sheet__head { padding: var(--s-5) var(--s-6) var(--s-3); }
  .ag-sheet__body { padding: 0 var(--s-6) var(--s-6); }
}

.ag-modal {
  position: fixed; z-index: 100; left: 50%; top: 50%; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--card); border-radius: var(--r-2xl); box-shadow: var(--sh-3); padding: var(--s-6);
  transform: translate(-50%, -46%) scale(.97); opacity: 0; visibility: hidden;
  transition: transform var(--t-base) var(--ease-out), opacity var(--t-base) var(--ease-out), visibility 0s linear var(--t-base);
}
.ag-modal.is-open { transform: translate(-50%, -50%); opacity: 1; visibility: visible; transition-delay: 0s; }
.ag-modal__close { position: absolute; top: 12px; right: 12px; }

/* ---------------------------------------------------------------------
   Search overlay (command palette on desktop, full screen on phones)
   --------------------------------------------------------------------- */
.ag-search {
  position: fixed; z-index: 110; inset: 0; display: flex; flex-direction: column;
  background: var(--paper); opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out), visibility 0s linear var(--t-base);
}
.ag-search.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.ag-search__head { display: flex; align-items: center; gap: 8px; padding: 10px var(--gutter); border-bottom: 1px solid var(--line); }
.ag-search__field {
  flex: 1; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 6px 0 12px;
  border-radius: var(--r-md); background: var(--card); box-shadow: 0 0 0 2px var(--ink);
}
.ag-search__field svg { width: 20px; height: 20px; flex: none; }
.ag-search__field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font-size: 16px; color: var(--ink); }
.ag-search__field input:focus-visible { box-shadow: none; }
.ag-search__langs { display: flex; gap: 6px; padding: 10px var(--gutter); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.ag-search__langs::-webkit-scrollbar { display: none; }
.ag-search__body { flex: 1; overflow-y: auto; padding: var(--s-4) var(--gutter) var(--s-8); display: grid; gap: var(--s-6); align-content: start; }
.ag-search__group h3 { margin-bottom: var(--s-2); }
.ag-search__results { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.ag-search__result {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 8px; border-radius: var(--r-md); color: var(--ink);
}
.ag-search__result:hover, .ag-search__result.is-active { background: var(--card); box-shadow: var(--sh-1); }
.ag-search__result > svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.ag-search__result img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: var(--paper-2); }
.ag-search__result mark { background: var(--lime); color: inherit; border-radius: 3px; padding: 0 1px; }
.ag-search__result .ag-num { margin-left: auto; font-size: 13px; font-weight: 600; flex: none; }
.ag-trend-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 2px; counter-reset: trend; }
.ag-trend-list a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 4px 8px; border-radius: var(--r-md); color: var(--ink); font-weight: 550; }
.ag-trend-list a:hover { background: var(--card); }
.ag-trend-list .rank { font-family: var(--font-num); font-size: 12px; font-weight: 700; color: var(--ink-4); width: 22px; }
.ag-trend-list li:nth-child(-n+3) .rank { color: var(--coral-ink); }
.ag-trend-list .note { font-size: 11px; color: var(--ink-3); font-weight: 500; }
.ag-trend-list svg { width: 16px; height: 16px; margin-left: auto; flex: none; }
.ag-trend-list .t-up { color: var(--success); } .ag-trend-list .t-new { color: var(--coral-ink); } .ag-trend-list .t-steady { color: var(--ink-4); }

/* Voice state */
.ag-voice {
  display: none; flex-direction: column; align-items: center; gap: var(--s-3); padding: var(--s-7) var(--s-4);
  border-radius: var(--r-xl); background: var(--volta); color: var(--volta-ink); text-align: center;
  background-image: var(--grid-dots-dark); background-size: var(--grid-size);
}
.ag-search.is-listening .ag-voice { display: flex; }
.ag-voice__bars { display: flex; align-items: center; gap: 5px; height: 48px; }
.ag-voice__bars i { width: 6px; height: 100%; border-radius: 3px; background: var(--lime); animation: ag-voice 900ms var(--ease-in-out) infinite; transform-origin: center; }
.ag-voice__bars i:nth-child(2) { animation-delay: -120ms; } .ag-voice__bars i:nth-child(3) { animation-delay: -360ms; }
.ag-voice__bars i:nth-child(4) { animation-delay: -600ms; } .ag-voice__bars i:nth-child(5) { animation-delay: -240ms; }
.ag-voice b { font-family: var(--font-display); font-size: 22px; color: #fff; }
.ag-voice p { font-size: 13px; color: var(--volta-mute); }
@keyframes ag-voice { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

@media (min-width: 1024px) {
  .ag-search {
    inset: 72px auto auto 50%; width: min(760px, calc(100vw - 2 * var(--rail-w))); max-height: calc(100vh - 120px);
    transform: translate(-50%, 8px); border-radius: var(--r-2xl); box-shadow: var(--sh-3), 0 0 0 1px var(--line); overflow: hidden;
  }
  .ag-search.is-open { transform: translate(-50%, 0); }
  .ag-search__head { padding: 14px 18px; }
  .ag-search__langs { padding: 10px 18px; }
  .ag-search__body { padding: 18px; grid-template-columns: 1fr 1fr; }
  .ag-search__body > .ag-search__group--wide, .ag-search__body > .ag-voice { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------------
   Toasts + fly-to-cart
   --------------------------------------------------------------------- */
.ag-toasts {
  position: fixed; z-index: 120; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 12px);
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
@media (min-width: 1024px) { .ag-toasts { left: auto; right: 24px; bottom: 24px; align-items: flex-end; width: 380px; } }
.ag-fly {
  position: fixed; z-index: 130; width: 56px; height: 56px; border-radius: 14px; object-fit: cover; pointer-events: none;
  box-shadow: var(--sh-3); border: 2px solid #fff;
  transition: transform 640ms cubic-bezier(.5, -0.2, .4, 1), opacity 640ms var(--ease-in-out);
}

@keyframes ag-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 106, 77, .55); } 70% { box-shadow: 0 0 0 8px rgba(255, 106, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 106, 77, 0); } }
@keyframes ag-bump { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }
.is-bumping { animation: ag-bump 420ms var(--ease-spring); }

body.ag-locked { overflow: hidden; }

/* QA fixes */
.ag-canvas--ctx > .ag-ctx > * { flex-shrink: 0; }
.ag-loc__value .ag-num { display: none; }
@media (min-width: 1024px) { .ag-loc__value .ag-num { display: inline; } }
.ag-rail__logo { box-shadow: 0 0 0 1px var(--volta-3); }
