/* ============================================================
   AUCTION HOUSE web (/auction-house/): the live market, prices, recent sales and the player's own offers.
   Look: the in-game window (gold on deep navy, condensed caps, framed panels) inside the site content column.
   Standalone on top of style.css. Data: /api/auction/v1/* (AUCTION-API.md section 2).
   ============================================================ */
.ahm {
  --m-bg: #070a12;
  --m-panel: #0f1524;
  --m-panel-2: #141c2e;
  --m-row: rgba(255, 255, 255, 0.025);
  --m-row-hi: rgba(255, 217, 100, 0.07);
  --m-line: rgba(255, 217, 100, 0.22);
  --m-line-2: rgba(255, 255, 255, 0.08);
  --m-gold: #e6c84a;
  --m-gold-hi: #ffd964;
  --m-gold-dim: rgba(230, 200, 74, 0.12);
  --m-text: #eef1f7;
  --m-muted: #a3acc0;
  --m-faint: #6f7890;
  --m-good: #5fe39a;
  --m-buy: #74b9ff;
  --m-warn: #ffb35c;
  --m-cond: "Roboto Condensed", "Arial Narrow", Inter, system-ui, sans-serif;
  --m-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  background: var(--m-bg);
  color: var(--m-text);
  overflow-x: clip;
  padding-bottom: calc(3.5rem * var(--s));
  --s: 1;
}
/* full width app (owner 2026-11-17): type, rows, icons, controls and the detail pane grow with the window */
@media (min-width: 1500px) { .ahm { --s: 1.1; } }
@media (min-width: 1800px) { .ahm { --s: 1.2; } }
@media (min-width: 2200px) { .ahm { --s: 1.32; } }
@media (min-width: 2500px) { .ahm { --s: 1.42; } }
.ahm *, .ahm *::before, .ahm *::after { box-sizing: border-box; }
.ahm a { color: var(--m-gold-hi); }
.ahm a:hover { color: #fff; }
.ahm button { font: inherit; color: inherit; }
.ahm [hidden] { display: none !important; }
.ahm-wrap { width: calc(100% - 2 * clamp(16px, 2.2vw, 56px)); margin: 0 auto; }
.ahm-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- title bar: the window's header ---------- */
.ahm-top { position: relative; padding: calc(1.4rem * var(--s)) 0 0; isolation: isolate; }
.ahm-top::before {
  content: ""; position: absolute; inset: 0 0 -4rem; z-index: -1;
  background: radial-gradient(calc(900px * var(--s)) calc(300px * var(--s)) at 80% 0%, rgba(230, 200, 74, 0.10), transparent 65%), linear-gradient(180deg, #0b1020, var(--m-bg));
}
.ahm-crumbs { display: flex; flex-wrap: wrap; gap: calc(0.35rem * var(--s)); font-size: calc(0.82rem * var(--s)); color: var(--m-muted); margin: 0 0 calc(0.9rem * var(--s)); }
.ahm-crumbs a { color: var(--m-muted); text-decoration: none; }
.ahm-crumbs a:hover { color: var(--m-gold-hi); }
.ahm-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: calc(0.7rem * var(--s)) calc(1.1rem * var(--s));
  padding: calc(0.75rem * var(--s)) calc(1rem * var(--s)); border: 1px solid var(--m-line); border-bottom-width: 2px; border-radius: calc(12px * var(--s)) calc(12px * var(--s)) 0 0;
  background: linear-gradient(180deg, #121a2c, #0d1322);
}
.ahm-title { margin: 0; font: 700 clamp(calc(1.35rem * var(--s)), 2.6vw, calc(1.85rem * var(--s)))/1 var(--m-cond); letter-spacing: 0.03em; text-transform: uppercase; color: var(--m-gold-hi); white-space: nowrap; }
.ahm-tabs { display: flex; flex-wrap: wrap; gap: calc(0.45rem * var(--s)); margin: 0; padding: 0; list-style: none; flex: 1 1 auto; }
.ahm-tabs a {
  display: inline-flex; align-items: center; gap: calc(0.4rem * var(--s)); min-height: calc(38px * var(--s)); padding: calc(0.35rem * var(--s)) calc(0.85rem * var(--s)); border-radius: calc(8px * var(--s));
  border: 1px solid rgba(255, 217, 100, 0.35); background: rgba(255, 255, 255, 0.02);
  font: 700 calc(0.9rem * var(--s))/1 var(--m-cond); letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; color: #dfe4ee;
}
.ahm-tabs a:hover { border-color: var(--m-gold); color: #fff; }
.ahm-tabs a[aria-current="page"] { border-color: var(--m-gold-hi); color: var(--m-gold-hi); background: var(--m-gold-dim); box-shadow: inset 0 0 0 1px rgba(255, 217, 100, 0.25); }
.ahm-tabs svg { width: calc(16px * var(--s)); height: calc(16px * var(--s)); flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ahm-scope { display: flex; flex-wrap: wrap; align-items: center; gap: calc(0.6rem * var(--s)) calc(0.9rem * var(--s)); margin-left: auto; }
.ahm-sel {
  min-height: calc(38px * var(--s)); padding: calc(0.3rem * var(--s)) calc(2rem * var(--s)) calc(0.3rem * var(--s)) calc(0.7rem * var(--s)); border-radius: calc(8px * var(--s)); border: 1px solid rgba(255, 217, 100, 0.35);
  background: #0a0f1b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd964' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right calc(0.55rem * var(--s)) center / calc(14px * var(--s));
  color: #fff; font: 600 calc(0.92rem * var(--s))/1.2 Inter, sans-serif; appearance: none; -webkit-appearance: none; cursor: pointer; max-width: 100%;
}
.ahm-sel:focus-visible, .ahm-in:focus-visible { outline: 2px solid var(--m-gold-hi); outline-offset: 2px; }
.ahm-auto { display: inline-flex; align-items: center; gap: calc(0.45rem * var(--s)); min-height: calc(38px * var(--s)); font: 600 calc(0.82rem * var(--s))/1.2 Inter, sans-serif; color: #dfe4ee; cursor: pointer; white-space: nowrap; }
.ahm-auto[hidden] { display: none; }
.ahm-auto input { width: calc(18px * var(--s)); height: calc(18px * var(--s)); margin: 0; accent-color: var(--m-gold); }
.ahm-auto b { color: var(--m-gold-hi); }
.ahm-upd { display: inline-flex; align-items: center; gap: calc(0.45rem * var(--s)); font: 600 calc(0.82rem * var(--s))/1.2 Inter, sans-serif; color: var(--m-muted); white-space: nowrap; }
.ahm-upd i { width: calc(8px * var(--s)); height: calc(8px * var(--s)); border-radius: 50%; background: var(--m-good); box-shadow: 0 0 0 0 rgba(95, 227, 154, 0.5); animation: ahm-pulse 2.4s infinite; }
.ahm-upd.is-stale i { background: var(--m-warn); animation: none; }
.ahm-upd.is-none i { background: var(--m-faint); animation: none; }
@keyframes ahm-pulse { 0% { box-shadow: 0 0 0 0 rgba(95, 227, 154, 0.45); } 70% { box-shadow: 0 0 0 calc(7px * var(--s)) rgba(95, 227, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(95, 227, 154, 0); } }

/* the window body under the bar */
.ahm-body { border: 1px solid var(--m-line); border-top: 0; border-radius: 0 0 calc(12px * var(--s)) calc(12px * var(--s)); background: #0a0f1b; padding: calc(1rem * var(--s)); }
.ahm-lede { margin: 0 0 calc(1rem * var(--s)); color: var(--m-muted); font-size: calc(0.95rem * var(--s)); line-height: 1.55; max-width: calc(62rem * var(--s)); }

/* ---------- panels ---------- */
.ahm-panel { border: 1px solid var(--m-line); border-radius: calc(10px * var(--s)); background: var(--m-panel); min-width: 0; }
.ahm-panel-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: calc(0.4rem * var(--s)) calc(1rem * var(--s)); padding: calc(0.8rem * var(--s)) calc(1rem * var(--s)) calc(0.6rem * var(--s)); border-bottom: 1px solid var(--m-line-2); }
.ahm-panel-h h2, .ahm-panel-h h3 { margin: 0; font: 700 calc(1.15rem * var(--s))/1.2 var(--m-cond); letter-spacing: 0.02em; color: #fff; }
.ahm-panel-h .ahm-note { margin-left: auto; font-size: calc(0.84rem * var(--s)); color: var(--m-muted); }
.ahm-cap { margin: 0 0 calc(0.45rem * var(--s)); font: 500 calc(0.74rem * var(--s))/1 var(--m-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--m-muted); }

/* ---------- market: sidebar | list | detail ---------- */
.ahm-market { display: grid; grid-template-columns: calc(228px * var(--s)) minmax(0, 1fr) max(calc(330px * var(--s)), 24%); gap: calc(0.9rem * var(--s)); align-items: start; }
.ahm-side { padding: calc(0.9rem * var(--s)); display: grid; gap: calc(1.05rem * var(--s)); }
.ahm-search { position: relative; }
.ahm-psearch { margin-left: auto; min-width: min(calc(320px * var(--s)), 100%); }
.ahm-in {
  width: 100%; min-height: calc(42px * var(--s)); padding: calc(0.5rem * var(--s)) calc(2.4rem * var(--s)) calc(0.5rem * var(--s)) calc(0.8rem * var(--s)); border-radius: calc(8px * var(--s)); border: 1px solid var(--m-line-2);
  background: #070b14; color: #fff; font: 500 calc(0.95rem * var(--s))/1.2 Inter, sans-serif;
}
.ahm-in::placeholder { color: var(--m-faint); }
.ahm-search svg { position: absolute; right: calc(0.7rem * var(--s)); top: 50%; width: calc(18px * var(--s)); height: calc(18px * var(--s)); transform: translateY(-50%); fill: none; stroke: var(--m-muted); stroke-width: 2; pointer-events: none; }
.ahm-seg { display: grid; grid-template-columns: 1fr 1fr; gap: calc(0.4rem * var(--s)); }
.ahm-seg.is-3 { grid-template-columns: repeat(3, 1fr); }
.ahm-seg button, .ahm-seg a {
  min-height: calc(40px * var(--s)); padding: calc(0.3rem * var(--s)) calc(0.4rem * var(--s)); border-radius: calc(8px * var(--s)); border: 1px solid rgba(255, 217, 100, 0.3); background: rgba(255, 255, 255, 0.02);
  font: 700 calc(0.9rem * var(--s))/1 var(--m-cond); letter-spacing: 0.03em; text-transform: uppercase; color: #dfe4ee; cursor: pointer; text-align: center; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: calc(0.35rem * var(--s));
}
.ahm-seg button:hover { border-color: var(--m-gold); }
.ahm-seg svg, .ahm-seg img { width: calc(22px * var(--s)); height: calc(22px * var(--s)); flex: none; object-fit: contain; }
.ahm-seg [aria-pressed="true"] { border-color: var(--m-gold-hi); color: var(--m-gold-hi); background: var(--m-gold-dim); }
.ahm-cats { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.ahm-cats button {
  width: 100%; display: flex; align-items: center; gap: calc(0.55rem * var(--s)); min-height: calc(34px * var(--s)); padding: calc(0.25rem * var(--s)) calc(0.55rem * var(--s)); border: 0; border-radius: calc(6px * var(--s));
  background: transparent; font: 500 calc(1rem * var(--s))/1.1 var(--m-cond); color: #dfe4ee; cursor: pointer; text-align: left;
}
.ahm-cats button:hover { background: rgba(255, 255, 255, 0.04); }
.ahm-cats button[aria-pressed="true"] { background: var(--m-gold-dim); color: var(--m-gold-hi); font-weight: 700; }
.ahm-cats button.is-zero { color: var(--m-faint); }
.ahm-cats b { margin-left: auto; font: 500 calc(0.82rem * var(--s))/1 var(--m-mono); color: var(--m-muted); }
.ahm-cats button[aria-pressed="true"] b { color: var(--m-gold-hi); }
.ahm-cats svg { width: calc(16px * var(--s)); height: calc(16px * var(--s)); flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.ahm-checks { display: grid; gap: calc(0.35rem * var(--s)); }
.ahm-check { display: flex; align-items: center; gap: calc(0.55rem * var(--s)); min-height: calc(32px * var(--s)); font: 500 calc(0.98rem * var(--s))/1.1 var(--m-cond); color: #dfe4ee; cursor: pointer; }
.ahm-check input { width: calc(18px * var(--s)); height: calc(18px * var(--s)); accent-color: var(--m-gold); margin: 0; }
.ahm-side-x { justify-self: start; border: 0; background: none; padding: 0; color: var(--m-gold-hi); font: 600 calc(0.85rem * var(--s))/1 Inter, sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: calc(3px * var(--s)); }
.ahm-filters-btn { display: none; }

/* the list */
.ahm-list { min-height: calc(420px * var(--s)); display: flex; flex-direction: column; }
.ahm-list-h { display: flex; flex-wrap: wrap; align-items: center; gap: calc(0.5rem * var(--s)) calc(0.9rem * var(--s)); padding: calc(0.75rem * var(--s)) calc(0.9rem * var(--s)) calc(0.6rem * var(--s)); border-bottom: 1px solid var(--m-line-2); }
.ahm-list-h h2 { margin: 0; font: 700 calc(1.15rem * var(--s))/1.2 var(--m-cond); color: #fff; letter-spacing: 0.01em; }
.ahm-list-h .ahm-sel { margin-left: auto; min-height: calc(34px * var(--s)); font-size: calc(0.86rem * var(--s)); }
.ahm-cols, .ahm-row { display: grid; grid-template-columns: minmax(0, 1fr) calc(60px * var(--s)) calc(90px * var(--s)) calc(80px * var(--s)) minmax(calc(94px * var(--s)), calc(170px * var(--s))) calc(44px * var(--s)); align-items: center; gap: calc(0.5rem * var(--s)); }
.ahm-cols { padding: calc(0.45rem * var(--s)) calc(0.9rem * var(--s)); font: 500 calc(0.7rem * var(--s))/1 var(--m-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--m-muted); border-bottom: 1px solid var(--m-line); }
.ahm-cols span:nth-child(n+2):not(:nth-child(5)) { text-align: right; }
.ahm-rows { margin: 0; padding: calc(0.3rem * var(--s)) calc(0.45rem * var(--s)); list-style: none; flex: 1; }
.ahm-row {
  width: 100%; min-height: calc(46px * var(--s)); padding: calc(0.3rem * var(--s)) calc(0.45rem * var(--s)); border: 1px solid transparent; border-radius: calc(7px * var(--s)); background: transparent; cursor: pointer; text-align: left;
  font: 500 calc(1rem * var(--s))/1.15 var(--m-cond); color: #e9edf5;
}
.ahm-rows li:nth-child(odd) .ahm-row { background: var(--m-row); }
.ahm-row:hover { background: var(--m-row-hi) !important; border-color: rgba(255, 217, 100, 0.2); }
.ahm-row[aria-pressed="true"] { background: var(--m-gold-dim) !important; border-color: var(--m-gold); }
.ahm-row:focus-visible { outline: 2px solid var(--m-gold-hi); outline-offset: 1px; }
.ahm-it { display: flex; align-items: center; gap: calc(0.55rem * var(--s)); min-width: 0; }
.ahm-it-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ahm-it-n { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 calc(0.45rem * var(--s)); min-width: 0; }
.ahm-it-n > span:first-child { font-size: calc(1.02rem * var(--s)); color: #fff; overflow-wrap: anywhere; }
.ahm-tag { font: 500 calc(0.78rem * var(--s))/1.2 var(--m-cond); color: var(--m-gold); }
.ahm-tag.is-cond { color: var(--m-muted); font-family: var(--m-mono); font-size: calc(0.72rem * var(--s)); }
.ahm-tag.is-perk { color: var(--m-gold-hi); }
.ahm-srv { font: 500 calc(0.7rem * var(--s))/1 var(--m-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--m-faint); }
.ahm-num { text-align: right; font-weight: 700; font-size: calc(1.06rem * var(--s)); color: #fff; white-space: nowrap; }
.ahm-pay { display: flex; align-items: center; justify-content: flex-end; gap: calc(0.3rem * var(--s)); white-space: nowrap; font-weight: 700; font-size: calc(1.06rem * var(--s)); color: #fff; }
.ahm-c-who { min-width: 0; }
.ahm-who { font-size: calc(0.86rem * var(--s)); color: #cfd5e2; overflow-wrap: anywhere; }
.ahm-c-who .ahm-who { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ahm-who.is-hidden { color: var(--m-faint); font-style: italic; }
.ahm-left { text-align: right; font-size: calc(0.92rem * var(--s)); color: #cfd5e2; white-space: nowrap; }
.ahm-list-f { display: flex; align-items: center; justify-content: space-between; gap: calc(0.6rem * var(--s)); padding: calc(0.7rem * var(--s)) calc(0.9rem * var(--s)) calc(0.9rem * var(--s)); border-top: 1px solid var(--m-line-2); font: 500 calc(0.95rem * var(--s))/1 var(--m-cond); color: var(--m-muted); }
.ahm-pg { min-height: calc(40px * var(--s)); padding: calc(0.35rem * var(--s)) calc(1.1rem * var(--s)); border-radius: calc(8px * var(--s)); border: 1px solid rgba(255, 217, 100, 0.35); background: rgba(230, 200, 74, 0.1); font: 700 calc(0.95rem * var(--s))/1 var(--m-cond); letter-spacing: 0.04em; text-transform: uppercase; color: var(--m-gold-hi); cursor: pointer; }
.ahm-pg:disabled { opacity: 0.35; cursor: default; }
.ahm-empty { padding: calc(2.6rem * var(--s)) calc(1.2rem * var(--s)); text-align: center; color: var(--m-muted); line-height: 1.55; }
.ahm-empty b { display: block; margin-bottom: calc(0.35rem * var(--s)); font: 700 calc(1.1rem * var(--s))/1.3 var(--m-cond); color: #fff; }
.ahm-load { padding: calc(2.6rem * var(--s)) calc(1rem * var(--s)); text-align: center; color: var(--m-muted); }
.ahm-rows.is-busy { opacity: 0.55; transition: opacity 0.15s; }

/* item icons: the game's dark tile, a blueprint backing, a gold diamond for enchanted, armor slot squares */
.ahm-ic { position: relative; flex: none; width: calc(34px * var(--s)); height: calc(34px * var(--s)); border-radius: calc(6px * var(--s)); background: radial-gradient(circle at 50% 40%, #1f2840, #0b101c); display: grid; place-items: center; }
.ahm-ic img { width: 86%; height: 86%; object-fit: contain; }
.ahm-ic.is-bp { background: #1c4f8f url("/images/items/blueprintbase.png") center / cover; }
.ahm-ic.is-bp img { width: 74%; height: 74%; }
.ahm-ic.is-skin img { width: 100%; height: 100%; border-radius: calc(6px * var(--s)); object-fit: cover; }
.ahm-ic.is-miss::after { content: "?"; font: 700 calc(0.9rem * var(--s))/1 var(--m-cond); color: var(--m-faint); }
/* WebIcons.md: badges are game sprites used as masks, gold-2, at the icon's top-right; a kit shows its perk sprite beside it */
.ahm-badge { position: absolute; top: calc(-3px * var(--s)); right: calc(-3px * var(--s)); width: 38%; height: 38%; min-width: calc(11px * var(--s)); min-height: calc(11px * var(--s)); background: #e6c84a; -webkit-mask: var(--mask) center / contain no-repeat; mask: var(--mask) center / contain no-repeat; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8)); }
.ahm-kit { display: inline-flex; align-items: center; gap: calc(3px * var(--s)); flex: none; }
.ahm-perkic { position: relative; flex: none; width: calc(17px * var(--s)); height: calc(17px * var(--s)); }
.ahm-perkic.is-big { width: calc(34px * var(--s)); height: calc(34px * var(--s)); }
.ahm-spr { position: absolute; inset: 0; background: #e6c84a; -webkit-mask: var(--mask) center / contain no-repeat; mask: var(--mask) center / contain no-repeat; }
.ahm-mark { position: absolute; left: 70%; top: 70%; width: 50%; height: 50%; border-radius: 30%; background: #0c0f16; }
.ahm-mark .ahm-spr { inset: 20%; background: #ffd964; }
.ahm-tag.is-special { color: #ccfaff; }
.ahm-ic .ahm-dia { position: absolute; top: -4px; right: -4px; width: calc(14px * var(--s)); height: calc(14px * var(--s)); }
.ahm-ic.is-lg { width: calc(132px * var(--s)); height: calc(132px * var(--s)); border-radius: calc(10px * var(--s)); border: 1px solid var(--m-line-2); }
.ahm-ic.is-lg .ahm-dia { width: calc(26px * var(--s)); height: calc(26px * var(--s)); top: -7px; right: -7px; }
.ahm-ic.is-sm { width: calc(24px * var(--s)); height: calc(24px * var(--s)); }
.ahm-ic.is-md { width: calc(46px * var(--s)); height: calc(46px * var(--s)); border-radius: calc(8px * var(--s)); }
.ahm-dia { fill: var(--m-gold-hi); stroke: #5a4300; stroke-width: 1.2; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.ahm-slots { display: inline-flex; align-items: center; gap: calc(3px * var(--s)); vertical-align: middle; }
.ahm-slots i { width: calc(9px * var(--s)); height: calc(9px * var(--s)); border-radius: 1px; background: #4a5266; }
.ahm-slots i.is-on { background: var(--m-gold-hi); }
.ahm-slots em { margin-right: calc(3px * var(--s)); font: 700 calc(0.78rem * var(--s))/1 var(--m-cond); font-style: normal; color: var(--m-gold-hi); }
.ahm-slots.is-lg i { width: calc(22px * var(--s)); height: calc(22px * var(--s)); border-radius: 2px; }
.ahm-cur { flex: none; width: calc(22px * var(--s)); height: calc(22px * var(--s)); display: inline-grid; place-items: center; }
.ahm-cur img { width: calc(22px * var(--s)); height: calc(22px * var(--s)); object-fit: contain; }
.ahm-cur svg { width: calc(22px * var(--s)); height: calc(22px * var(--s)); }
.ahm-cur.is-txt { width: auto; height: auto; font: 700 calc(0.72rem * var(--s))/1 var(--m-cond); letter-spacing: 0.04em; color: var(--m-gold); padding: calc(3px * var(--s)) calc(4px * var(--s)); border: 1px solid rgba(255, 217, 100, 0.35); border-radius: calc(4px * var(--s)); }

/* ---------- detail panel (the game's right pane) ---------- */
.ahm-detail { position: sticky; top: calc(1rem * var(--s)); padding: calc(1rem * var(--s)); min-height: calc(420px * var(--s)); }
.ahm-detail-empty { display: grid; place-items: center; min-height: calc(380px * var(--s)); text-align: center; color: var(--m-faint); font: 500 calc(1rem * var(--s))/1.5 var(--m-cond); padding: 0 calc(1rem * var(--s)); }
.ahm-d-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: calc(0.9rem * var(--s)); align-items: start; }
.ahm-d-title { margin: calc(0.2rem * var(--s)) 0 calc(0.55rem * var(--s)); font: 700 calc(1.35rem * var(--s))/1.15 var(--m-cond); color: var(--m-gold-hi); overflow-wrap: anywhere; }
.ahm-d-sub { margin: 0 0 calc(0.4rem * var(--s)); font-size: calc(0.82rem * var(--s)); color: var(--m-muted); }
.ahm-condbar { display: flex; align-items: center; gap: calc(0.5rem * var(--s)); font: 500 calc(0.85rem * var(--s))/1 var(--m-mono); color: #dfe4ee; }
.ahm-condbar span { flex: 1; height: calc(8px * var(--s)); border-radius: calc(4px * var(--s)); background: #262d3d; overflow: hidden; }
.ahm-condbar span i { display: block; height: 100%; background: var(--m-gold); border-radius: calc(4px * var(--s)); }
.ahm-d-sec { margin-top: calc(0.95rem * var(--s)); padding-top: calc(0.85rem * var(--s)); border-top: 1px solid var(--m-line-2); }
.ahm-perks { margin: 0; padding: 0; list-style: none; display: grid; gap: calc(0.35rem * var(--s)); }
.ahm-perks li { display: flex; align-items: baseline; gap: calc(0.5rem * var(--s)); font: 700 calc(1rem * var(--s))/1.2 var(--m-cond); color: #fff; }
.ahm-perks li b { color: var(--m-muted); font-weight: 700; }
.ahm-perks small { display: block; font: 400 calc(0.82rem * var(--s))/1.35 Inter, sans-serif; color: var(--m-muted); }
.ahm-trade { display: grid; grid-template-columns: 1fr 1fr; gap: calc(0.8rem * var(--s)); }
.ahm-trade .ahm-big { display: flex; align-items: center; gap: calc(0.45rem * var(--s)); font: 700 calc(1.7rem * var(--s))/1 var(--m-cond); color: var(--m-gold-hi); }
.ahm-trade .ahm-big .ahm-ic { width: calc(38px * var(--s)); height: calc(38px * var(--s)); }
.ahm-trade .ahm-big .ahm-cur, .ahm-trade .ahm-big .ahm-cur img, .ahm-trade .ahm-big .ahm-cur svg { width: calc(32px * var(--s)); height: calc(32px * var(--s)); }
.ahm-trade small { display: block; margin-top: calc(0.35rem * var(--s)); font-size: calc(0.8rem * var(--s)); color: var(--m-muted); }
.ahm-facts { margin: 0; display: grid; gap: calc(0.4rem * var(--s)); }
.ahm-facts div { display: flex; justify-content: space-between; gap: calc(1rem * var(--s)); font: 500 calc(0.98rem * var(--s))/1.25 var(--m-cond); }
.ahm-facts dt { color: var(--m-muted); }
.ahm-facts dd { margin: 0; color: #fff; text-align: right; overflow-wrap: anywhere; }
/* phase 2 puts the buy / sell / cancel controls here */
.ahm-act:empty { display: none; }
.ahm-d-more { display: inline-flex; align-items: center; gap: calc(0.35rem * var(--s)); margin-top: calc(0.95rem * var(--s)); font: 700 calc(0.95rem * var(--s))/1 var(--m-cond); letter-spacing: 0.03em; text-transform: uppercase; text-decoration: none; }
.ahm-d-close { display: none; }

/* ---------- tables (prices, sales, mine) ---------- */
.ahm-table-wrap { overflow-x: auto; }
.ahm-table { width: 100%; border-collapse: collapse; font: 500 calc(0.98rem * var(--s))/1.25 var(--m-cond); }
.ahm-table th { padding: calc(0.55rem * var(--s)) calc(0.7rem * var(--s)); font: 500 calc(0.7rem * var(--s))/1.25 var(--m-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--m-muted); text-align: left; border-bottom: 1px solid var(--m-line); white-space: nowrap; vertical-align: bottom; }
.ahm-table th.is-num, .ahm-table td.is-num { text-align: right; }
.ahm-table th button { border: 0; background: none; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.ahm-table th button:hover, .ahm-table th button[aria-pressed="true"] { color: var(--m-gold-hi); }
.ahm-table td { padding: calc(0.45rem * var(--s)) calc(0.7rem * var(--s)); border-bottom: 1px solid var(--m-line-2); vertical-align: middle; }
.ahm-table tbody tr:nth-child(odd) td { background: var(--m-row); }
.ahm-table tbody tr:hover td { background: var(--m-row-hi); }
.ahm-table a.ahm-it { text-decoration: none; color: #fff; }
.ahm-table a.ahm-it:hover span { color: var(--m-gold-hi); }
.ahm-table .ahm-pay { justify-content: flex-end; }
.ahm-table .ahm-sub { display: block; font: 400 calc(0.78rem * var(--s))/1.2 Inter, sans-serif; color: var(--m-muted); white-space: nowrap; }

/* ---------- sales feed ---------- */
.ahm-feed { margin: 0; padding: calc(0.4rem * var(--s)); list-style: none; display: grid; gap: calc(4px * var(--s)); }
.ahm-sale { display: grid; grid-template-columns: calc(74px * var(--s)) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: calc(0.8rem * var(--s)); padding: calc(0.5rem * var(--s)) calc(0.6rem * var(--s)); border-radius: calc(8px * var(--s)); background: var(--m-row); font: 500 calc(1rem * var(--s))/1.2 var(--m-cond); }
.ahm-sale.is-new { animation: ahm-new 2.4s ease-out; }
@keyframes ahm-new { from { background: rgba(255, 217, 100, 0.22); } to { background: var(--m-row); } }
.ahm-moved { display: block; margin-top: calc(2px * var(--s)); font: 500 calc(0.82rem * var(--s))/1.3 var(--m-cond); color: var(--m-gold); }
.ahm-ago { font: 500 calc(0.78rem * var(--s))/1.2 var(--m-mono); color: var(--m-muted); }
.ahm-kind { display: inline-block; margin-top: calc(3px * var(--s)); font: 500 calc(0.74rem * var(--s))/1 var(--m-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--m-good); }
.ahm-kind.is-buy { color: var(--m-buy); }
.ahm-parties { font-size: calc(0.9rem * var(--s)); color: #cfd5e2; min-width: 0; }
.ahm-parties span { color: var(--m-faint); }
.ahm-parties b { font-weight: 500; color: #fff; overflow-wrap: anywhere; }

/* ---------- item page ---------- */
.ahm-ihead { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: calc(1rem * var(--s)); align-items: center; margin-bottom: calc(1rem * var(--s)); }
.ahm-ihead h2 { margin: 0; font: 700 clamp(calc(1.5rem * var(--s)), 3vw, calc(2rem * var(--s)))/1.1 var(--m-cond); color: var(--m-gold-hi); }
.ahm-ihead p { margin: calc(0.3rem * var(--s)) 0 0; color: var(--m-muted); font-size: calc(0.9rem * var(--s)); }
.ahm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(calc(190px * var(--s)), 1fr)); gap: calc(0.7rem * var(--s)); margin-bottom: calc(1rem * var(--s)); }
.ahm-tile { padding: calc(0.8rem * var(--s)) calc(0.9rem * var(--s)); border-radius: calc(10px * var(--s)); border: 1px solid var(--m-line-2); border-top: 2px solid var(--m-line); background: var(--m-panel); }
.ahm-tile b { display: flex; align-items: center; gap: calc(0.35rem * var(--s)); font: 700 calc(1.45rem * var(--s))/1.1 var(--m-cond); color: #fff; }
.ahm-tile .ahm-tile-sub { margin-top: calc(0.15rem * var(--s)); text-transform: none; letter-spacing: 0; font-family: var(--m-cond); font-size: calc(0.85rem * var(--s)); color: #cfd5e2; }
.ahm-tile span { display: block; margin-top: calc(0.3rem * var(--s)); font: 500 calc(0.72rem * var(--s))/1.2 var(--m-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--m-muted); }
.ahm-chart-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: calc(0.6rem * var(--s)); margin-left: auto; }
.ahm-chart-ctl .ahm-seg { display: inline-grid; grid-auto-flow: column; grid-template-columns: none; }
.ahm-chart-ctl .ahm-seg button { min-height: calc(34px * var(--s)); padding: calc(0.25rem * var(--s)) calc(0.75rem * var(--s)); font-size: calc(0.85rem * var(--s)); }
.ahm-chart-ctl .ahm-sel { min-height: calc(34px * var(--s)); font-size: calc(0.86rem * var(--s)); }
.ahm-chart { position: relative; padding: calc(0.6rem * var(--s)) calc(0.6rem * var(--s)) calc(0.4rem * var(--s)); }
.ahm-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.ahm-chart .ax { font: calc(11px * var(--s)) var(--m-mono); fill: var(--m-muted); }
.ahm-chart .gl { stroke: rgba(255, 255, 255, 0.06); }
.ahm-chart .band { opacity: 0.16; }
.ahm-chart .vol { fill: rgba(255, 217, 100, 0.22); }
.ahm-chart .hair { stroke: rgba(255, 255, 255, 0.35); stroke-dasharray: 3 3; }
.ahm-tip { position: absolute; pointer-events: none; min-width: calc(160px * var(--s)); padding: calc(0.55rem * var(--s)) calc(0.7rem * var(--s)); border-radius: calc(8px * var(--s)); border: 1px solid var(--m-line); background: rgba(10, 15, 27, 0.96); font: 500 calc(0.88rem * var(--s))/1.35 var(--m-cond); color: #fff; box-shadow: 0 calc(10px * var(--s)) calc(30px * var(--s)) rgba(0, 0, 0, 0.5); }
.ahm-tip b { display: block; margin-bottom: calc(0.2rem * var(--s)); color: var(--m-gold-hi); }
.ahm-tip i { display: inline-block; width: calc(9px * var(--s)); height: calc(9px * var(--s)); margin-right: calc(0.35rem * var(--s)); border-radius: 2px; vertical-align: 0; }
.ahm-legend { display: flex; flex-wrap: wrap; gap: calc(0.4rem * var(--s)) calc(1rem * var(--s)); padding: 0 calc(1rem * var(--s)) calc(0.8rem * var(--s)); font: 500 calc(0.85rem * var(--s))/1.2 var(--m-cond); color: #dfe4ee; }
.ahm-legend i { display: inline-block; width: calc(14px * var(--s)); height: calc(3px * var(--s)); margin-right: calc(0.4rem * var(--s)); vertical-align: middle; border-radius: 2px; }
.ahm-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: calc(0.9rem * var(--s)); margin-top: calc(0.9rem * var(--s)); }

/* ---------- mine ---------- */
.ahm-signin { display: grid; justify-items: center; gap: calc(0.9rem * var(--s)); padding: calc(3rem * var(--s)) calc(1rem * var(--s)); text-align: center; }
.ahm-signin h2 { margin: 0; font: 700 calc(1.5rem * var(--s))/1.2 var(--m-cond); color: #fff; }
.ahm-signin p { margin: 0; max-width: calc(34rem * var(--s)); color: var(--m-muted); line-height: 1.55; }
.ahm-btn { display: inline-flex; align-items: center; gap: calc(0.5rem * var(--s)); min-height: calc(46px * var(--s)); padding: calc(0.7rem * var(--s)) calc(1.3rem * var(--s)); border-radius: calc(10px * var(--s)); border: 1px solid var(--m-gold); background: linear-gradient(180deg, var(--m-gold-hi), var(--m-gold)); color: #1a1503 !important; font: 700 calc(1rem * var(--s))/1 var(--m-cond); letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; }
.ahm-btn:hover { filter: brightness(1.08); }
.ahm-stack { display: grid; gap: calc(0.9rem * var(--s)); }
.ahm-why { display: inline-block; padding: calc(3px * var(--s)) calc(7px * var(--s)); border-radius: calc(5px * var(--s)); font: 700 calc(0.74rem * var(--s))/1 var(--m-cond); letter-spacing: 0.05em; text-transform: uppercase; background: rgba(95, 227, 154, 0.12); color: var(--m-good); white-space: nowrap; }
.ahm-why.is-back { background: rgba(255, 179, 92, 0.12); color: var(--m-warn); }
.ahm-prog { display: block; width: 100%; max-width: calc(120px * var(--s)); height: calc(5px * var(--s)); margin-top: calc(4px * var(--s)); border-radius: calc(3px * var(--s)); background: #262d3d; overflow: hidden; }
.ahm-prog i { display: block; height: 100%; background: var(--m-good); }
.ahm-you { color: var(--m-gold-hi); font-weight: 700; }
.ahm-side-pill { display: inline-block; padding: 2px calc(6px * var(--s)); border-radius: calc(4px * var(--s)); font: 700 calc(0.7rem * var(--s))/1 var(--m-cond); letter-spacing: 0.06em; text-transform: uppercase; background: rgba(95, 227, 154, 0.12); color: var(--m-good); }
.ahm-side-pill.is-buy { background: rgba(116, 185, 255, 0.12); color: var(--m-buy); }
.ahm-hint { margin: 0; padding: calc(0.7rem * var(--s)) calc(1rem * var(--s)) calc(0.9rem * var(--s)); font-size: calc(0.86rem * var(--s)); color: var(--m-muted); }

/* ---------- widths ---------- */
@media (max-width: 1180px) {
  .ahm-market { grid-template-columns: calc(220px * var(--s)) minmax(0, 1fr); }
  /* the detail becomes a sheet over the page */
  .ahm-detail { display: none; position: fixed; z-index: 1000; top: auto; right: 0; bottom: 0; left: 0; margin: 0 auto; width: min(calc(560px * var(--s)), 100%); max-height: 88vh; overflow: auto; min-height: 0; border-radius: calc(14px * var(--s)) calc(14px * var(--s)) 0 0; border-bottom: 0; box-shadow: 0 -20px calc(60px * var(--s)) rgba(0, 0, 0, 0.7); }
  .ahm-detail.is-open { display: block; }
  .ahm-scrim { position: fixed; inset: 0; z-index: 999; background: rgba(0, 0, 0, 0.6); }
  .ahm-d-close { display: inline-flex; position: absolute; top: calc(0.6rem * var(--s)); right: calc(0.6rem * var(--s)); width: calc(40px * var(--s)); height: calc(40px * var(--s)); align-items: center; justify-content: center; border-radius: calc(8px * var(--s)); border: 1px solid var(--m-line); background: #1a1d26; color: #ff6b6b; font: 700 calc(1.2rem * var(--s))/1 var(--m-cond); cursor: pointer; }
  .ahm-d-head { padding-right: calc(2.6rem * var(--s)); }
}
@media (max-width: 860px) {
  .ahm-market { grid-template-columns: minmax(0, 1fr); }
  .ahm-filters-btn { display: inline-flex; }
  .ahm-side { display: none; }
  .ahm-side.is-open { display: grid; }
  .ahm-cols { display: none; }
  .ahm-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "it pay" "meta meta"; row-gap: calc(0.25rem * var(--s)); padding: calc(0.5rem * var(--s)); }
  .ahm-row > .ahm-it { grid-area: it; }
  .ahm-row > .ahm-c-pay { grid-area: pay; }
  .ahm-row > .ahm-c-left, .ahm-row > .ahm-c-get, .ahm-row > .ahm-c-who, .ahm-row > .ahm-c-time { display: none; }
  .ahm-row > .ahm-meta { grid-area: meta; display: flex !important; }
  .ahm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ahm-two { grid-template-columns: minmax(0, 1fr); }
  .ahm-sale { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "it pay" "who ago"; row-gap: calc(0.3rem * var(--s)); }
  .ahm-sale > .ahm-c-it { grid-area: it; }
  .ahm-sale > .ahm-c-pay { grid-area: pay; text-align: right; }
  .ahm-sale > .ahm-parties { grid-area: who; }
  .ahm-sale > .ahm-c-ago { grid-area: ago; text-align: right; }
  .ahm-table.is-stack thead { display: none; }
  .ahm-table.is-stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: calc(0.45rem * var(--s)) calc(0.3rem * var(--s)); border-bottom: 1px solid var(--m-line-2); }
  .ahm-table.is-stack td { display: block; border: 0; padding: calc(0.15rem * var(--s)) calc(0.4rem * var(--s)); background: none !important; }
  .ahm-table.is-stack td[data-l]::before { content: attr(data-l) " "; font: 500 calc(0.7rem * var(--s))/1 var(--m-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--m-faint); }
  .ahm-table.is-stack td.is-wide { grid-column: 1 / -1; }
  .ahm-table.is-stack td.is-num { text-align: right; }
  .ahm-table.is-stack td.is-opt { display: none; }
}
.ahm-meta { display: none; flex-wrap: wrap; gap: calc(0.2rem * var(--s)) calc(0.8rem * var(--s)); font: 500 calc(0.84rem * var(--s))/1.2 var(--m-cond); color: var(--m-muted); }
.ahm-meta b { color: #fff; font-weight: 500; }
@media (max-width: 560px) {
  .ahm-bar { padding: calc(0.7rem * var(--s)); }
  .ahm-tabs { order: 3; flex-basis: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ahm-tabs a { justify-content: center; }
  .ahm-scope { margin-left: 0; flex-basis: 100%; }
  .ahm-scope .ahm-sel { flex: 1; }
  .ahm-body { padding: calc(0.6rem * var(--s)); }
  .ahm-ic.is-lg { width: calc(96px * var(--s)); height: calc(96px * var(--s)); }
  .ahm-chart-ctl { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .ahm-upd i, .ahm-sale.is-new { animation: none; } }

/* ---------- web trading (phase 2 slice 1) ---------- */
.ahm-act:not(:empty) { display: block; margin-top: calc(1rem * var(--s)); padding-top: calc(0.9rem * var(--s)); border-top: 1px solid var(--m-line-2); }
td.ahm-act:not(:empty) { display: table-cell; margin: 0; padding-top: calc(0.45rem * var(--s)); border-top: 0; text-align: right; }
.ahm-act-btn { display: inline-flex; align-items: center; justify-content: center; gap: calc(0.35rem * var(--s)); min-height: calc(44px * var(--s)); padding: calc(0.5rem * var(--s)) calc(1.1rem * var(--s)); border-radius: calc(9px * var(--s)); border: 1px solid var(--m-gold); background: linear-gradient(180deg, var(--m-gold-hi), var(--m-gold)); color: #1a1503 !important; font: 700 calc(0.98rem * var(--s))/1 var(--m-cond); letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.ahm-act-btn:hover { filter: brightness(1.07); }
.ahm-act-btn:disabled { opacity: 0.5; cursor: default; filter: none; }
.ahm-act-btn.is-ghost { background: rgba(255, 255, 255, 0.03); color: var(--m-gold-hi) !important; border-color: rgba(255, 217, 100, 0.4); }
.ahm-act-btn.is-danger { background: linear-gradient(180deg, #ff8a7a, #e0604f); border-color: #e0604f; color: #1a0705 !important; }
.ahm-act-btn:focus-visible, .ahm-step button:focus-visible, .ahm-step input:focus-visible { outline: 2px solid var(--m-gold-hi); outline-offset: 2px; }
.ahm-buy { display: grid; gap: calc(0.55rem * var(--s)); }
.ahm-buy .ahm-act-btn { width: 100%; }
.ahm-step { display: grid; grid-template-columns: calc(44px * var(--s)) minmax(0, 1fr) calc(44px * var(--s)) auto; gap: calc(0.4rem * var(--s)); }
.ahm-step button { min-height: calc(44px * var(--s)); border-radius: calc(8px * var(--s)); border: 1px solid rgba(255, 217, 100, 0.35); background: rgba(255, 255, 255, 0.03); color: #fff; font: 700 calc(1rem * var(--s))/1 var(--m-cond); cursor: pointer; }
.ahm-step .ahm-max { padding: 0 calc(0.7rem * var(--s)); text-transform: uppercase; letter-spacing: 0.04em; }
.ahm-step input { min-width: 0; min-height: calc(44px * var(--s)); border-radius: calc(8px * var(--s)); border: 1px solid var(--m-gold); background: #070b14; color: #fff; text-align: center; font: 700 calc(1.05rem * var(--s))/1 var(--m-cond); -moz-appearance: textfield; }
.ahm-step input::-webkit-outer-spin-button, .ahm-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ahm-act-note { margin: calc(0.4rem * var(--s)) 0 0; color: var(--m-muted); font-size: calc(0.84rem * var(--s)); line-height: 1.45; }
.ahm-pend { display: inline-flex; align-items: center; gap: calc(0.5rem * var(--s)); padding: calc(0.55rem * var(--s)) calc(0.8rem * var(--s)); border-radius: calc(8px * var(--s)); border: 1px solid rgba(116, 185, 255, 0.4); background: rgba(116, 185, 255, 0.08); color: #d6e8ff; font: 600 calc(0.9rem * var(--s))/1.3 Inter, sans-serif; }
.ahm-pend i { width: calc(14px * var(--s)); height: calc(14px * var(--s)); border-radius: 50%; border: 2px solid rgba(116, 185, 255, 0.35); border-top-color: var(--m-buy); animation: ahm-spin 0.9s linear infinite; }
@keyframes ahm-spin { to { transform: rotate(360deg); } }
.ahm-why.is-unk { background: rgba(255, 255, 255, 0.08); color: #dfe4ee; }
.ahm-why.is-pend { background: rgba(116, 185, 255, 0.12); color: var(--m-buy); }
/* dialogs and the toast sit on the body, outside .ahm: they carry their own values */
.ahm-dlg-wrap { --s: 1; position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.66); }
@media (min-width: 1800px) { .ahm-dlg-wrap { --s: 1.15; } }
.ahm-dlg { width: min(calc(480px * var(--s)), 100%); max-height: 90vh; overflow: auto; padding: calc(1.3rem * var(--s)); border-radius: 14px; border: 1px solid rgba(255, 217, 100, 0.4); background: linear-gradient(180deg, #141c2e, #0d1322); color: #eef1f7; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); font: 400 calc(0.95rem * var(--s))/1.55 Inter, sans-serif; }
.ahm-dlg:focus { outline: none; }
.ahm-dlg h3 { margin: 0 0 0.8rem; font: 700 calc(1.35rem * var(--s))/1.2 "Roboto Condensed", Inter, sans-serif; color: #ffd964; }
.ahm-dlg ul { margin: 0 0 1rem; padding-left: 1.1rem; display: grid; gap: 0.45rem; color: #d7ddea; }
.ahm-dlg code { padding: 0.05em 0.35em; border-radius: 4px; background: rgba(255, 255, 255, 0.08); color: #fff; }
.ahm-dlg-what { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.9rem; }
.ahm-dlg-what b { display: block; font: 700 calc(1.1rem * var(--s))/1.2 "Roboto Condensed", Inter, sans-serif; color: #fff; }
.ahm-dlg-what span { display: block; color: #a3acc0; font-size: 0.9em; }
.ahm-dlg .ahm-facts { display: grid; gap: 0.35rem; margin: 0 0 0.6rem; }
.ahm-dlg .ahm-facts div { display: flex; justify-content: space-between; gap: 1rem; }
.ahm-dlg .ahm-facts dt { color: #a3acc0; }
.ahm-dlg .ahm-facts dd { margin: 0; }
.ahm-dlg .ahm-facts b { color: #ffd964; font-size: 1.15em; }
.ahm-dlg .ahm-act-note { color: #a3acc0; }
.ahm-dlg .ahm-ic { width: calc(46px * var(--s)); height: calc(46px * var(--s)); }
.ahm-dlg .ahm-srv { margin-top: 0.15rem; }
.ahm-dlg-fig { margin: 0.55rem 0 0.1rem; }
.ahm-dlg-fig img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.08); }
.ahm-dlg-fig figcaption { margin-top: 0.25rem; color: #a3acc0; font-size: 0.8rem; }
.ahm-tick { display: flex; align-items: center; gap: 0.55rem; min-height: 44px; font-weight: 600; cursor: pointer; }
.ahm-tick input { width: 20px; height: 20px; accent-color: #e6c84a; }
.ahm-dlg-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.6rem; margin-top: 1rem; }
.ahm-dlg-err { margin: 0.8rem 0 0; padding: 0.6rem 0.8rem; border-radius: 8px; border: 1px solid rgba(255, 138, 122, 0.45); background: rgba(255, 92, 72, 0.08); color: #ffd0c9; }
.ahm-dlg .ahm-act-btn, .ahm-toast { --m-gold: #e6c84a; --m-gold-hi: #ffd964; --m-cond: "Roboto Condensed", Inter, sans-serif; }
.ahm-toast { position: fixed; z-index: 1300; left: 50%; bottom: 20px; max-width: min(560px, calc(100% - 32px)); padding: 0.75rem 1rem; border-radius: 10px; border: 1px solid rgba(95, 227, 154, 0.5); background: #10261b; color: #e6fff0; font: 500 0.95rem/1.45 Inter, sans-serif; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6); transform: translate(-50%, 150%); transition: transform 0.25s ease; }
.ahm-toast.is-on { transform: translate(-50%, 0); }
.ahm-toast.is-bad { border-color: rgba(255, 138, 122, 0.55); background: #2a1210; color: #ffe1dc; }
@media (prefers-reduced-motion: reduce) { .ahm-pend i { animation: none; } .ahm-toast { transition: none; } }

/* ---------- item trading: My backpack (from the approved prototype) ---------- */
.bp-pad { padding: calc(0.9rem * var(--s)); }
.bp-two { display: grid; grid-template-columns: max-content minmax(calc(330px * var(--s)), 1fr); gap: calc(1rem * var(--s)); align-items: start; }
.bp-right { min-width: 0; }
.bp-snapbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1.2rem; margin: 0 0 calc(0.7rem * var(--s)); }
.bp-snap { margin: 0; color: var(--m-muted); font-size: calc(0.86rem * var(--s)); }
.bp-left-n { margin: 0; color: var(--m-muted); font-size: calc(0.86rem * var(--s)); }
.bp-left-n b { color: #fff; }
.bp-banner { margin: 0 0 calc(0.8rem * var(--s)); padding: calc(0.7rem * var(--s)) calc(0.9rem * var(--s)); border-radius: 10px; border: 1px solid var(--m-line); background: var(--m-panel-2); color: #e6e9f0; font-size: calc(0.92rem * var(--s)); }
.bp-banner.is-info { border-color: rgba(116, 185, 255, 0.5); background: rgba(116, 185, 255, 0.08); }
.bp-instead { display: grid; gap: 0.4rem; padding: calc(1.1rem * var(--s)); border-radius: 12px; border: 1px solid var(--m-line); background: var(--m-panel-2); max-width: calc(760px * var(--s)); }
.bp-instead b { color: #fff; font: 700 calc(1.1rem * var(--s))/1.35 var(--m-cond); }
.bp-instead span { color: #cfd5e2; font-size: calc(0.9rem * var(--s)); line-height: 1.55; }
.bp-instead code { padding: 0.05em 0.35em; border-radius: 4px; background: rgba(255, 255, 255, 0.08); color: #fff; }
.bp-instead.is-warn { border-color: rgba(255, 179, 92, 0.55); background: rgba(255, 179, 92, 0.07); }
.bp-instead.is-small { padding: 0.7rem; }
.bp-grid { display: grid; grid-template-columns: repeat(6, minmax(0, calc(150px * var(--s)))); gap: calc(6px * var(--s)); }
.bp-tile { position: relative; aspect-ratio: 1; display: grid; place-items: center; padding: 8%; border-radius: calc(8px * var(--s)); border: 1px solid var(--m-line-2); background: radial-gradient(circle at 50% 40%, #1c2438, #0b101c); cursor: pointer; min-width: 0; }
.bp-tile .ahm-ic { width: 82%; height: 82%; background: none; }
.bp-tile:hover { border-color: rgba(255, 217, 100, 0.45); }
.bp-tile.is-on { border-color: var(--m-gold-hi); box-shadow: 0 0 0 1px var(--m-gold-hi) inset, 0 0 18px rgba(255, 217, 100, 0.18); }
.bp-tile.is-dis { opacity: 0.45; }
.bp-tile.is-empty { cursor: default; background: rgba(255, 255, 255, 0.015); border-style: dashed; }
.bp-tile:focus-visible { outline: 2px solid var(--m-gold-hi); outline-offset: 2px; }
.bp-amt { position: absolute; top: 4%; right: 6%; font: 700 calc(0.8rem * var(--s))/1 var(--m-cond); color: #fff; text-shadow: 0 1px 2px #000; }
.bp-slots { position: absolute; top: 6%; left: 6%; display: grid; gap: 2px; }
.bp-slots i { width: calc(6px * var(--s)); height: calc(6px * var(--s)); background: #4a5266; }
.bp-slots i.is-on { background: var(--m-gold-hi); }
.bp-cond { position: absolute; left: 10%; right: 10%; bottom: 7%; height: 3px; border-radius: 2px; background: #262d3d; }
.bp-cond i { display: block; height: 100%; border-radius: 2px; background: var(--m-gold); }
.bp-lock { position: absolute; bottom: 6%; left: 6%; font-size: calc(0.8rem * var(--s)); }
.bp-acts { margin-top: calc(1rem * var(--s)); padding-top: calc(0.9rem * var(--s)); border-top: 1px solid var(--m-line-2); display: grid; gap: 0.5rem; }
.bp-you { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem; border-radius: 10px; border: 1px solid var(--m-line-2); background: #0a0f1b; }
.bp-you b { display: block; font: 700 calc(1.1rem * var(--s))/1.2 var(--m-cond); color: #fff; }
.bp-you span { color: var(--m-muted); font-size: calc(0.85rem * var(--s)); }
.bp-right .ahm-cap { margin-top: calc(0.9rem * var(--s)); }
.bp-row { display: flex; flex-wrap: wrap; align-items: end; gap: 0.6rem 1rem; margin-top: calc(0.8rem * var(--s)); color: var(--m-muted); font-size: calc(0.85rem * var(--s)); }
.bp-row label { display: grid; gap: 0.3rem; }
.bp-num { width: calc(130px * var(--s)); padding-right: 0.6rem; text-align: right; font-weight: 700; }
.bp-price { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: calc(0.6rem * var(--s)); color: #dfe4ee; font: 600 calc(0.95rem * var(--s)) var(--m-cond); }
.bp-hint { margin: 0.4rem 0 0; color: var(--m-muted); font-size: calc(0.82rem * var(--s)); line-height: 1.45; }
.bp-durs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.bp-chip { min-height: calc(40px * var(--s)); padding: 0.25rem 0.85rem; border-radius: 8px; border: 1px solid rgba(255, 217, 100, 0.3); background: rgba(255, 255, 255, 0.02); color: #dfe4ee; font: 700 calc(0.9rem * var(--s))/1 var(--m-cond); cursor: pointer; }
.bp-chip.is-on { border-color: var(--m-gold-hi); color: var(--m-gold-hi); background: var(--m-gold-dim); }
.bp-tickrow { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.5rem; color: #dfe4ee; font-size: calc(0.88rem * var(--s)); }
.bp-tickrow input { width: 18px; height: 18px; accent-color: var(--m-gold); }
.bp-sum { display: grid; gap: 0.35rem; margin-top: calc(0.9rem * var(--s)); padding: 0.75rem 0.9rem; border-radius: 10px; border: 1px solid var(--m-line-2); background: #0a0f1b; }
.bp-sum div { display: flex; justify-content: space-between; gap: 1rem; font: 500 calc(0.95rem * var(--s)) var(--m-cond); color: var(--m-muted); }
.bp-sum b { color: var(--m-good); }
.bp-sum b.is-short { color: #ff8a7a; }
.bp-itempick { position: relative; margin-top: 0.5rem; }
.bp-itempick[hidden] { display: none; }
.bp-ilist { display: grid; gap: 2px; margin-top: 4px; max-height: calc(260px * var(--s)); overflow: auto; }
.bp-ihit { display: flex; align-items: center; gap: 0.5rem; min-height: 40px; padding: 0.3rem 0.5rem; border: 0; border-radius: 6px; background: rgba(255, 255, 255, 0.03); color: #e6e9f0; font: 500 calc(0.95rem * var(--s)) var(--m-cond); text-align: left; cursor: pointer; }
.bp-ihit:hover, .bp-ihit:focus-visible { background: var(--m-gold-dim); color: var(--m-gold-hi); }
.bp-needs { margin: 0.2rem 0 0.7rem; padding: calc(0.75rem * var(--s)); border-radius: 10px; border: 1px solid var(--m-line); background: #0a0f1b; }
.bp-needs-row { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.5rem; }
.bp-needs-row b { display: block; font: 700 calc(1.05rem * var(--s))/1.2 var(--m-cond); color: #fff; }
.bp-needs-row span { color: var(--m-muted); font-size: calc(0.82rem * var(--s)); }
.bp-gl { display: grid; gap: 0.3rem; margin: 0.3rem 0 0; }
.bp-gl div { display: flex; justify-content: space-between; gap: 1rem; font-size: calc(0.86rem * var(--s)); }
.bp-gl dt { color: var(--m-muted); }
.bp-gl dd { margin: 0; color: #fff; text-align: right; }
.bp-gl dd.is-ok { color: var(--m-good); }
.bp-gl dd.is-short { color: #ff8a7a; }
.bp-who { margin: 0.6rem 0 0; padding: 0.5rem 0.65rem; border-radius: 8px; background: rgba(255, 217, 100, 0.07); color: #e6e9f0; font-size: calc(0.84rem * var(--s)); line-height: 1.45; }
.bp-who b, .bp-who-in { color: var(--m-gold-hi); }
@media (max-width: 1400px) { .bp-grid { grid-template-columns: repeat(6, minmax(0, calc(96px * var(--s)))); } }
@media (max-width: 1100px) { .bp-two { grid-template-columns: minmax(0, 1fr); } .bp-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 560px) { .bp-grid { gap: 4px; } .bp-amt { font-size: 0.7rem; } }

.bp-guide { margin-top: calc(0.9rem * var(--s)); }
.bp-bars { display: flex; align-items: end; gap: 3px; height: calc(46px * var(--s)); padding: 4px; border-radius: 8px; background: #0a0f1b; }
.bp-bars i { flex: 1; min-width: 3px; background: var(--m-gold); opacity: 0.8; border-radius: 2px 2px 0 0; }

/* ahw32: the enchanted buy offer */
.bp-ench { margin: calc(0.6rem * var(--s)) 0 calc(0.4rem * var(--s)); }
.bp-perks { display: grid; gap: calc(0.4rem * var(--s)); margin-bottom: calc(0.5rem * var(--s)); }
.bp-perk { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: calc(0.6rem * var(--s)); padding: calc(0.5rem * var(--s)) calc(0.6rem * var(--s)); border: 1px solid rgba(255, 217, 100, 0.22); border-radius: 8px; background: rgba(255, 255, 255, 0.02); }
.bp-perk-m { min-width: 0; }
.bp-perk-m b { display: block; color: #fff; font: 700 calc(0.98rem * var(--s))/1.2 var(--m-cond); margin-bottom: calc(0.3rem * var(--s)); }
.bp-steps { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.bp-step { height: calc(14px * var(--s)); min-width: 0; padding: 0; border-radius: 999px; border: 1px solid rgba(255, 217, 100, 0.3); background: rgba(255, 255, 255, 0.03); cursor: pointer; }
.bp-step.is-on { background: #e6c84a; border-color: #e6c84a; }
.bp-step:hover { border-color: var(--m-gold-hi); }
.bp-perk-v { color: var(--m-gold-hi); font: 700 calc(1rem * var(--s))/1 var(--m-cond); white-space: nowrap; min-width: calc(4.2rem * var(--s)); text-align: right; }
.bp-perk-x { width: calc(30px * var(--s)); height: calc(30px * var(--s)); border-radius: 6px; border: 1px solid rgba(255, 90, 90, 0.4); background: rgba(160, 30, 30, 0.25); color: #ff8a8a; font: 700 calc(0.85rem * var(--s))/1 var(--m-cond); cursor: pointer; }
.bp-perk-add { min-height: calc(44px * var(--s)); border-radius: 8px; border: 1px solid var(--m-gold-hi); background: rgba(255, 217, 100, 0.08); color: var(--m-gold-hi); font: 700 calc(1rem * var(--s))/1 var(--m-cond); cursor: pointer; }
.bp-perk-add.is-on, .bp-perk-add:hover { background: var(--m-gold-dim); }
.bp-pgrid-w { margin-bottom: calc(0.6rem * var(--s)); }
.bp-pgrid-w .ahm-in { width: 100%; margin-bottom: calc(0.4rem * var(--s)); }
.bp-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(104px * var(--s)), 1fr)); gap: calc(6px * var(--s)); max-height: calc(330px * var(--s)); overflow: auto; }
.bp-ptile { display: grid; justify-items: center; align-content: center; gap: calc(0.35rem * var(--s)); min-height: calc(92px * var(--s)); padding: calc(0.5rem * var(--s)) calc(0.3rem * var(--s)); border-radius: 8px; border: 1px solid rgba(255, 217, 100, 0.2); background: rgba(0, 0, 0, 0.35); color: #dfe4ee; font: 600 calc(0.85rem * var(--s))/1.15 var(--m-cond); text-align: center; cursor: pointer; }
.bp-ptile:hover { border-color: var(--m-gold-hi); }
.bp-ptile.is-on { opacity: 0.45; cursor: default; }
.bp-ptile[hidden] { display: none; }
.bp-ptile .ahm-perkic.is-big, .bp-perk .ahm-perkic.is-big { width: calc(38px * var(--s)); height: calc(38px * var(--s)); }
@media (max-width: 560px) { .bp-perk { grid-template-columns: auto 1fr auto; } .bp-perk-v { grid-column: 2; grid-row: 2; text-align: left; } .bp-perk-x { grid-column: 3; grid-row: 1 / span 2; } }
.bp-pgrid { grid-template-columns: repeat(auto-fill, minmax(calc(112px * var(--s)), 1fr)); }
.bp-ptile { font-size: calc(0.8rem * var(--s)); }
.bp-ptile span { max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }

.bp-banner.is-warn { border-color: rgba(255, 140, 90, 0.55); background: rgba(160, 60, 20, 0.18); color: #ffd2b8; }

.bp-stepw { display: flex; align-items: center; gap: calc(6px * var(--s)); }
.bp-stepw .bp-steps { flex: 1; }
.bp-pm { display: none; flex: none; width: 40px; height: 36px; border-radius: 8px; border: 1px solid rgba(255, 217, 100, 0.4); background: rgba(255, 255, 255, 0.03); color: var(--m-gold-hi); font: 700 1.2rem/1 var(--m-cond); cursor: pointer; }
.bp-pm:disabled { opacity: 0.35; cursor: default; }
@media (max-width: 760px) { .bp-pm { display: block; } .bp-step { height: 22px; } .bp-steps { gap: 2px; } }
@media (max-width: 560px) {
  .bp-perk { grid-template-columns: auto 1fr auto; }
  .bp-perk .ahm-perkic { grid-column: 1; grid-row: 1; }
  .bp-perk-v { grid-column: 2; grid-row: 1; text-align: right; }
  .bp-perk-x { grid-column: 3; grid-row: 1; }
  .bp-perk-m { grid-column: 1 / -1; grid-row: 2; }
}
