/* ═══ auction house v2 (2026-10-11): amazon-like store in the site's own glass — buy on the web, pick up with /ah my ═══
   only scoped to body.ah-page. every value comes from styles.css: white glass rows (.mk-card / .stats-row), the account
   sheet (.acct-sheet), the language dropdown (.lang-dropdown), gold prices (#ffcc00), enchant lilac (#c9b8ff),
   ok green (#7ee2a0), error red (#ff8a80), accent green (#6de394). nothing new. */

body.ah-page main.ah { width: min(1080px, calc(100vw - 32px)); max-width: none; gap: 22px; }
body.ah-page main.ah > * { min-width: 0; }
.ah [hidden] { display: none !important; }
.ah-head .stats-sub code, .ah code { padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,0.14); color: #fff; font-size: 0.92em; }
.ah-mock { display: inline-flex; align-items: center; gap: 8px; margin: 14px auto 0; padding: 4px 12px; border-radius: 999px; width: max-content; max-width: 100%;
  background: rgba(255,204,0,0.14); border: 1px solid rgba(255,204,0,0.42); color: #ffcc00; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; font-size: 0.66rem; }
.ah-head { display: grid; justify-items: center; }

/* ── sticky bar: search · balance · cart ── */
.ah-bar { position: sticky; top: calc(var(--ah-hdr, 56px) + 10px); z-index: 30; display: flex; align-items: center; gap: 12px; padding: 8px;
  border-radius: 999px; background: rgba(8,12,20,0.62); border: 1px solid rgba(255,255,255,0.14);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 12px 32px rgba(0,0,0,0.32); }
.ah-bar .stats-search { flex: 1; width: auto; height: 44px; min-width: 0; }
.ah-bar .stats-search input::-webkit-search-cancel-button { display: none; }
.ah-clear { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.14); color: #fff; cursor: pointer; font-size: 0.72rem; }
.ah-clear:hover { background: rgba(255,255,255,0.26); }
.ah-balance { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; white-space: nowrap; text-decoration: none;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.72); font-size: 0.84rem; }
.ah-balance strong { color: #ffcc00; font-weight: 800; font-variant-numeric: tabular-nums; }
a.ah-balance { color: #111; background: rgba(255,255,255,0.9); border-color: transparent; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; font-size: 0.72rem; }
a.ah-balance:hover { background: #fff; }
.ah-balance.is-load { color: rgba(255,255,255,0.45); }
.ah-cart-btn { position: relative; flex: none; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px 0 14px; border-radius: 999px; cursor: pointer;
  border: 0; background: rgba(255,255,255,0.9); color: #111; font: inherit; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; font-size: 0.72rem;
  box-shadow: inset 0 1.5px 0 #fff, 0 8px 22px rgba(0,0,0,0.28); transition: transform .2s ease, background .2s ease; }
.ah-cart-btn:hover { background: #fff; transform: translateY(-1px); }
.ah-cart-btn svg { width: 20px; height: 20px; }
.ah-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: #111; color: #fff;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.ah-badge.is-zero { background: rgba(0,0,0,0.18); color: rgba(0,0,0,0.55); }
.ah-badge.is-bump { animation: ahBump .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes ahBump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* pick-up banner (paid web purchases waiting in game) */
.ah-pickup { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 20px; color: #fff;
  background: rgba(255,204,0,0.12); border: 1px solid rgba(255,204,0,0.42); box-shadow: inset 0 1px 0 rgba(255,255,255,0.22); }
.ah-pickup strong { color: #ffcc00; }
.ah-pickup-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(255,204,0,0.9); color: #1a1400; font-weight: 800; }

/* ── layout: category rail | results ── */
.ah-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: start; }
.ah-rail { position: sticky; top: calc(var(--ah-hdr, 56px) + 84px); display: grid; gap: 4px; padding: 12px; border-radius: 22px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
  max-height: calc(100vh - var(--ah-hdr, 56px) - 104px); overflow: auto; scrollbar-width: none; }
.ah-rail::-webkit-scrollbar { display: none; }
.ah-rail-h { margin: 4px 8px 8px; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; font-size: 0.66rem; }
.ah-cat { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 14px;
  background: none; color: rgba(255,255,255,0.78); font: inherit; font-size: 0.88rem; font-weight: 600; text-align: left; cursor: pointer; transition: background .18s ease, color .18s ease; }
.ah-cat:hover { background: rgba(255,255,255,0.09); color: #fff; }
.ah-cat .prices-icon, .ah-cat svg { width: 22px; height: 22px; justify-self: center; }
.ah-cat span { overflow-wrap: anywhere; line-height: 1.2; }
.ah-cat em { font-style: normal; font-size: 0.74rem; font-weight: 700; color: rgba(255,255,255,0.5); font-variant-numeric: tabular-nums; }
.ah-cat.is-on { background: rgba(255,255,255,0.9); color: #111; }
.ah-cat.is-on em { color: rgba(0,0,0,0.55); }
.ah-cat.is-zero:not(.is-on) { color: rgba(255,255,255,0.42); }
.ah-cat.is-zero:not(.is-on) .prices-icon { opacity: .45; }

/* chips (below 900px the rail turns into one scrollable chip row) */
.ah-chips { display: none; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.ah-chips::-webkit-scrollbar { display: none; }
.ah-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 8px; border-radius: 999px; cursor: pointer; scroll-snap-align: start;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.8); font: inherit; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.ah-chip .prices-icon, .ah-chip svg { width: 20px; height: 20px; }
.ah-chip em { font-style: normal; color: rgba(255,255,255,0.5); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.ah-chip.is-on { background: rgba(255,255,255,0.9); border-color: transparent; color: #111; }
.ah-chip.is-on em { color: rgba(0,0,0,0.55); }

/* results head: count · stale · affordable chip · sort */
.ah-main { display: grid; gap: 16px; min-width: 0; }
.ah-rhead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; min-height: 40px; }
.ah-info { flex: 1 1 auto; min-width: 0; margin: 0; color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.ah-info strong { color: #fff; }
.ah-stale { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(255,204,0,0.14); border: 1px solid rgba(255,204,0,0.42);
  color: #ffcc00; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; font-size: 0.64rem; white-space: nowrap; }
.ah-toggle { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer; font: inherit;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.78); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; font-size: 0.66rem; white-space: nowrap; }
.ah-toggle i { width: 14px; height: 14px; border-radius: 5px; border: 1.5px solid rgba(255,255,255,0.55); display: grid; place-items: center; font-style: normal; font-size: 0.6rem; }
.ah-toggle.is-on { background: rgba(255,255,255,0.9); color: #111; border-color: transparent; }
.ah-toggle.is-on i { background: #111; border-color: #111; color: #fff; }
.ah-rhead .ah-balance { display: none; }

/* glass dropdown (same glass as the language menu) — never a native <select> */
.ah-dd { position: relative; flex: none; }
.ah-dd-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer; font: inherit;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.22); box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.18); color: #fff;
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; font-size: 0.66rem; white-space: nowrap; transition: background .2s ease; }
.ah-dd-btn:hover { background: rgba(255,255,255,0.18); }
.ah-dd-btn small { color: rgba(255,255,255,0.55); font-size: inherit; font-weight: 600; }
.ah-dd-btn b { font-size: 0.55rem; opacity: .65; transition: transform .2s ease; }
.ah-dd.open .ah-dd-btn b { transform: rotate(180deg); }
.ah-dd-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; min-width: 210px; padding: 0; margin: 0; list-style: none;
  background: rgba(12,20,34,0.96); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.18); border-radius: 14px; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.12); }
.ah-dd.open .ah-dd-menu { display: block; animation: langFadeIn 0.18s cubic-bezier(0.22,1,0.36,1); }
.ah-dd-menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 0; border-bottom: 1px solid rgba(255,255,255,0.06);
  background: none; color: rgba(230,241,255,0.75); font: inherit; font-size: 0.86rem; font-weight: 500; text-align: left; cursor: pointer; }
.ah-dd-menu li:last-child button { border-bottom: 0; }
.ah-dd-menu button:hover { background: rgba(255,255,255,0.09); color: #fff; }
.ah-dd-menu button.is-on { color: #6de394; font-weight: 700; }
.ah-dd-menu button.is-on::after { content: "✓"; }

/* ── product grid ── */
.ah-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 14px; }
.ah-card { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 22px; color: #fff; overflow: hidden;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.16); box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform .22s cubic-bezier(.22,1,.36,1), background .22s ease, border-color .22s ease; }
.ah-card:hover { transform: translateY(-3px); background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.26); }
.ah-media { position: relative; display: grid; place-items: center; height: 132px; margin: 8px 8px 0; border: 0; border-radius: 16px; cursor: pointer; padding: 0;
  background: radial-gradient(circle at 50% 46%, rgba(255,255,255,0.12), rgba(0,0,0,0.0) 62%), rgba(0,0,0,0.24); }
.ah-media .prices-icon { width: 64px; height: 64px; filter: drop-shadow(0 8px 14px rgba(0,0,0,0.45)); transition: transform .3s cubic-bezier(.34,1.3,.64,1); }
.ah-card:hover .ah-media .prices-icon { transform: translateY(-3px) scale(1.06); }
.ah-card.is-ench .ah-media { background: radial-gradient(circle at 50% 46%, rgba(201,184,255,0.30), rgba(201,184,255,0) 60%), rgba(0,0,0,0.24); }
.ah-card.is-rare { border-color: rgba(255,204,0,0.38); }
.ah-card.is-rare .ah-media { background: radial-gradient(circle at 50% 46%, rgba(255,204,0,0.26), rgba(255,204,0,0) 60%), rgba(0,0,0,0.24); }
.ah-qty { position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 999px; background: #ffcc00; color: #1a1400; font-size: 0.72rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ah-tag { position: absolute; left: 10px; top: 10px; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 9px; border-radius: 999px;
  background: rgba(8,12,20,0.55); border: 1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.75); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; font-size: 0.58rem; }
.ah-body { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 12px 14px 14px; min-width: 0; }
.ah-title { margin: 0; font-size: 0.98rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.ah-title button { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ah-title button:hover { text-decoration: underline; text-decoration-color: rgba(255,255,255,0.4); text-underline-offset: 3px; }
.ah-ench { margin: 0; color: #c9b8ff; font-size: 0.78rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ah-seller { display: flex; align-items: center; gap: 7px; margin: 0; color: rgba(255,255,255,0.66); font-size: 0.8rem; min-width: 0; }
.ah-seller span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-seller b { color: #fff; font-weight: 600; }
.ah-seller .mk-head { width: 18px; height: 18px; }
.ah-price { margin: auto 0 0; padding-top: 6px; display: grid; gap: 1px; }
.ah-price small:empty::before { content: "\00a0"; }
.ah-price strong { color: #ffcc00; font-size: 1.42rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ah-price small { color: rgba(255,255,255,0.55); font-size: 0.76rem; font-variant-numeric: tabular-nums; }
.ah-left { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: rgba(255,255,255,0.6); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.ah-left svg { width: 13px; height: 13px; flex: none; }
.ah-left.is-soon { color: #ffcc00; font-weight: 700; }
.ah-left.is-over { color: #ff8a80; font-weight: 700; }
.ah-add { margin-top: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 40px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 0; background: rgba(255,255,255,0.9); color: #111; font: inherit; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; font-size: 0.68rem; white-space: nowrap;
  box-shadow: inset 0 1.5px 0 #fff, 0 6px 16px rgba(0,0,0,0.22); transition: transform .2s ease, background .2s ease, color .2s ease; }
.ah-add:hover:not(:disabled) { background: #fff; transform: translateY(-1px); }
.ah-add svg { width: 15px; height: 15px; flex: none; }
.ah-add.is-in { background: rgba(126,226,160,0.16); color: #7ee2a0; box-shadow: inset 0 0 0 1px rgba(126,226,160,0.5); }
.ah-add.is-in:hover:not(:disabled) { background: rgba(126,226,160,0.24); }
.ah-add.is-warn { background: rgba(255,255,255,0.10); color: rgba(255,255,255,0.72); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
.ah-add:disabled { cursor: default; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }
.ah-card.is-own { border-style: dashed; }
.ah-card.is-expired { opacity: .5; }
.ah-more { justify-self: center; }

/* skeleton while the first answer is on its way */
.ah-skel { height: 330px; border-radius: 22px; background: linear-gradient(100deg, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.13) 50%, rgba(255,255,255,0.06) 70%) 0 0 / 300% 100%;
  border: 1px solid rgba(255,255,255,0.10); animation: ahShimmer 1.4s linear infinite; }
@keyframes ahShimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* empty states */
.ah-empty { display: grid; justify-items: center; gap: 10px; padding: 46px 22px; border-radius: 24px; text-align: center;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); box-shadow: inset 0 1px 0 rgba(255,255,255,0.22); color: #fff; }
.ah-empty-ico { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 22px; background: rgba(0,0,0,0.24); margin-bottom: 6px; }
.ah-empty-ico .prices-icon { width: 46px; height: 46px; }
.ah-empty h2 { margin: 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.ah-empty p { margin: 0; max-width: 460px; color: rgba(255,255,255,0.66); }
.ah-empty .ah-steps { display: grid; gap: 8px; width: min(420px, 100%); margin-top: 10px; text-align: left; }
.ah-empty .acct-step { font-size: 0.9rem; }
.ah-empty .btn { margin-top: 8px; }
.ah .btn-ghost, .ah-drawer .btn-ghost { color: #fff; background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.22); box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.18); }
.ah .btn-ghost:hover, .ah-drawer .btn-ghost:hover { background: rgba(255,255,255,0.18); }

/* ── my purchases ── */
.ah-orders { display: grid; gap: 12px; }
.ah-orders h2 { margin: 0; color: #fff; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
.ah-orders h2::before { content: ""; display: inline-block; width: 18px; height: 2px; margin: 0 10px 5px 0; border-radius: 2px; background: #ffcc00; vertical-align: middle; }
.ah-olist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ah-orow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.16); box-shadow: inset 0 1px 0 rgba(255,255,255,0.22); color: #fff; }
.ah-orow-name { min-width: 0; }
.ah-orow-name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ah-orow-name small { color: rgba(255,255,255,0.55); font-size: 0.78rem; }
.ah-orow-price { color: #ffcc00; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ah-st { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; font-size: 0.62rem;
  background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); border: 1px solid rgba(255,255,255,0.18); }
.ah-st.is-paid { background: rgba(255,204,0,0.16); color: #ffcc00; border-color: rgba(255,204,0,0.45); }
.ah-st.is-delivered { background: rgba(126,226,160,0.14); color: #7ee2a0; border-color: rgba(126,226,160,0.45); }
.ah-st.is-failed { background: rgba(255,138,128,0.12); color: #ff8a80; border-color: rgba(255,138,128,0.42); }
.ah-spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ahSpin .8s linear infinite; flex: none; }
@keyframes ahSpin { to { transform: rotate(360deg); } }

/* ── overlays: product detail (centred sheet) + cart (drawer right / bottom sheet on phones) ── */
.ah-overlay { position: fixed; inset: 0; z-index: 4000; background: rgba(4,7,12,0.38); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  opacity: 0; pointer-events: none; transition: opacity .22s ease; }
.ah-overlay.open { opacity: 1; pointer-events: auto; }
.ah-overlay.open .acct-sheet { transform: none; }
.ah-modal { display: flex; align-items: center; justify-content: center; padding: calc(var(--ah-hdr, 56px) + 16px) 16px 16px; }
.ah-modal .acct-sheet { width: min(640px, 100%); max-height: calc(100vh - var(--ah-hdr, 56px) - 32px); padding: 28px; }
.ah-dt-top { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 22px; align-items: center; margin-right: 34px; }
.ah-dt-top .ah-media { height: 132px; margin: 0; cursor: default; }
.ah-dt-top .ah-media .prices-icon { width: 76px; height: 76px; }
.ah-dt-top h2 { margin: 6px 0 4px; color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; overflow-wrap: anywhere; }
.ah-dt-mat { margin: 0; color: rgba(255,255,255,0.55); font-size: 0.86rem; }
.ah-dt-cat { display: inline-block; padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.78);
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; font-size: 0.6rem; }
.ah-dt-sec { margin: 20px 0 0; }
.ah-dt-sec h3 { margin: 0 0 8px; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; font-size: 0.66rem; }
.ah-dt-ench { display: flex; flex-wrap: wrap; gap: 6px; }
.ah-dt-ench span { padding: 4px 10px; border-radius: 999px; background: rgba(201,184,255,0.12); border: 1px solid rgba(201,184,255,0.35); color: #c9b8ff; font-size: 0.82rem; font-weight: 600; }
.ah-dt-lore { margin: 0; padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,0.24); color: rgba(201,184,255,0.88); font-style: italic; font-size: 0.88rem; line-height: 1.5; overflow-wrap: anywhere; }
.ah-dt-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.ah-dt-facts > div { display: grid; gap: 3px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); min-width: 0; }
.ah-dt-facts em { font-style: normal; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; font-size: 0.6rem; }
.ah-dt-facts b { display: flex; align-items: center; gap: 6px; color: #fff; font-size: 0.92rem; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ah-dt-buy { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.12); }
.ah-dt-buy .ah-price { margin: 0; padding: 0; flex: 1; min-width: 0; }
.ah-dt-buy .ah-price small:empty { display: none; }
.ah-ci.is-failed .ah-ci-end strong { color: rgba(255,255,255,0.42); text-decoration: line-through; }
.ah-dt-buy .ah-price strong { font-size: 1.8rem; }
.ah-dt-buy .ah-add { width: auto; min-width: 210px; height: 46px; margin: 0; font-size: 0.72rem; }
.ah-dt-hint { margin: 12px 0 0; color: rgba(255,255,255,0.55); font-size: 0.82rem; text-align: center; }

.ah-drawer .acct-sheet { position: absolute; top: calc(var(--ah-hdr, 56px) + 10px); right: 10px; bottom: 10px; width: min(420px, calc(100vw - 20px)); max-height: none;
  display: flex; flex-direction: column; padding: 0; overflow: hidden; transform: translateX(24px); }
.ah-drawer.open .acct-sheet { transform: none; }
.ah-dr-head { display: flex; align-items: center; gap: 10px; padding: 22px 22px 14px; border-bottom: 1px solid rgba(255,255,255,0.10); }
.ah-dr-head h2 { margin: 0; flex: 1; color: #fff; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.ah-dr-head .acct-close { position: static; flex: none; }
.ah-dr-body { flex: 1; overflow: auto; padding: 14px 16px; display: grid; align-content: start; gap: 8px; }
.ah-ci { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 10px 10px 8px; border-radius: 16px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); }
.ah-ci-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: rgba(0,0,0,0.24); }
.ah-ci-ico .prices-icon { width: 32px; height: 32px; }
.ah-ci-name { min-width: 0; }
.ah-ci-name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-weight: 700; font-size: 0.92rem; }
.ah-ci-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,0.55); font-size: 0.76rem; }
.ah-ci-name small.is-ok { color: #7ee2a0; white-space: normal; }
.ah-ci-name small.is-paid { color: #ffcc00; white-space: normal; }
.ah-ci-name small.is-err { color: #ff8a80; white-space: normal; }
.ah-ci-name small.is-pend { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,0.75); }
.ah-ci-end { display: grid; justify-items: end; gap: 4px; }
.ah-ci-end strong { color: #ffcc00; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ah-ci-rm { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75); cursor: pointer; font-size: 0.72rem; }
.ah-ci-rm:hover { background: rgba(255,138,128,0.18); color: #ff8a80; border-color: rgba(255,138,128,0.45); }
.ah-ci.is-failed { border-color: rgba(255,138,128,0.32); }
.ah-ci.is-paid { border-color: rgba(255,204,0,0.38); }
.ah-ci.is-delivered { border-color: rgba(126,226,160,0.38); }
.ah-dr-empty { display: grid; justify-items: center; gap: 8px; padding: 40px 10px; text-align: center; color: rgba(255,255,255,0.62); }
.ah-dr-empty svg { width: 46px; height: 46px; color: rgba(255,255,255,0.35); }
.ah-dr-empty b { color: #fff; font-size: 1.05rem; }
.ah-dr-foot { padding: 14px 20px 20px; border-top: 1px solid rgba(255,255,255,0.10); background: rgba(0,0,0,0.12); display: grid; gap: 6px; }
.ah-sum { display: flex; justify-content: space-between; gap: 10px; color: rgba(255,255,255,0.66); font-size: 0.88rem; }
.ah-sum b { color: #fff; font-variant-numeric: tabular-nums; }
.ah-sum.is-total { margin-top: 2px; color: #fff; font-size: 1rem; font-weight: 700; }
.ah-sum.is-total b { color: #ffcc00; font-size: 1.3rem; font-weight: 800; }
.ah-sum.is-neg b { color: #ff8a80; }
.ah-dr-foot .acct-btn { margin-top: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.ah-dr-msg { margin: 4px 0 0; min-height: 0; text-align: center; font-size: 0.84rem; color: rgba(255,255,255,0.6); }
.ah-dr-msg.err { color: #ff8a80; }
.ah-dr-msg.ok { color: #7ee2a0; }
.ah-dr-note { margin: 0; text-align: center; color: rgba(255,255,255,0.5); font-size: 0.76rem; }
.ah-co-head { display: grid; gap: 4px; padding: 6px 4px 8px; text-align: center; }
.ah-co-head b { color: #fff; font-size: 1.05rem; }
.ah-co-head span { color: rgba(255,255,255,0.62); font-size: 0.86rem; }
.ah-co-head code { color: #fff; }

/* toast */
.ah-toast { position: fixed; left: 50%; bottom: 22px; z-index: 6000; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; max-width: calc(100vw - 32px);
  padding: 11px 18px; border-radius: 999px; background: rgba(12,20,34,0.94); border: 1px solid rgba(255,255,255,0.18); color: #fff; font-size: 0.88rem; text-align: center;
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); box-shadow: 0 16px 40px rgba(0,0,0,0.5); transition: opacity .2s ease, transform .25s cubic-bezier(.2,.8,.2,1); }
.ah-toast.show { opacity: 1; transform: translate(-50%, 0); }
.ah-toast.is-warn { border-color: rgba(255,204,0,0.5); }
.ah-toast.is-err { border-color: rgba(255,138,128,0.5); }

/* ── responsive ── */
@media (max-width: 900px) {
  .ah-layout { grid-template-columns: minmax(0, 1fr); }
  .ah-rail { display: none; }
  .ah-chips { display: flex; }
}
@media (max-width: 620px) {
  body.ah-page main.ah { gap: 16px; }
  .ah-bar { gap: 8px; padding: 6px; top: calc(var(--ah-hdr, 98px) + 8px); }
  .ah-bar .stats-search { height: 42px; padding: 0 14px; }
  .ah-bar .ah-balance { display: none; }
  .ah-rhead .ah-balance { display: inline-flex; height: 36px; padding: 0 14px; font-size: 0.8rem; }
  .ah-rhead a.ah-balance { font-size: 0.66rem; }
  .ah-cart-btn { height: 42px; padding: 0 12px; gap: 8px; }
  .ah-cart-btn .ah-cart-label { display: none; }
  .ah-info { order: -2; flex: 1 1 auto; }
  .ah-rhead .ah-balance { order: -1; }
  .ah-rhead span.ah-balance > span { display: none; }
  .ah-rhead .ah-dd { margin-left: auto; }
  .ah-dd-menu { right: 0; }
  /* phone: amazon list rows — picture left, facts right */
  .ah-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ah-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
  .ah-card .ah-media { height: auto; min-height: 120px; margin: 8px 0 8px 8px; }
  .ah-card .ah-media .prices-icon { width: 52px; height: 52px; }
  .ah-card .ah-tag { display: none; }
  .ah-body { padding: 10px 12px 12px; gap: 4px; }
  .ah-title { font-size: 0.94rem; }
  .ah-price strong { font-size: 1.22rem; }
  .ah-add { height: 36px; margin-top: 6px; }
  .ah-skel { height: 150px; }
  .ah-orow { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .ah-orow .ah-st { grid-column: 1 / -1; justify-self: start; }
  /* sheets become bottom sheets */
  .ah-modal { align-items: flex-end; padding: 0; }
  .ah-modal .acct-sheet { width: 100%; max-height: calc(100dvh - var(--ah-hdr, 98px) - 8px); border-radius: 26px 26px 0 0; padding: 26px 18px 22px; transform: translateY(40px); }
  .ah-modal.open .acct-sheet { transform: none; }
  .ah-dt-top { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; }
  .ah-dt-top .ah-media { height: 92px; }
  .ah-dt-top .ah-media .prices-icon { width: 56px; height: 56px; }
  .ah-dt-top h2 { font-size: 1.2rem; }
  .ah-dt-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ah-dt-buy { flex-direction: column; align-items: stretch; gap: 12px; }
  .ah-dt-buy .ah-add { width: 100%; min-width: 0; }
  .ah-drawer .acct-sheet { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: calc(100dvh - var(--ah-hdr, 98px) - 8px); border-radius: 26px 26px 0 0; transform: translateY(40px); }
  .ah-drawer .acct-sheet::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255,255,255,0.3); }
  .ah-dr-head { padding: 22px 18px 12px; }
  .ah-dr-body { padding: 12px; }
  .ah-dr-foot { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  .ah-toast { bottom: calc(16px + env(safe-area-inset-bottom)); border-radius: 18px; }
  html.acct-lock .ah-toast { bottom: auto; top: calc(var(--ah-hdr, 98px) + 10px); transform: translate(-50%, -12px); }
  html.acct-lock .ah-toast.show { transform: translate(-50%, 0); }
  .ah-dt-facts > div:nth-child(n+3) b { white-space: normal; }
}
@media (max-width: 360px) {
  .ah-card { grid-template-columns: 92px minmax(0, 1fr); }
  .ah-card .ah-media .prices-icon { width: 44px; height: 44px; }
  .ah-add { letter-spacing: 0.04em; font-size: 0.64rem; }
  .ah-dd-btn small { display: none; }
}
.ah-dt-facts b > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
