/* Keep list and recent-launch actions styled like the surrounding token text. */
.token-avatar-button, .token-name-button, .token-detail-link, #fresh-grid .face {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent !important;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
}
.token-avatar-button { display: block; border-radius: 14px; }
.token-name-button { text-align: left; }
.token-detail-link { text-decoration: underline; text-underline-offset: 3px; }
.token-name-button:hover, .token-detail-link:hover { text-decoration: underline; text-underline-offset: 3px; }
#fresh-grid .face { text-align: center; }
.avatar-test, .face-avatar-test, .td-avatar.is-test { background: transparent !important; border-color: transparent !important; }
.avatar-test img, .face-avatar-test img { object-fit: contain; }
.badge.test, .face-test { background: #f3e3be; color: #735627; border: 1px solid #d9be80; }
.face-test { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: 9px; line-height: 1.3; }

/* The coin detail dialog keeps the site's cream paper and editorial labels. */
.token-dialog {
  width: min(1040px, calc(100% - 32px));
  max-width: none;
  max-height: min(92dvh, 960px);
  padding: 0;
  margin: auto;
  overflow: auto;
  color: var(--fg);
  background: var(--paper);
  border: 1.5px solid var(--fg);
  border-radius: 9px;
  box-shadow: 8px 8px 0 #705f4660;
}
.token-dialog::backdrop { background: #28392f9c; backdrop-filter: blur(3px); }
.token-dialog, .token-dialog * { box-sizing: border-box; }
.token-dialog button, .token-dialog a { -webkit-tap-highlight-color: transparent; }
.token-dialog button:focus-visible, .token-dialog a:focus-visible { outline: 3px solid #307f9b; outline-offset: 3px; }
.td-shell { padding: clamp(20px, 4vw, 45px); }
.td-topline { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.td-kicker { display: flex; align-items: center; gap: 9px; margin: 0; font: 500 10px/1.5 var(--mono, monospace); text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted-fg); }
.td-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #76a641; }
.td-close { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 5px; color: var(--fg); background: var(--bg); cursor: pointer; transition: transform .18s, background .18s; }
.td-close:hover { background: var(--soft); transform: translateY(-2px); }
.td-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.td-heading { display: flex; align-items: center; gap: 18px; padding: 29px 0 27px; }
.td-avatar { width: 76px; height: 76px; flex: none; position: relative; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 16px; background: #e5d2a2; color: var(--fg); font: 600 32px/1 var(--serif); }
.td-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.td-heading-copy { min-width: 0; }
.td-heading h2 { margin: 0; font: 600 clamp(28px, 4vw, 43px)/1.1 var(--serif); letter-spacing: -.045em; overflow-wrap: anywhere; }
.td-subtitle { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0 0; color: var(--muted-fg); font-size: 11px; }
.td-symbol { display: inline-block; padding: 3px 7px; border: 1px solid var(--border); border-radius: 3px; color: var(--fg); font: 500 10px/1.3 var(--mono, monospace); }
.td-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--border); }
.td-metric { min-width: 0; padding: 22px 18px; border-right: 1px solid var(--border); }
.td-metric:first-child { padding-left: 0; }
.td-metric:last-child { padding-right: 0; border-right: 0; }
.td-label { display: block; margin-bottom: 10px; color: var(--muted-fg); font: 500 10px/1.4 var(--mono, monospace); letter-spacing: .03em; }
.td-value { display: block; color: var(--fg); font: 600 clamp(19px, 2.4vw, 26px)/1.12 var(--serif); letter-spacing: -.035em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.td-value small { font: 500 12px/1.4 var(--sans); letter-spacing: 0; color: var(--muted-fg); }
.td-positive { color: #477b3c; }.td-negative { color: #a94e40; }
.td-note { margin: 10px 0 0; color: var(--muted-fg); font-size: 11px; line-height: 1.65; }
.td-lower { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(230px, 1fr); gap: 32px; padding-top: 34px; }
.td-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; font: 600 18px/1.3 var(--serif); }
.td-section-title span { color: var(--muted-fg); font: 500 10px/1.4 var(--mono, monospace); }
.td-chart { min-height: 290px; overflow: hidden; background: var(--cream-panel, #f4e2b6); border: 1px solid var(--border); border-radius: 6px; }
.td-chart iframe { display: block; width: 100%; height: 340px; border: 0; background: #f4e2b6; }
.td-unavailable { min-height: 190px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 28px; text-align: center; }
.td-unavailable strong { font: 600 17px/1.3 var(--serif); }
.td-unavailable p { max-width: 260px; margin: 8px 0 0; color: var(--muted-fg); font-size: 11px; line-height: 1.7; }
.td-facts { margin: 0; border-top: 1px solid var(--border); }
.td-fact { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 11px; }
.td-fact dt { color: var(--muted-fg); }.td-fact dd { min-width: 0; margin: 0; overflow-wrap: anywhere; text-align: right; font-weight: 600; }
.td-fact a, .td-tx a { color: var(--fg); text-decoration: underline; text-decoration-color: #a4ae96; text-underline-offset: 3px; }
.td-fact a:hover, .td-tx a:hover { color: var(--peach); }
.td-mono { font-family: var(--mono, monospace); font-size: 10px; font-weight: 500; }
.td-activity { padding-top: 34px; }
.td-activity-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.td-tx-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.td-tx { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 11px; }
.td-tx-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.td-status-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #76a641; }
.td-status-dot.is-failed { background: #bd6751; }
.td-tx a { font-family: var(--mono, monospace); font-size: 10px; overflow-wrap: anywhere; }
.td-tx-time { color: var(--muted-fg); white-space: nowrap; }
.td-footnote { margin: 25px 0 0; font: 500 10px/1.6 var(--mono, monospace); color: var(--muted-fg); }
.td-state { min-height: 300px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 50px 0; }
.td-state h2 { margin: 0 0 8px; font: 600 clamp(25px, 4vw, 36px)/1.2 var(--serif); letter-spacing: -.035em; }
.td-state p { max-width: 460px; margin: 0 0 18px; color: var(--muted-fg); font-size: 13px; }
.td-retry { display: inline-flex; min-height: 38px; align-items: center; padding: 8px 15px; border: 1px solid var(--fg); border-radius: 4px; background: var(--soft); color: var(--fg); font: 600 11px var(--sans); cursor: pointer; }
.td-retry:hover { background: var(--cream-panel, #f4e2b6); }
.td-skeleton { width: 100%; border-radius: 5px; background: linear-gradient(90deg, #eedeb7, #f8edd4, #eedeb7); background-size: 200% 100%; animation: td-shimmer 1.8s linear infinite; }
.td-skeleton-title { height: 42px; max-width: 350px; margin-bottom: 28px; }
.td-skeleton-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; width: 100%; }
.td-skeleton-grid .td-skeleton { height: 82px; }
.td-skeleton-chart { height: 190px; margin-top: 35px; }
@keyframes td-shimmer { to { background-position: -200% 0; } }
@media (max-width: 760px) {
  .token-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 24px); box-shadow: 4px 4px 0 #705f4660; }
  .td-shell { padding: 18px; }
  .td-heading { padding: 23px 0; gap: 13px; }
  .td-avatar { width: 60px; height: 60px; border-radius: 12px; font-size: 26px; }
  .td-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-metric { padding: 18px 12px; }
  .td-metric:nth-child(2) { border-right: 0; }
  .td-metric:nth-child(3), .td-metric:nth-child(4) { border-top: 1px solid var(--border); }
  .td-metric:nth-child(3) { padding-left: 0; }
  .td-lower { grid-template-columns: 1fr; gap: 30px; padding-top: 28px; }
  .td-chart iframe { height: 290px; }
  .td-activity { padding-top: 30px; }
  .td-skeleton-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .td-skeleton { animation: none; }.td-close { transition: none; } }