/* ==========================================================================
   Comstocks shell: State of Blocks chrome in Comstocks green. Markup is rendered
   by js/shell.js; a page only provides
     <header id="site-header" data-variant="app|site"></header>
     <footer id="site-footer" data-variant="app|site"></footer>

   CLASS INDEX
     #site-header          sticky: the mono strip scrolls away, the bar sticks (top: -strip)
       .hdr-strip          A FIELD MANUAL FOR TOKENIZED MARKETS / VOL. 1 · NO. 4663 · EST. 2026
       .hdr-bar .hdr       logo tile + serif name + mono subtitle, nav, search (app), right slot
       .logo-tile          dark square tile with the S (--tile px) and a hard shadow
       .hdr-nav-link       mono nav; [aria-current] boxed with a red underline (>= 1180)
       .hdr-search         app pages: ruled paper search field (>= 720)
       .hdr-right          search icon (app, < 720), Sign in / account chip (app) or OPEN THE APP (site), menu button
       .hdr-menu           paper sheet menu below the bar (< 1180)
     .subsearch            /app only, below 720: full-width search under the header
     .search-box .search-pop .search-row .search-sheet
     .token-chip           $COMSTOCKS ticker with Buy and CA (disabled quietly while blank)
     .acct-chip .menu      account button and its menu
     .ftr                  SOB footer: .ftr-grid (brand, INDEX, CHANNELS, COLOPHON), .ftr-bar
     .modal-root .modal    centered card at 640+, bottom sheet below
     .toasts .toast        top-right stack (full width below 700)
     .wallet-*             wallet modal rows
     .scroll-progress      3px red reading bar at the top of the viewport
   ========================================================================== */

/* -------------------------------------------------------------- scroll lock */
html.is-locked,
html.is-locked body { overflow: hidden; }
html.is-locked body { padding-right: var(--scrollbar-comp); }

.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: calc(var(--z-header) + 5);
  height: 3px; background: var(--red); transform: scaleX(0); transform-origin: left center;
  pointer-events: none;
}

/* ------------------------------------------------------------------ header */
#site-header {
  position: sticky;
  top: calc(-1 * var(--strip-h));
  z-index: var(--z-header);
  background: hsl(var(--paper-c) / .96);
  border-bottom: 1px solid hsl(var(--ink-c) / .12);
}
@supports ((-webkit-backdrop-filter: blur(4px)) or (backdrop-filter: blur(4px))) {
  #site-header { background: hsl(var(--paper-c) / .92); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
}
.hdr-strip { height: var(--strip-h); border-bottom: 1px solid hsl(var(--ink-c) / .1); background: var(--paper); }
.hdr-strip-in {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 100%;
  font: 400 9.5px/1 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
}
.hdr-strip-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdr-strip-r { flex: none; white-space: nowrap; }
@media (max-width: 639.98px) {
  .hdr-strip-in { letter-spacing: .18em; }
  .hdr-strip-r { display: none; }
}

.hdr-bar { position: relative; }
.hdr {
  display: flex; align-items: center; gap: 16px;
  height: var(--header-h); min-width: 0;
}
.hdr-brand { display: inline-flex; align-items: center; gap: 12px; flex: none; min-width: 0; color: var(--ink); }
.logo-tile {
  --tile: 40px;
  display: inline-block; flex: none; width: var(--tile); height: var(--tile);
  background: #000; box-shadow: var(--shadow-hard-sm); overflow: hidden;
}
.logo-tile img { width: 100%; height: 100%; object-fit: cover; }
.hdr-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; line-height: 1; }
.hdr-wordmark { font: 400 22px/1 var(--serif); color: var(--ink); white-space: nowrap; letter-spacing: -0.005em; }
.hdr-sub { font: 400 8px/1.2 var(--mono); letter-spacing: .34em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
@media (max-width: 639.98px) { .hdr-sub { display: none; } }
.hdr.is-app .hdr-sub { display: none; }

@media (max-width: 379.98px) { .hdr.is-app .hdr-name { display: none; } }
@media (hover: hover) { .hdr-brand:hover .hdr-wordmark { color: var(--green); } }

.hdr-nav { display: none; align-items: center; gap: 2px; flex: none; margin-left: auto; }
.hdr.is-app .hdr-nav { margin-left: 8px; }
@media (min-width: 1180px) { .hdr-nav { display: flex; } }
.hdr-nav-link {
  position: relative; display: inline-flex; align-items: center; height: 38px; padding: 0 12px;
  border: 1px solid transparent; color: var(--ink-2); white-space: nowrap;
  font: 400 11px/1 var(--mono); letter-spacing: .24em; text-transform: uppercase;
  transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2), background-color var(--dur-2), box-shadow var(--dur-2), color var(--dur-2);
}
.hdr-nav-link[aria-current="page"] { border-color: hsl(var(--ink-c) / .25); color: var(--ink); }
.hdr-nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--red); }
@media (hover: hover) {
  .hdr-nav-link:not([aria-current="page"]):hover { transform: translateY(-1px); border-color: hsl(var(--ink-c) / .35); background: hsl(var(--paper-2-c) / .7); color: var(--ink); box-shadow: var(--shadow-hard-sm); }
}

.hdr-search { display: none; flex: 1 1 auto; min-width: 0; max-width: 360px; margin-left: auto; }
@media (min-width: 720px) { .hdr-search { display: block; } }
@media (min-width: 1180px) { .hdr-search { max-width: 280px; margin-left: 12px; } }
.hdr-search .search-box { --field-h: 40px; }

.hdr-right { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; min-width: 0; }
@media (min-width: 720px) { .hdr-search + .hdr-right { margin-left: 0; } }
.hdr.is-site .hdr-nav + .hdr-right { margin-left: 16px; }
@media (max-width: 1179.98px) { .hdr.is-site .hdr-right { margin-left: auto; } }
.hdr-cta { display: none; }
@media (min-width: 640px) { .hdr-cta { display: inline-flex; } }
.hdr-search-btn { display: inline-flex; }
@media (min-width: 720px) { .hdr-search-btn { display: none; } }
.hdr-menu-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 1px solid hsl(var(--ink-c) / .3); border-radius: var(--radius); color: var(--ink); background: transparent;
}
.hdr-menu-btn[aria-expanded="true"] { background: var(--paper-2); border-color: var(--ink); }
@media (min-width: 1180px) { .hdr-menu-btn { display: none; } }
@media (max-width: 639.98px) { .hdr { gap: 10px; } .hdr-right { gap: 8px; } }

.hdr-menu {
  position: absolute; left: 0; right: 0; top: 100%; z-index: var(--z-dropdown);
  max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border-top: 1px solid hsl(var(--ink-c) / .12); border-bottom: 1px solid hsl(var(--ink-c) / .5);
  box-shadow: 0 6px 0 hsl(var(--ink-c) / .08);
  animation: fade-in var(--dur-2) ease both;
}
.hdr-menu[hidden] { display: none; }
.hdr-menu-in { display: flex; flex-direction: column; padding-top: 10px; padding-bottom: 20px; }
.hdr-menu-link {
  display: flex; align-items: center; min-height: 44px; padding: 0 2px;
  border-bottom: 1px dotted hsl(var(--ink-c) / .2);
  font: 400 12px/1.2 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-2);
}
.hdr-menu-link[aria-current="page"] { color: var(--ink); }
.hdr-menu-link[aria-current="page"]::before { content: ""; width: 6px; height: 6px; margin-right: 10px; border-radius: 50%; background: var(--red); flex: none; }
@media (hover: hover) { .hdr-menu-link:hover { color: var(--green); } }
.hdr-menu-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 18px; }
.hdr-menu-foot .btn-m { flex: 1 1 200px; }
@media (min-width: 1180px) { .hdr-menu { display: none !important; } }

/* ------------------------------------------------------------------ search */
.search-wrap { position: relative; min-width: 0; }
.search-box { width: 100%; }
.search-box .kbd { display: none; }
@media (min-width: 880px) {
  .search-box .kbd { display: inline-flex; }
}
.search-box:focus-within .kbd { opacity: 0; }
.search-box .field-input[type="search"] { -webkit-appearance: none; appearance: none; }

.subsearch {
  padding: 20px var(--gutter-content) 0;
  max-width: calc(var(--content) + 2 * var(--gutter-content));
  margin-inline: auto;
}
.subsearch .search-box { --field-h: 44px; }
@media (min-width: 600px) {
  .subsearch { padding-top: 32px; margin-bottom: -12px; }
}
@media (min-width: 720px) {
  .subsearch { display: none; }
}

.search-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: var(--z-dropdown);
  width: 100%;
  min-width: min(420px, calc(100vw - 2 * var(--gutter)));
  max-height: min(70vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border: 1px solid hsl(var(--ink-c) / .55);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  transform-origin: top center;
  animation: pop-in var(--dur-2) var(--ease-expo) both;
}
.subsearch .search-pop { min-width: 0; }
.search-group + .search-group {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.search-group-label { padding: 10px 10px 6px; }
.search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
}
.search-row[aria-selected="true"] { background: var(--paper-2); box-shadow: inset 2px 0 0 var(--green); }
@media (hover: hover) {
  .search-row:hover { background: var(--hover-wash); }
  .search-row[aria-selected="true"]:hover { background: var(--paper-2); }
}
.search-row-img {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--elevated);
  color: var(--ink-2);
  font: 600 12px/1 var(--font);
}
.search-row-img.is-circle { border-radius: 50%; }
.search-row-img::before { content: attr(data-mono); }
.search-row-img > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--elevated);
}
.search-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}
.search-row-label {
  font: 400 18px/22px var(--serif);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-row-sub {
  font: 400 12px/16px var(--font);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: none;
  max-width: 45%;
  text-align: right;
}
.search-row-value { font: 500 12px/17px var(--mono); color: var(--ink); white-space: nowrap; }
.search-row-note { font: 400 10.5px/14px var(--mono); color: var(--muted); white-space: nowrap; }
.search-row .is-up { color: var(--up); }
.search-row .is-down { color: var(--down-ink); }
.search-empty {
  padding: 14px 10px;
  font: 400 13px/18px var(--font);
  color: var(--muted);
}
.search-loading { display: flex; flex-direction: column; gap: 6px; padding: 6px 4px; }
.search-loading .skeleton { height: 40px; border-radius: var(--radius); background: var(--paper-2); }
.search-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 4px;
  padding: 8px 10px 4px;
  border-top: 1px dotted hsl(var(--ink-c) / .35);
  font: 500 10px/14px var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.search-foot .kbd { height: 18px; min-width: 18px; padding: 0 4px; margin-right: 4px; font-size: 10px; }
@media (max-width: 719.98px) {
  .search-foot { display: none; }
}

.search-sheet {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  background: var(--page);
  animation: fade-in var(--dur-2) ease both;
}
.search-sheet-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--border);
}
.search-sheet-bar .search-box { flex: 1 1 auto; --field-h: 44px; }
.search-sheet-results {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px calc(var(--gutter) - 10px) calc(24px + var(--safe-bottom));
}
.search-sheet-results .search-row { min-height: 56px; }
.search-sheet.is-closing { animation: fade-out 120ms ease both; }

/* -------------------------------------------------------------- token chip */
.token-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; max-width: 100%;
  min-height: 40px; padding: 4px 4px 4px 12px;
  border: 1px solid hsl(var(--ink-c) / .35); border-radius: var(--radius); background: var(--paper);
}
.token-chip-ticker {
  margin-right: 4px; font: 500 11px/16px var(--mono); letter-spacing: .16em; color: var(--ink); white-space: nowrap;
}
.token-chip .btn { --btn-h: 30px; }
@media (max-width: 639.98px) {
  .token-chip { min-height: 48px; }
  .token-chip .btn { min-height: 40px; }
}

/* ----------------------------------------------------------- account chip */
.hdr-acct { position: relative; flex: none; }
.acct-chip { gap: 8px; padding: 0 10px 0 8px; max-width: 100%; }
.acct-avatar {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--acct-grad, linear-gradient(135deg, #7CCB9C, #216B41));
  box-shadow: 0 0 0 1px hsl(var(--ink-c) / .5);
}
.acct-addr { font: 500 12px/17px var(--mono); letter-spacing: .04em; text-transform: none; color: var(--ink); white-space: nowrap; }
.acct-caret { color: var(--muted); transition: transform var(--dur-2) var(--ease-out); }
.acct-chip[aria-expanded="true"] .acct-caret { transform: rotate(180deg); }
.acct-chip.is-wrong { --btn-border: hsl(var(--red-c) / .6); --btn-border-hover: var(--red); }
.acct-chip.is-wrong .acct-avatar { background: var(--down); }
.acct-net { font: 500 10.5px/16px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--danger-ink); white-space: nowrap; }
@media (max-width: 399.98px) {
  .acct-chip.is-wrong .acct-addr { display: none; }
}

.menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: var(--z-dropdown);
  min-width: 248px; max-width: calc(100vw - 2 * var(--gutter)); padding: 6px;
  background: var(--paper); border: 1px solid hsl(var(--ink-c) / .6); border-radius: var(--radius);
  box-shadow: var(--shadow-hard); transform-origin: top right;
  animation: pop-in var(--dur-2) var(--ease-expo) both;
}
.menu-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; padding: 10px; border-bottom: 1px dotted hsl(var(--ink-c) / .35); }
.menu-head-addr { font: 500 13px/18px var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.menu-head-net { display: flex; align-items: center; gap: 6px; font: 400 10px/14px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.menu-head-net .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none; }
.menu-head-net.is-wrong { color: var(--danger-ink); }
.menu-head-net.is-wrong .dot { background: var(--down); }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px;
  border-radius: var(--radius); font: 400 11px/18px var(--mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink); text-align: left; white-space: nowrap; cursor: pointer;
}
.menu-item .icon { color: var(--muted); }
.menu-item:focus-visible { outline-offset: -2px; }
@media (hover: hover) { .menu-item:hover { background: var(--paper-2); } }
.menu-item:focus { background: var(--paper-2); }
.menu-item.is-accent { color: var(--green); }
.menu-item.is-accent .icon { color: var(--green); }
.menu-sep { height: 1px; margin: 4px 0; background: hsl(var(--ink-c) / .15); }

/* ------------------------------------------------------------------ footer */
#site-footer { background: var(--paper); border-top: 1px solid hsl(var(--ink-c) / .12); }
.ftr-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px;
  padding-top: 56px; padding-bottom: 48px;
}
@media (min-width: 600px) { .ftr-grid { grid-template-columns: 1fr 1fr; gap: 44px 32px; } .ftr-brandcol { grid-column: 1 / -1; } }
@media (min-width: 900px) { .ftr-grid { grid-template-columns: 1.35fr 1fr 1fr 1fr; padding-top: 64px; padding-bottom: 64px; } .ftr-brandcol { grid-column: auto; } }
.ftr-brandcol { min-width: 0; }
.ftr-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.ftr-word { font: 400 26px/1 var(--serif); }
.ftr-blurb { max-width: 300px; margin-top: 18px; font: 400 14px/1.6 var(--font); color: var(--ink-2); }
.ftr-seal { margin-top: 28px; width: 96px; height: 96px; }
.seal { display: block; width: 100%; height: 100%; transform: rotate(-8deg); }
.ftr-col { min-width: 0; }
.ftr-h { font: 400 10px/1.4 var(--mono); letter-spacing: .34em; text-transform: uppercase; color: var(--muted); }
.ftr-list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ftr-list li { font: 400 12px/1.5 var(--mono); letter-spacing: .12em; color: var(--ink-2); }
.ftr-list a { display: inline-flex; align-items: center; min-height: 30px; min-width: 44px; color: var(--ink-2); transition: color var(--dur-1); }
.ftr-list.is-plain li { min-height: 30px; display: flex; align-items: center; }
.ftr-list .ftr-token { margin-top: 10px; }
@media (hover: hover) { .ftr-list a:hover { color: var(--green); } }
@media (max-width: 639.98px) { .ftr-list a, .ftr-list.is-plain li { min-height: 40px; } }
/* the $COMSTOCKS chip's Buy and CA are buttons, not footer links: keep their own ink and hover */
.ftr-list .token-chip a.btn, .ftr-list .token-chip a.btn:hover { color: var(--btn-ink); }
.ftr-bar { border-top: 1px solid hsl(var(--ink-c) / .12); }
.ftr-bar-in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  padding-top: 20px; padding-bottom: calc(20px + var(--safe-bottom));
  font: 400 9.5px/1.5 var(--mono); letter-spacing: .28em; text-transform: uppercase; color: var(--muted);
}
.ftr-bar-l { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; min-width: 0; }
.ftr-bar-l a { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; min-width: 44px; color: var(--muted); }
@media (hover: hover) { .ftr-bar-l a:hover { color: var(--ink); } }
@media (max-width: 639.98px) { .ftr-bar-l a { min-height: 40px; } .ftr-bar-in { letter-spacing: .2em; } }
.ftr-bar-r { display: inline-flex; align-items: center; gap: 8px; }
.ftr-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex: none; }

/* ------------------------------------------------------------ modal, sheet */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(var(--scrim-blur));
  backdrop-filter: blur(var(--scrim-blur));
  animation: fade-in 140ms ease both;
  touch-action: none;
}
.modal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 56px 24px 16px;
  background: var(--paper);
  border: 1px solid hsl(var(--ink-c) / .6);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-lg);
  outline: none;
  animation: pop-in var(--dur-3) var(--ease-expo) both;
}
.modal[data-size="md"] { max-width: 480px; }
.modal[data-size="lg"] { max-width: 640px; }
.modal.is-sheet { padding-top: 20px; }
.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  color: var(--ink);
}
.modal-close::before {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border: 1px solid hsl(var(--ink-c) / .35);
  border-radius: var(--radius);
  background: var(--paper);
  opacity: 0.9;
  transition: opacity var(--dur-2);
}
.modal-close .icon { position: relative; }
@media (hover: hover) {
  .modal-close:hover::before { opacity: 1; }
}
.modal-title {
  margin: 16px 0 0;
  padding: 0 8px;
  font: 400 28px/34px var(--serif);
  text-align: center;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.modal.is-sheet .modal-title { margin: 0 32px 0 0; padding: 0; text-align: left; font-size: 26px; line-height: 30px; }
.modal-body { margin-top: 21px; min-width: 0; }
.modal.is-sheet .modal-body { margin-top: 16px; }
.modal-handle { display: none; }
.modal-root.is-closing .modal-scrim { animation: fade-out 160ms ease both; }
.modal-root.is-closing .modal { animation: fade-out 120ms ease both; }
@media (max-width: 639.98px) {
  .modal-root { align-items: flex-end; padding: 0; }
  .modal, .modal[data-size] {
    width: calc(100% - 2px);
    max-width: none;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-bottom: 0;
    border-radius: 0;
    box-shadow: var(--shadow-sheet);
    padding-bottom: calc(16px + var(--safe-bottom));
    animation: sheet-up 280ms var(--ease-expo) both;
  }
  .modal.is-sheet { padding-top: 24px; }
  .modal.is-sheet .modal-handle {
    display: block;
    position: absolute;
    top: 8px;
    left: 50%;
    width: 36px;
    height: 4px;
    margin-left: -18px;
    border-radius: 2px;
    background: var(--elevated);
  }
  .modal-root.is-closing .modal { animation: sheet-down 200ms var(--ease-in-out) both; }
}

/* ----------------------------------------------------------------- toasts */
.toasts {
  position: fixed;
  top: calc(16px + var(--safe-top));
  right: calc(24px + var(--scrollbar-comp));
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
@media (max-width: 699.98px) {
  .toasts { left: 16px; right: 16px; width: auto; align-items: stretch; }
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  padding: 12px 10px 12px 14px;
  background: var(--paper);
  border: 1px solid hsl(var(--ink-c) / .6);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  pointer-events: auto;
  animation: toast-in var(--dur-3) var(--ease-expo) both;
}
@media (max-width: 699.98px) {
  .toast { max-width: none; }
}
.toast.is-leaving { animation: toast-out 180ms ease both; }
.toast-icon { flex: none; padding-top: 1px; color: var(--ink-2); display: inline-flex; }
.toast-ok .toast-icon { color: var(--up); }
.toast-error .toast-icon { color: var(--danger-ink); }
.toast-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.toast-msg { font: 500 14px/19px var(--font); color: var(--ink); overflow-wrap: anywhere; }
.toast-detail { font: 400 13px/18px var(--font); color: var(--muted); overflow-wrap: anywhere; }
.toast-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin-top: 4px;
  font: 500 10.5px/16px var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
.toast-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: background-color 150ms ease;
}
@media (hover: hover) {
  .toast-close:hover { background: var(--hover-wash); color: var(--ink); }
}
@media (max-width: 639.98px) {
  .toast-close { width: 40px; height: 40px; margin: -10px -8px -10px 0; }
  .toast-link { min-height: 40px; }
}

/* ----------------------------------------------------------- wallet modal */
.wallet-options { display: flex; flex-direction: column; gap: 8px; }
.wallet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--option-border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: 400 14px/24px var(--font);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-3), border-color var(--dur-3), opacity var(--dur-3);
}
@media (hover: hover) {
  .wallet-option:hover:not(:disabled) { background: var(--paper-2); border-color: var(--ink); box-shadow: var(--shadow-hard-sm); }
}
.wallet-option:disabled { opacity: 0.55; cursor: default; }
.wallet-option[aria-busy="true"] { opacity: 1; background: var(--hover-wash); }
.wallet-option-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: var(--paper-2);
  color: var(--ink-2);
}
.wallet-option-icon > img { width: 32px; height: 32px; object-fit: contain; }
.wallet-option-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-option-meta { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.wallet-option-meta .spinner { width: 14px; height: 14px; color: var(--ink-2); }
.wallet-empty {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  text-align: center;
}
.wallet-empty p { font: 400 14px/20px var(--font); color: var(--ink-2); }
.wallet-empty p + p { font-size: 13px; line-height: 18px; color: var(--muted); }
.wallet-empty .btn { margin-top: 6px; }
.wallet-error { margin-top: 12px; text-align: center; font-size: 13px; line-height: 18px; }
.wallet-help {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 20px;
  font: 400 14px/22px var(--font);
}
.wallet-foot {
  margin-top: 4px;
  font: 400 13px/20px var(--font);
  text-align: center;
  color: var(--muted);
}


/* phones, signed in: the account chip takes the wordmark's room */
@media (max-width: 639.98px) {
  .hdr.is-app:has(.acct-chip) .hdr-name { display: none; }
}
@media (max-width: 399.98px) {
  .acct-chip { gap: 6px; padding: 0 8px; }
  .acct-chip .acct-caret { display: none; }
}
