:root {
  --bg: #08090c;
  --bg-card: #0f1117;
  --bg-elevated: #161922;
  --border: rgba(255, 255, 255, 0.06);
  --text: #eef0f4;
  --text-muted: #8b91a3;
  --text-dim: #555b6e;
  --accent: #3ecf6e;
  --paperhand: #ff6b7a;
  --fumble: #3ecf6e;
  --fumble-dim: rgba(62, 207, 110, 0.12);
  --fumble-border: rgba(62, 207, 110, 0.28);
  --roundtrip: #e8b84a;
  --gained: #34d399;
  --held: #a78bfa;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --font: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 50% -15%, rgba(62, 207, 110, 0.09), transparent 58%),
    radial-gradient(ellipse 40% 30% at 100% 80%, rgba(255, 107, 122, 0.04), transparent);
  z-index: 0;
}

.header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem 0;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.lang-switch {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  color: var(--bg);
  background: var(--accent);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
  background: rgba(62, 207, 110, 0.12);
  border: 1px solid rgba(62, 207, 110, 0.28);
}

.logo .accent {
  color: var(--accent);
}

.main {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 0.25rem 1rem 1.5rem;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}

.main.has-results {
  min-height: auto;
  justify-content: flex-start;
  padding-bottom: 1rem;
}

.main.is-loading {
  min-height: auto;
  justify-content: flex-start;
}

.main.is-loading .hero {
  flex: 0;
  padding: 0.35rem 0 0;
  justify-content: flex-start;
}

.main.is-loading .hero h1 {
  display: none;
}

.main.is-loading #loading {
  padding: 1rem 0 0.5rem;
  margin-top: 0;
}

.hero {
  text-align: center;
  padding: 2rem 0 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: padding 0.25s;
}

.main.has-results .hero {
  padding: 0;
  margin-bottom: 0.5rem;
  flex: 0;
}

.main.has-results .hero h1 {
  display: none;
}

.main.has-results .eyebrow {
  display: none;
}

.main.has-results .search-form {
  max-width: 100%;
}

.main.has-results .search-input-row {
  padding: 0.65rem 0.85rem;
}

.main.has-results .search-actions {
  padding: 0.45rem;
}

.main.has-results .results {
  margin-top: 0;
}

.eyebrow {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: clamp(1.65rem, 5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff 0%, #b8becf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  max-width: 420px;
}

.search-form {
  width: 100%;
  max-width: 500px;
}

.search-card {
  background: rgba(15, 17, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 16px 48px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-card:focus-within {
  border-color: rgba(62, 207, 110, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 0 0 3px rgba(62, 207, 110, 0.08),
    0 16px 48px rgba(0, 0, 0, 0.35);
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}

.search-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.55rem 0.55rem 0.65rem;
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  flex-shrink: 0;
}

#wallet-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-mono);
  min-width: 0;
}

#wallet-input::placeholder {
  color: var(--text-dim);
  font-family: var(--font);
}

.period-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.period-switch::-webkit-scrollbar {
  display: none;
}

.period-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}

.period-btn:hover {
  color: var(--text);
}

.period-btn.active {
  color: var(--accent);
  background: rgba(62, 207, 110, 0.12);
  box-shadow: inset 0 0 0 1px rgba(62, 207, 110, 0.22);
}

#check-btn {
  background: linear-gradient(180deg, #45d876 0%, #32c462 100%);
  color: #041208;
  border: none;
  border-radius: 999px;
  padding: 0.52rem 1.15rem;
  font-weight: 600;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(62, 207, 110, 0.22);
}

#check-btn:hover {
  opacity: 0.95;
  box-shadow: 0 6px 18px rgba(62, 207, 110, 0.28);
}

#check-btn:active {
  transform: scale(0.98);
}

.loading {
  text-align: center;
  padding: 1.25rem 0 0.5rem;
  color: var(--text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error {
  background: rgba(255, 107, 122, 0.06);
  border: 1px solid rgba(255, 107, 122, 0.2);
  color: #ff8a96;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

.loading-hint {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-top: 0.35rem;
}

.hidden {
  display: none !important;
}

.results {
  margin-top: 0.25rem;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.missed-hero {
  text-align: center;
  padding: 1.25rem 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--fumble-border);
  border-radius: var(--radius);
  background: var(--fumble-dim);
}

.missed-hero-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}

.missed-hero-value {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 700;
  color: var(--fumble);
  line-height: 1.1;
  margin-bottom: 0.65rem;
}

.missed-hero-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.missed-hero-foot code {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.recap-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.45rem 0.55rem;
  margin-bottom: 0.25rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.score-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--fumble-border);
  background: var(--fumble-dim);
  box-shadow: 0 0 0 3px rgba(62, 207, 110, 0.06);
}

.score-ring.paperhand {
  border-color: var(--fumble-border);
  background: var(--fumble-dim);
}

.score-ring.roundtrip {
  border-color: rgba(232, 184, 74, 0.35);
  background: rgba(232, 184, 74, 0.08);
  box-shadow: 0 0 0 3px rgba(232, 184, 74, 0.06);
}

.score-ring.gained {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.06);
}

.score-ring-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.score-ring.roundtrip .score-ring-num { color: var(--roundtrip); }
.score-ring.gained .score-ring-num { color: var(--gained); }
.score-ring.paperhand .score-ring-num { color: var(--fumble); }

.jeet-emoji {
  display: none;
}

.recap-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.recap-meta {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.recap-missed {
  text-align: right;
}

.recap-wallet {
  margin-bottom: 0.65rem;
}

.recap-wallet code {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.jeet-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.jeet-emoji {
  font-size: 1.1rem;
  line-height: 1;
}

.jeet-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  display: block;
}

.jeet-score {
  color: var(--text-muted);
  font-size: 0.68rem;
  display: block;
}

.jeet-score strong {
  color: var(--text);
  font-family: var(--font-mono);
}

.recap-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.missed-pill {
  text-align: right;
}

.missed-pill-label {
  display: block;
  font-size: 0.58rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.missed-pill-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fumble);
  display: block;
}

.recap-side {
  display: none;
}

.wallet-chip code {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.55rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--text);
  border-color: rgba(62, 207, 110, 0.35);
  background: rgba(62, 207, 110, 0.08);
}

.tab-count {
  color: var(--text-dim);
  font-size: 0.7rem;
  font-family: var(--font-mono);
}

.top-paperhands {
  margin-bottom: 0.55rem;
  overflow: hidden;
}

.top-ph-head {
  margin-bottom: 0.35rem;
}

.top-ph-title {
  font-size: 0.62rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.top-ph-scroll {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: thin;
  scrollbar-color: rgba(62, 207, 110, 0.45) transparent;
  cursor: grab;
}

.top-ph-scroll:active {
  cursor: grabbing;
}

.top-ph-scroll::-webkit-scrollbar {
  height: 5px;
  display: block;
}

.top-ph-scroll::-webkit-scrollbar-thumb {
  background: rgba(62, 207, 110, 0.35);
  border-radius: 999px;
}

.top-ph-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.top-ph-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem 0.35rem 0.35rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}

.top-ph-chip:hover {
  border-color: var(--fumble-border);
  background: var(--fumble-dim);
}

.top-ph-chip .token-avatar,
.top-ph-chip .token-avatar.sm {
  width: 24px;
  height: 24px;
  font-size: 0.65rem;
}

.top-ph-rank {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fumble-dim);
  color: var(--fumble);
  font-size: 0.58rem;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.top-ph-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.top-ph-symbol {
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.top-ph-missed {
  font-size: 0.68rem;
  color: var(--gained);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.top-ph-symbol {
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.top-ph-missed {
  font-size: 0.62rem;
  color: var(--fumble);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.ph-hero {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-bottom: 0.55rem;
  padding: 0.55rem 0.65rem;
  background: var(--fumble-dim);
  border: 1px solid var(--fumble-border);
  border-radius: var(--radius-xs);
}

.ph-hero-label {
  font-size: 0.58rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ph-hero-missed {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--fumble);
  line-height: 1.1;
}

.ph-hero-meta {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.trade-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

@media (min-width: 520px) {
  .trade-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trade-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.55rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  min-width: 0;
}

.trade-cell-fumbled {
  border-color: var(--fumble-border);
  background: var(--fumble-dim);
}

.trade-cell-label {
  font-size: 0.58rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.trade-cell-value {
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-mono);
  line-height: 1.25;
  word-break: break-word;
}

.trade-cell-fumbled .trade-cell-value {
  color: var(--fumble);
  font-size: 0.88rem;
}

.trade-cell-fumbled .trade-cell-sub {
  color: var(--text-muted);
}

.trade-cell-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  line-height: 1.3;
}

.data-warning {
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--roundtrip);
  margin-bottom: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(232, 184, 74, 0.22);
  background: rgba(232, 184, 74, 0.07);
}

.data-warning::before {
  content: "⚠ ";
  font-weight: 600;
}

.data-source {
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.token-card.token-highlight {
  animation: tokenPulse 1.4s ease;
}

@keyframes tokenPulse {
  0%, 100% { box-shadow: none; border-color: var(--fumble-border); }
  35% { box-shadow: 0 0 0 2px rgba(62, 207, 110, 0.25); border-color: rgba(62, 207, 110, 0.45); }
}

.token-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.token-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.token-card.paperhand-card,
.token-card.missed-card {
  border-color: var(--fumble-border);
}

.missed-card-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
}

.missed-card-info {
  flex: 1;
  min-width: 0;
}

.missed-card-amount {
  text-align: right;
  flex-shrink: 0;
}

.missed-card-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fumble);
}

.missed-card-meta {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 0.1rem;
}

.missed-line {
  font-size: 0.78rem;
  color: var(--paperhand);
  margin-bottom: 0.75rem;
  padding: 0.45rem 0.65rem;
  background: rgba(255, 107, 122, 0.06);
  border-radius: var(--radius-xs);
}

.card-body {
  padding: 0.65rem 0.75rem 0.75rem;
}

.token-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.token-identity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.token-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
  overflow: hidden;
}

.token-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.token-id-text {
  min-width: 0;
}

.token-name {
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: -0.01em;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.token-symbol {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.token-badge {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.token-badge.paperhand { color: var(--fumble); border-color: var(--fumble-border); }
.token-badge.roundtrip { color: var(--roundtrip); border-color: rgba(232, 184, 74, 0.22); }
.token-badge.gained { color: var(--gained); border-color: rgba(52, 211, 153, 0.22); }
.token-badge.held { color: var(--held); border-color: rgba(167, 139, 250, 0.22); }

.mcap-journey {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  padding: 0.45rem 0.55rem;
  background: rgba(255, 255, 255, 0.015);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}

.mcap-step {
  text-align: center;
  flex: 1;
  min-width: 0;
}

.mcap-step-label {
  font-size: 0.5rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
}

.mcap-step-value {
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
  display: block;
}

.mcap-step-value.buy { color: var(--gained); }
.mcap-step-value.sell { color: var(--roundtrip); }
.mcap-step-value.ath { color: var(--fumble); }

.mcap-arrow {
  color: var(--text-dim);
  font-size: 0.65rem;
  flex-shrink: 0;
}

.token-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.45rem;
}

.metric {
  display: flex;
  flex-direction: column;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}

.metric-label {
  font-size: 0.58rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-value {
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 0.15rem;
  font-family: var(--font-mono);
}

.metric-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 0.08rem;
}

.metric-value.positive { color: var(--gained); }
.metric-value.negative { color: var(--paperhand); }

.token-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}

.token-link {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}

.token-link:hover {
  color: var(--accent);
  border-color: rgba(62, 207, 110, 0.3);
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.empty-state h3 {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0.75rem 1rem 1rem;
  color: var(--text-dim);
  font-size: 0.7rem;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.social-link:hover {
  color: #2aabee;
  border-color: rgba(42, 171, 238, 0.35);
  background: rgba(42, 171, 238, 0.08);
}

.social-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.social-label {
  line-height: 1;
}

.jeet-badge.paperhand .jeet-label { color: var(--fumble); }
.jeet-badge.roundtrip .jeet-label { color: var(--roundtrip); }
.jeet-badge.gained .jeet-label { color: var(--gained); }
.jeet-badge.held .jeet-label { color: var(--held); }

@media (max-width: 640px) {
  .header { padding: 0.75rem 1rem 0; }
  .search-actions {
    flex-direction: column;
    align-items: stretch;
    padding: 0.55rem;
  }
  .period-switch {
    width: 100%;
  }
  #check-btn {
    width: 100%;
    padding: 0.62rem 1rem;
  }
  .recap-bar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "left missed"
      "share share";
  }
  .recap-left { grid-area: left; }
  .recap-missed { grid-area: missed; }
  .share-btn { grid-area: share; width: 100%; }
  .trade-grid {
    grid-template-columns: 1fr 1fr;
  }
  .trade-cell:nth-child(3),
  .trade-cell:nth-child(4) {
    grid-column: span 1;
  }
}

.recap-actions {
  display: none;
}

.share-btn {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(62, 207, 110, 0.35);
  background: rgba(62, 207, 110, 0.1);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.share-btn:hover {
  background: rgba(62, 207, 110, 0.16);
  border-color: rgba(62, 207, 110, 0.5);
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.share-modal.hidden {
  display: none;
}

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.share-modal-card {
  position: relative;
  width: min(100%, 440px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.share-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.share-modal-head h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.share-modal-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}

.share-preview {
  margin: 0 0 0.75rem;
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #08090c;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-img {
  display: block;
  width: 100%;
  height: auto;
}

.share-loading {
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 2rem;
}

.share-modal-actions {
  display: flex;
  gap: 0.5rem;
}

.share-copy-btn,
.share-native-btn {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
}

.share-copy-btn {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.share-native-btn {
  background: transparent;
  color: var(--text);
}

.share-toast {
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
  color: var(--gained);
  text-align: center;
}

.share-toast.hidden {
  display: none;
}
