/* ══════════════════════════════════════════════════════════════════
   AgenticMarket.jp.ai — page-specific styles
   Built on top of tokens.css. Card/stats/tab patterns are carried over
   from timepersonajp/public/market.html & tasks.html (proven components),
   plus new home-page hero/entry/strip patterns for this product shell.
   ══════════════════════════════════════════════════════════════════ */

/* ── Hero (home) ──────────────────────────────────────────── */
.tp-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-10) var(--sp-8);
  margin-bottom: var(--sp-8);
  position: relative;
  overflow: hidden;
}
.tp-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: var(--r-sm);
  margin-bottom: var(--sp-5);
}
.tp-hero__title {
  font-size: var(--fs-3xl); font-weight: 800; line-height: 1.25; letter-spacing: -0.02em;
  color: var(--text); margin-bottom: var(--sp-5); max-width: 700px;
}
.tp-hero__title em { font-style: normal; color: var(--brand); }
.tp-hero__sub { font-size: var(--fs-md); color: var(--text-muted); line-height: var(--lh-loose); max-width: 620px; margin-bottom: var(--sp-6); }
.tp-hero__cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.tp-hero__stat { display: inline-flex; align-items: baseline; gap: 6px; color: var(--text-muted); font-size: var(--fs-sm); }
.tp-hero__stat-num { font-size: var(--fs-xl); font-weight: 800; color: var(--brand); letter-spacing: -0.02em; font-family: var(--font-mono); }
.tp-hero__api {
  display: inline-block;
  margin-top: var(--sp-2);
  padding: 4px 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ── Skill purchase — dynamic input form (same pattern as timepersonajp market.html) ── */
.tp-input-field { width: 100%; margin-bottom: var(--sp-3); }
.tp-input-field label {
  display: block; font-size: var(--fs-xs); font-weight: 700;
  color: var(--text-muted); margin-bottom: var(--sp-1);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.tp-input-field textarea, .tp-input-field input {
  width: 100%; box-sizing: border-box;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  font-size: var(--fs-sm);
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  resize: vertical;
  transition: border-color 0.15s;
}
.tp-input-field textarea:focus, .tp-input-field input:focus { outline: none; border-color: var(--brand); }
@media (max-width: 640px) { .tp-hero { padding: var(--sp-6) var(--sp-5); } .tp-hero__title { font-size: 24px; } }

/* ── Entry cards (Market / Tasks — the two doors) ───────────── */
.am-entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); margin-bottom: var(--sp-10); }
@media (max-width: 680px) { .am-entry-grid { grid-template-columns: 1fr; } }
.am-entry-card {
  display: block; text-decoration: none; padding: var(--sp-6);
  border: 1.5px solid var(--border); border-radius: var(--r-lg); background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.am-entry-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); transform: translateY(-2px); text-decoration: none; }
.am-entry-card__icon { font-size: 28px; margin-bottom: var(--sp-3); }
.am-entry-card__title { font-size: var(--fs-xl); font-weight: 800; color: var(--text); margin-bottom: 4px; }
.am-entry-card__tag { font-size: var(--fs-sm); font-weight: 600; color: var(--brand); margin-bottom: var(--sp-3); }
.am-entry-card__desc { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.7; }
.am-entry-card__arrow { margin-top: var(--sp-4); font-size: var(--fs-sm); font-weight: 700; color: var(--brand); }

/* ── Horizontal strip (featured skills / open tasks on home) ── */
.am-strip { display: flex; gap: var(--sp-3); overflow-x: auto; padding: 2px 2px var(--sp-2); scroll-snap-type: x proximity; }
.am-strip::-webkit-scrollbar { height: 6px; }
.am-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.am-mini-card {
  flex: 0 0 240px; scroll-snap-align: start; padding: var(--sp-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  transition: border-color 0.15s, transform 0.15s; cursor: pointer; text-decoration: none; display: block; color: inherit;
}
.am-mini-card:hover { border-color: var(--border-strong); transform: translateY(-2px); text-decoration: none; }
.am-mini-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.am-mini-card__name { font-size: var(--fs-sm); font-weight: 700; color: var(--text); line-height: 1.4; }
.am-mini-card__price { font-size: var(--fs-base); font-weight: 800; color: var(--brand); font-family: var(--font-mono); white-space: nowrap; flex-shrink: 0; }
.am-mini-card__desc { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.6; margin-bottom: var(--sp-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.am-mini-card__foot { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-xs); color: var(--text-muted); }

/* ── Preview ribbon ──────────────────────────────────────────── */
.am-preview-badge {
  position: fixed; bottom: 16px; left: 16px; z-index: 999;
  background: var(--text); color: #fff; font-size: 11px; font-weight: 600;
  padding: 5px 12px; border-radius: var(--r-pill); font-family: var(--font-mono);
  opacity: 0.88; letter-spacing: 0.02em; box-shadow: var(--shadow-md);
}

/* ── Skill card (Market grid) ─────────────────────────────────── */
.tp-skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-4); margin-top: var(--sp-4); }
.tp-skill-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  display: flex; flex-direction: column;
}
.tp-skill-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.tp-skill-card__header { background: var(--brand); color: #fff; padding: var(--sp-4) var(--sp-5); display: flex; align-items: center; gap: var(--sp-3); }
.tp-skill-card__avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.tp-skill-card__agent-info { flex: 1; min-width: 0; }
.tp-skill-card__agent-name { font-size: var(--fs-sm); font-weight: 700; }
.tp-skill-card__agent-handle { font-size: var(--fs-xs); opacity: 0.8; margin-top: 2px; }
.tp-skill-card__price { text-align: right; flex-shrink: 0; }
.tp-skill-card__price-num { font-size: 22px; font-weight: 800; line-height: 1; }
.tp-skill-card__price-unit { font-size: 10px; opacity: 0.8; }
.tp-skill-card__body { padding: var(--sp-4) var(--sp-5); flex: 1; display: flex; flex-direction: column; gap: var(--sp-3); }
.tp-skill-card__name { font-size: var(--fs-base); font-weight: 700; color: var(--text); }
.tp-skill-card__tagline { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.5; }
.tp-skill-card__meta { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.tp-skill-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: var(--surface-raised); color: var(--text-muted); }
.tp-skill-tag--cat { background: #eeeeff; color: var(--brand); }
.tp-skill-card__footer { padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: var(--surface); }
.tp-skill-stats { display: flex; gap: var(--sp-4); }
.tp-skill-stat { font-size: var(--fs-xs); color: var(--text-muted); }
.tp-skill-stat strong { color: var(--text); }

/* ── Skill detail modal extras ─────────────────────────────────── */
.tp-skill-detail__price-box {
  background: var(--brand); color: #fff; border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5);
  display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4);
}
.tp-skill-detail__price-label { font-size: var(--fs-sm); opacity: 0.85; }
.tp-skill-detail__price-num   { font-size: 28px; font-weight: 800; }
.tp-schema-box { background: var(--surface-alt); border-radius: var(--r-md); padding: var(--sp-4); font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
.tp-schema-box dt { font-weight: 700; color: var(--text); margin-top: var(--sp-2); }
.tp-schema-box dt:first-child { margin-top: 0; }
.tp-schema-box dd { color: var(--text-muted); margin: 2px 0 0 0; line-height: 1.6; }

/* ── Market filter row ────────────────────────────────────────── */
.tp-market-filter { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-4); align-items: center; }
.tp-market-search {
  flex: 1; min-width: 180px; border: 1.5px solid var(--border); border-radius: var(--r-md);
  padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); font-family: inherit; background: var(--surface); color: var(--text);
}
.tp-market-search:focus { outline: none; border-color: var(--brand); }
.tp-filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tp-filter-btn {
  padding: 6px 14px; font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.tp-filter-btn:hover { border-color: var(--border-strong); color: var(--text); }
.tp-filter-btn.is-active { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand); }

/* ── Stats bar (Tasks page + reused on home) ─────────────────── */
.tp-stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); margin-bottom: var(--sp-6); }
@media (max-width: 640px) { .tp-stats-bar { grid-template-columns: 1fr 1fr; } }
.tp-stat-cell { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-4); }
.tp-stat-cell__label { font-size: var(--fs-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.tp-stat-cell__value { font-size: var(--fs-xl); font-weight: 800; color: var(--text); font-family: var(--font-mono); letter-spacing: -0.02em; }

/* ── Tabs (sticky) ────────────────────────────────────────────── */
.tp-tasks-tabbar { position: sticky; top: 56px; z-index: 40; background: var(--bg); padding: var(--sp-3) 0 var(--sp-4); margin-bottom: var(--sp-4); border-bottom: 1px solid var(--border); }
.tp-tasks-tabbar .tp-filter-row { margin-bottom: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tp-tasks-tabbar .tp-filter-row::-webkit-scrollbar { display: none; }
.tp-tasks-tabbar .tp-filter-btn { white-space: nowrap; flex-shrink: 0; }

/* ── Task card ────────────────────────────────────────────────── */
.tp-task-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-5); transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; margin-bottom: var(--sp-3);
}
.tp-task-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.tp-task-card__head { display: flex; align-items: center; gap: var(--sp-2); justify-content: space-between; margin-bottom: var(--sp-3); flex-wrap: wrap; }
.tp-task-card__title { font-size: var(--fs-md); font-weight: 700; color: var(--text); line-height: 1.4; }
.tp-task-card__bounty { font-family: var(--font-mono); font-size: var(--fs-xl); font-weight: 800; color: var(--text); letter-spacing: -0.01em; white-space: nowrap; }
.tp-task-card__bounty small { font-size: 11px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.02em; }
.tp-task-card__content {
  font-size: var(--fs-sm); color: var(--text-muted); line-height: var(--lh-loose); margin-bottom: var(--sp-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tp-task-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; padding-top: var(--sp-3); border-top: 1px solid var(--border); margin-top: var(--sp-3); }
.tp-task-card__foot-left { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-xs); color: var(--text-muted); }

/* Richer TimePersona-parity task card pieces (author row, task banner pill, share
   button, clamped description) — shared by tasks.html's full list and index.html's
   homepage preview strip, so they live here once instead of being copy-pasted into
   each page's own <style> block (moved out of tasks.html, which used to define these
   itself — see AgenticMarket_UI_Plan_v0.1.md §17). */
.tp-task-card__author { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.tp-task-card__author-info { min-width: 0; }
.tp-task-card__name { font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.tp-task-card__sub  { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 1px; }

/* Values copied from timepersonajp/public/design/components.css's .tp-task-banner —
   AgenticMarket's earlier port (§14) dropped the padding/background/border, leaving a
   flat row of inline badges instead of TimePersona's boxed banner. That's the "第一排の
   icon が一行になった" messiness the user flagged after comparing screenshots side by
   side: this box is what visually separates/contains the TASK+bounty+status badges. */
.tp-task-banner {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  padding: 10px var(--sp-4); background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--r-sm); margin-bottom: var(--sp-3); font-size: var(--fs-sm);
}
.tp-task-banner__bounty { font-weight: 700; color: var(--text); font-family: var(--font-mono); }
.tp-task-banner__sep { width: 1px; height: 14px; background: var(--border-strong); }

.tp-task-deadlines { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-3); font-size: var(--fs-xs); color: var(--text-muted); }
.tp-task-executor {
  padding: 10px var(--sp-4); background: var(--success-soft); border-left: 3px solid var(--success);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: var(--fs-sm); color: var(--success); margin-bottom: var(--sp-3);
}

.tp-task-share-btn {
  padding: 5px 9px; border-radius: var(--r-pill); background: transparent; color: var(--text-muted);
  font-size: 14px; border: 1px solid var(--border); cursor: pointer; transition: background 0.15s, color 0.15s;
}
.tp-task-share-btn:hover { background: var(--surface-alt); color: var(--text); }

.tp-hidden-desc { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.tp-flow-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; border-radius: 12px; padding: 2px 9px; border: 1px solid; white-space: nowrap; }
.tp-flow-badge--aa { background:#f3f4f6; color:#6b7280; border-color:#e5e7eb; }
.tp-flow-badge--ha { background:#dbeafe; color:#1d4ed8; border-color:#93c5fd; }
.tp-flow-badge--ah { background:#fef3c7; color:#92400e; border-color:#fde68a; }

.tp-task-apply {
  padding: 7px 16px; border-radius: 20px; background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 700; border: none; cursor: pointer; transition: opacity 0.15s;
}
.tp-task-apply:hover { opacity: 0.85; }
.tp-task-apply:disabled { background: var(--border); color: var(--text-muted); cursor: default; }

/* ── Agents strip (featured agents on home) ─────────────────── */
.tp-agents-strip { display: flex; gap: var(--sp-3); overflow-x: auto; padding: 2px 2px var(--sp-2); scroll-snap-type: x proximity; }
.tp-agents-strip::-webkit-scrollbar { height: 6px; }
.tp-agents-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.tp-agent-chip {
  flex: 0 0 190px; padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); scroll-snap-align: start; transition: border-color 0.15s, transform 0.15s;
  cursor: pointer; text-decoration: none; display: block; color: inherit;
}
.tp-agent-chip:hover { border-color: var(--border-strong); transform: translateY(-2px); text-decoration: none; }
.tp-agent-chip__name { font-weight: 700; font-size: var(--fs-sm); color: var(--text); margin-bottom: 2px; }
.tp-agent-chip__ens  { font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: var(--sp-2); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-agent-chip__meta { display: flex; flex-direction: column; gap: 4px; }

/* ── Infra service directory ─────────────────────────────────── */
.tp-service-section { margin-top: var(--sp-12); border-top: 1px solid var(--border); padding-top: var(--sp-8); }
.tp-service-section__head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.tp-service-section__title { font-size: var(--fs-xl); font-weight: 800; color: var(--text); }
.tp-service-section__badge { font-size: var(--fs-xs); font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.tp-service-section__sub { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--sp-4); line-height: 1.6; }
.tp-service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-4); }
.tp-svc-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.tp-svc-card:hover { border-color: #43a047; box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.tp-svc-card__header { background: linear-gradient(135deg, #388e3c, #1b5e20); color: #fff; padding: var(--sp-3) var(--sp-4); display: flex; align-items: center; gap: var(--sp-3); }
.tp-svc-card__header-icon { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.tp-svc-card__header-info { flex: 1; min-width: 0; }
.tp-svc-card__cat { font-size: 11px; font-weight: 700; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.06em; }
.tp-svc-card__owner { font-size: 11px; opacity: 0.7; margin-top: 1px; }
.tp-svc-card__free-badge { background: rgba(255,255,255,0.2); font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; flex-shrink: 0; }
.tp-svc-card__body { padding: var(--sp-4); flex: 1; display: flex; flex-direction: column; gap: var(--sp-3); }
.tp-svc-card__title { font-size: var(--fs-base); font-weight: 700; color: var(--text); line-height: 1.4; }
.tp-svc-card__desc { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.6; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tp-svc-card__tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tp-svc-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: #e8f5e9; color: #2e7d32; }
.tp-svc-card__footer { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.tp-svc-btn { font-size: var(--fs-xs); font-weight: 600; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); border: 1.5px solid; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; transition: background 0.15s, color 0.15s; }
.tp-svc-btn--primary { background: #388e3c; color: #fff; border-color: #388e3c; }
.tp-svc-btn--primary:hover { background: #2e7d32; border-color: #2e7d32; }
.tp-svc-btn--secondary { background: transparent; color: var(--text-muted); border-color: var(--border); }
.tp-svc-btn--secondary:hover { border-color: #43a047; color: #388e3c; }

/* ── Wallet page ──────────────────────────────────────────────── */
.tp-wallet-card { background: var(--text); color: #fff; border-radius: var(--r-lg); padding: var(--sp-8); margin-bottom: var(--sp-6); position: relative; overflow: hidden; }
.tp-wallet-card__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-5); font-size: var(--fs-sm); color: rgba(255,255,255,0.7); }
.tp-wallet-card__status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; background: rgba(255,255,255,0.12); border-radius: var(--r-pill); font-size: var(--fs-xs); }
.tp-wallet-card__status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; }
.tp-wallet-card__ens { font-size: var(--fs-xl); font-weight: 700; margin-bottom: var(--sp-6); font-family: var(--font-mono); word-break: break-all; }
.tp-wallet-card__balances { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid rgba(255,255,255,0.1); }
.tp-wallet-card__bal-label { font-size: var(--fs-xs); color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.tp-wallet-card__bal-value { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; }
.tp-wallet-card__addr { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); color: rgba(255,255,255,0.6); }
.tp-wallet-card__addr code { flex: 1; font-family: var(--font-mono); word-break: break-all; color: rgba(255,255,255,0.85); }
.tp-wallet-card__copy { flex-shrink: 0; padding: 4px 10px; background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.15); border-radius: var(--r-sm); font-size: var(--fs-xs); cursor: pointer; font-family: inherit; }
.tp-wallet-card__copy:hover { background: rgba(255,255,255,0.2); }
@media (max-width: 560px) { .tp-wallet-card__balances { grid-template-columns: 1fr; gap: var(--sp-4); } }
.tp-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.tp-action-btn { padding: var(--sp-5) var(--sp-4); text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; font-family: inherit; transition: border-color 0.15s, background 0.15s; }
.tp-action-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.tp-action-btn__glyph { font-size: 22px; display: block; margin-bottom: 6px; color: var(--text-muted); font-weight: 700; }
.tp-action-btn__label { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.tp-tx-item { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.tp-tx-item:last-child { border-bottom: none; }
.tp-tx-item__label { font-weight: 600; font-size: var(--fs-sm); }
.tp-tx-item__addr { font-size: var(--fs-xs); color: var(--text-muted); font-family: var(--font-mono); }
.tp-tx-item__amt { font-size: var(--fs-md); font-weight: 700; font-family: var(--font-mono); }
.tp-tx-item__amt.is-pos { color: var(--success); }
.tp-tx-item__amt.is-neg { color: var(--danger); }

/* ── Live Trade Ticker (Market) ──────────────────────────────── */
.tp-live-ticker { border: 1.5px solid var(--border); border-radius: var(--r-lg); margin-bottom: var(--sp-4); overflow: hidden; background: var(--surface); }
.tp-live-ticker__bar { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-4); cursor: pointer; user-select: none; background: var(--surface); border-bottom: 1px solid transparent; transition: background 0.15s; }
.tp-live-ticker__bar:hover { background: var(--surface-raised); }
.tp-live-ticker__bar.is-open { border-bottom-color: var(--border); }
.tp-live-ticker__dot { width: 7px; height: 7px; background: #22c55e; border-radius: 50%; flex-shrink: 0; animation: tp-pulse 2s infinite; }
@keyframes tp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.tp-live-ticker__label { font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; }
.tp-live-ticker__scroll { flex: 1; overflow: hidden; white-space: nowrap; font-size: var(--fs-xs); color: var(--text-muted); min-width: 0; }
.tp-live-ticker__scroll-inner { display: inline-block; animation: tp-scroll 30s linear infinite; }
@keyframes tp-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.tp-live-ticker__toggle { font-size: var(--fs-xs); color: var(--text-muted); flex-shrink: 0; }
.tp-live-ticker__list { display: none; max-height: 280px; overflow-y: auto; padding: var(--sp-2) 0; }
.tp-live-ticker__list.is-open { display: block; }
.tp-live-ticker__item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-4); font-size: var(--fs-xs); border-bottom: 1px solid var(--border); transition: background 0.1s; }
.tp-live-ticker__item:last-child { border-bottom: none; }
.tp-live-ticker__item:hover { background: var(--surface-raised); }
.tp-live-ticker__status { font-size: 14px; flex-shrink: 0; width: 18px; text-align: center; }
.tp-live-ticker__info { flex: 1; min-width: 0; }
.tp-live-ticker__name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-live-ticker__meta { color: var(--text-muted); margin-top: 1px; }
.tp-live-ticker__amount { font-weight: 700; color: var(--brand); flex-shrink: 0; }

/* ── Agent list (row-per-agent, low-key utility page) ──────────── */
.al-list { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.al-row { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.al-row:last-child { border-bottom: none; }
.al-row:hover { background: var(--surface-alt); }
.al-row__main { flex: 1; min-width: 220px; }
.al-row__name-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.al-row__name { font-weight: 700; font-size: var(--fs-sm); color: var(--text); }
.al-row__ens { font-size: var(--fs-xs); color: var(--text-muted); font-family: var(--font-mono); }
/* Two lines, not one: this line now carries the agent's self-description as a
   fallback when they have no skill tagline yet (newly registered agents in 最新登録),
   and a description clipped to a single line reads as truncated noise. */
.al-row__tagline {
  font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.5; max-width: 460px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.al-row__tagline.is-empty { font-style: italic; color: var(--text-subtle); }
.al-row__stats { display: flex; gap: var(--sp-5); flex-shrink: 0; }
.al-stat { text-align: center; min-width: 48px; }
.al-stat__num { font-size: var(--fs-sm); font-weight: 700; color: var(--text); font-family: var(--font-mono); }
.al-stat__label { font-size: 10px; color: var(--text-muted); }
.al-row__actions { flex-shrink: 0; display: flex; gap: 6px; }

/* ── Loading spinner (was referenced everywhere but never defined) ── */
.tp-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 96px; padding: var(--sp-6);
}
.tp-loading::after {
  content: '';
  width: 26px; height: 26px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: tp-spin 0.7s linear infinite;
}
@keyframes tp-spin { to { transform: rotate(360deg); } }

/* ── FAB ──────────────────────────────────────────────────────── */
.tp-fab {
  position: fixed; bottom: calc(var(--bottom-nav-h) + 16px); right: 20px; width: 52px; height: 52px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 26px; border: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(58,58,164,0.35); display: flex; align-items: center; justify-content: center; z-index: 200; transition: transform 0.15s;
}
.tp-fab:hover { transform: scale(1.08); }
@media (min-width: 720px) { .tp-fab { bottom: 24px; } }
