/* In-app Account History drawer (account-history.js): light coal theme, gold accent. Right drawer on desktop, bottom sheet on phones */
html.wb-ah-lock { overflow:hidden; }
.wb-ah-overlay { position:fixed; inset:0; z-index:10001; display:flex; justify-content:flex-end; background:rgba(45,55,72,.42); backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px); opacity:0; transition:opacity .24s ease; }
.wb-ah-overlay[hidden] { display:none; }
.wb-ah-overlay.is-open { opacity:1; }
.wb-ah-drawer { position:relative; display:flex; flex-direction:column; width:min(640px, 100%); height:100%; box-sizing:border-box; background:#F0F3F6; color:#2D3748;
  border-left:3px solid #D4AF37; box-shadow:-20px 0 50px -20px rgba(45,55,72,.5); transform:translateX(32px); transition:transform .28s cubic-bezier(.2,.9,.3,1); font-family:inherit; }
.wb-ah-overlay.is-open .wb-ah-drawer { transform:none; }
.wb-ah-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:22px 22px 12px; }
.wb-ah-title { margin:0; font-size:1.3rem; font-weight:800; letter-spacing:-.01em; color:#2D3748; }
.wb-ah-sub { margin:4px 0 0; font-size:.8rem; color:#5A6678; }
.wb-ah-close { flex:none; width:34px; height:34px; border-radius:50%; border:1px solid #CBD5E1; background:#fff; color:#2D3748; font-size:.95rem; cursor:pointer; transition:border-color .18s, color .18s; }
.wb-ah-close:hover, .wb-ah-close:focus-visible { border-color:#D4AF37; color:#b7860b; outline:none; }
.wb-ah-filters { display:flex; gap:6px; padding:0 22px 12px; overflow-x:auto; scrollbar-width:none; border-bottom:1px solid #DCE2E8; }
.wb-ah-filters::-webkit-scrollbar { display:none; }
.wb-ah-chip { flex:none; padding:6px 12px; border-radius:999px; border:1px solid #CBD5E1; background:#fff; color:#2D3748; font:inherit; font-size:.78rem; font-weight:700; cursor:pointer; transition:background .18s, border-color .18s, color .18s; }
.wb-ah-chip:hover { border-color:#D4AF37; }
.wb-ah-chip.is-active { background:#2D3748; border-color:#2D3748; color:#F0F3F6; }
.wb-ah-chip:focus-visible { outline:2px solid #D4AF37; outline-offset:2px; }
.wb-ah-body { flex:1; min-height:0; overflow-y:auto; padding:6px 14px 22px; overscroll-behavior:contain; }
.wb-ah-table { width:100%; border-collapse:separate; border-spacing:0 6px; font-size:.84rem; table-layout:fixed; }
.wb-ah-table thead th { position:sticky; top:0; z-index:1; padding:8px 10px; background:#F0F3F6; color:#5A6678; font-size:.68rem; font-weight:800; text-transform:uppercase; letter-spacing:.07em; text-align:left; }
.wb-ah-table th:nth-child(1) { width:30%; }
.wb-ah-table th:nth-child(3) { width:22%; }
.wb-ah-table th:nth-child(4) { width:13%; }
.wb-ah-row td { padding:10px; background:#fff; vertical-align:top; border-top:1px solid #E2E8F0; border-bottom:1px solid #E2E8F0; overflow-wrap:anywhere; }
.wb-ah-row td:first-child { border-left:1px solid #E2E8F0; border-radius:10px 0 0 10px; }
.wb-ah-row td:last-child { border-right:1px solid #E2E8F0; border-radius:0 10px 10px 0; }
.wb-ah-type { display:inline-flex; align-items:center; gap:7px; font-weight:700; color:#2D3748; }
.wb-ah-ico { display:grid; place-items:center; flex:none; width:24px; height:24px; border-radius:7px; background:#EEF1F4; color:#2D3748; font-size:.78rem; }
.wb-ah-transfer .wb-ah-ico { background:#E0F2FE; color:#0369A1; }
.wb-ah-reward .wb-ah-ico { background:#FEF3C7; color:#B7860B; }
.wb-ah-post .wb-ah-ico { background:#E6F4F1; color:#0D9488; }
.wb-ah-vote .wb-ah-ico { background:#FDE7EF; color:#BE185D; }
.wb-ah-power .wb-ah-ico { background:#EDE9FE; color:#6D28D9; }
.wb-ah-detail { color:#4A5568; line-height:1.4; }
.wb-ah-user { font-weight:700; color:#2D3748; }
.wb-ah-link { color:#0D9488; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:.76rem; }
.wb-ah-ptitle { font-weight:600; color:#2D3748; }
.wb-ah-memo { display:block; margin-top:3px; font-size:.76rem; color:#718096; font-style:italic; }
.wb-ah-num { text-align:right; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-weight:700; font-size:.78rem; color:#2D3748; }
.wb-ah-num.is-in { color:#047857; }
.wb-ah-num.is-out { color:#B91C1C; }
.wb-ah-when { text-align:right; color:#718096; font-size:.74rem; white-space:nowrap; }
.wb-ah-msg { margin:14px 0 0; text-align:center; color:#5A6678; font-size:.84rem; }
.wb-ah-msg:empty { display:none; }
.wb-ah-more { display:block; margin:14px auto 0; padding:9px 20px; border-radius:999px; border:1.5px solid #D4AF37; background:#fff; color:#2D3748; font:inherit; font-size:.84rem; font-weight:700; cursor:pointer; }
.wb-ah-more:hover, .wb-ah-more:focus-visible { background:#FEF9E7; outline:none; }
.wb-ah-more[hidden] { display:none; }

@media (max-width: 640px) {
  .wb-ah-overlay { align-items:flex-end; }
  .wb-ah-drawer { height:88vh; height:88dvh; border-left:none; border-top:3px solid #D4AF37; border-radius:18px 18px 0 0; transform:translateY(40px); }
  .wb-ah-head { padding:18px 16px 10px; }
  .wb-ah-filters { padding:0 16px 10px; }
  .wb-ah-body { padding:4px 8px 18px; }
  /* Narrow screens: each operation becomes a two-line card (type + amount, then details + time) */
  .wb-ah-table thead { display:none; }
  .wb-ah-table, .wb-ah-table tbody { display:block; }
  .wb-ah-row { display:grid; grid-template-columns:1fr auto; gap:4px 10px; margin-bottom:8px; padding:10px 12px; background:#fff; border:1px solid #E2E8F0; border-radius:12px; }
  .wb-ah-row td, .wb-ah-row td:first-child, .wb-ah-row td:last-child { padding:0; border:none; border-radius:0; background:none; }
  .wb-ah-row td:nth-child(2) { grid-column:1; grid-row:2; }
  .wb-ah-row td:nth-child(3) { grid-column:2; grid-row:1; }
  .wb-ah-row td:nth-child(4) { grid-column:2; grid-row:2; align-self:end; }
}
@media (prefers-reduced-motion: reduce) {
  .wb-ah-overlay, .wb-ah-drawer { transition:none; }
}
