/* JustHood.fun — style.css */

:root {
  --cream:        #F3F0E6;
  --cream-deep:   #EAE6D8;
  --ink:          #1B1B17;
  --ink-soft:     #56554E;
  --muted:        #8B8A80;
  --lime:         #C9F53B;
  --lime-soft:    #E7FBA4;
  --lavender:     #DCD5F7;
  --white:        #FDFCF8;
  --red:          #E4572E;

  --r-pill: 999px;
  --r-card: 28px;
  --r-tile: 18px;
  --shadow-hard: 4px 5px 0 var(--ink);
  --shadow-hard-sm: 3px 3px 0 var(--ink);
  --border: 2px solid var(--ink);

  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --w: min(1120px, calc(100% - 48px));
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero h1 .line, .marker { opacity: 1 !important; transform: none !important; background-size: 100% 100% !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

.wrap { width: var(--w); margin-inline: auto; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  border-bottom: var(--border);
}
.nav .wrap { width: 100%; max-width: none; padding: 0 28px; }
.nav-inner { display: flex; align-items: center; gap: 24px; padding: 14px 0; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.05rem;
  text-decoration: none; letter-spacing: -0.01em;
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px;
  background: var(--ink); color: var(--lime);
  display: grid; place-items: center;
  font-size: .95rem; font-weight: 700;
}
.brand .tld { color: var(--muted); font-weight: 500; font-family: var(--font-body); }

.nav-links { display: flex; gap: 22px; margin-left: auto; list-style: none; padding: 0; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--ink-soft); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px;
  border: var(--border); border-radius: var(--r-pill);
  font-weight: 700; font-size: 1rem; text-decoration: none;
  background: var(--white); color: var(--ink);
  box-shadow: var(--shadow-hard-sm);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-lime { background: var(--lime); }
.btn-lav  { background: var(--lavender); }
.btn-ink  { background: var(--ink); color: var(--lime); }
.btn-sm { padding: 10px 18px; font-size: .9rem; }
.btn-wide { width: 100%; }

/* ============ HERO ============ */
.hero { padding: 84px 0 48px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.1rem, 4.8vw, 3.6rem);
  line-height: 1.12; letter-spacing: -0.01em;
  margin: 0 0 22px;
}
.hero h1 .line {
  display: block;
  opacity: 0;
  transform: translateY(26px);
  animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards;
}
.hero h1 .line:nth-child(2) { animation-delay: .18s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.marker {
  background-image: linear-gradient(transparent 62%, var(--lime) 62%, var(--lime) 96%, transparent 96%);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  animation: sweep .55s ease-out .85s forwards;
  padding: 0 .06em;
}
@keyframes sweep { to { background-size: 100% 100%; } }

.hero p.lede { color: var(--ink-soft); font-size: 1.15rem; max-width: 34rem; margin: 0 0 28px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* ============ HERO TOKEN CARDS ============ */
.card-fan { position: relative; min-height: 380px; }
.tok-card {
  position: absolute; width: min(320px, 100%);
  background: var(--white); border: var(--border); border-radius: var(--r-card);
  padding: 20px 22px; box-shadow: var(--shadow-hard);
}
.tok-card.c1 { top: 0; right: 8%; transform: rotate(3deg); background: var(--lavender); }
.tok-card.c2 { top: 120px; right: 24%; transform: rotate(-4deg); z-index: 2; }
.tok-card.c3 { top: 248px; right: 2%; transform: rotate(2deg); background: var(--lime-soft); }

.tok-row { display: flex; align-items: center; gap: 14px; }
.tok-ava {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--ink); color: var(--lime);
  display: grid; place-items: center;
  font-weight: 700; font-size: .95rem; flex: none;
  overflow: hidden;
}
.tok-ava.lav { color: var(--lavender); }
.tok-ava img { width: 100%; height: 100%; object-fit: cover; }
.tok-name { font-weight: 700; line-height: 1.2; }
.tok-meta { color: var(--ink-soft); font-size: .85rem; }
.tok-price { margin-left: auto; text-align: right; }
.tok-price .p { font-family: var(--font-body); font-weight: 700; font-size: 1.15rem; }
.tok-price .chg { font-size: .85rem; font-weight: 700; }
.chg.up { color: #3F7D20; }
.chg.down { color: var(--red); }
.badge-live {
  position: absolute; top: -14px; left: 22px;
  padding: 4px 14px; border: var(--border); border-radius: var(--r-pill);
  background: var(--lime); font-size: .75rem; font-weight: 700;
  letter-spacing: .06em;
}

/* ============ TICKER ============ */
.ticker {
  border-top: var(--border); border-bottom: var(--border);
  background: var(--lime); overflow: hidden; white-space: nowrap;
  padding: 12px 0; font-weight: 700; font-size: .95rem;
}
.ticker-track { display: inline-block; animation: slide 28s linear infinite; }
.ticker-track span { margin-right: 42px; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============ SECTIONS ============ */
.section { padding: 84px 0; }
.section-head { max-width: 42rem; margin-bottom: 44px; }
.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft);
}
.section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  letter-spacing: -0.01em; line-height: 1.2; margin: 12px 0 10px;
}
.section .sub { color: var(--ink-soft); margin: 0; }

/* ============ STEPS ============ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  background: var(--white); border: var(--border); border-radius: var(--r-card);
  padding: 28px; box-shadow: var(--shadow-hard-sm);
}
.step:nth-child(2) { background: var(--lavender); }
.step:nth-child(3) { background: var(--lime-soft); }
.step-n {
  width: 46px; height: 46px; border-radius: 15px;
  border: var(--border); background: var(--lime);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  margin-bottom: 18px;
}
.step:nth-child(2) .step-n { background: var(--white); }
.step h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.25rem; margin: 0 0 8px; }
.step p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

/* ============ TOKEN GRID ============ */
.tok-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.g-card {
  background: var(--white); border: var(--border); border-radius: var(--r-card);
  padding: 22px; box-shadow: var(--shadow-hard-sm);
  display: flex; flex-direction: column; gap: 16px;
  transition: transform .12s ease;
}
.g-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard); }
.prog {
  height: 12px; border: 2px solid var(--ink); border-radius: var(--r-pill);
  background: var(--cream-deep); overflow: hidden;
}
.prog > i { display: block; height: 100%; background: var(--lime); }
.g-foot { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: .85rem; }

/* ============ CTA STRIP ============ */
.cta-strip {
  background: var(--ink); color: var(--cream);
  border-radius: var(--r-card); border: var(--border);
  padding: 56px 48px; text-align: center;
  box-shadow: var(--shadow-hard);
}
.cta-strip h2 { color: var(--white); margin-top: 0; }
.cta-strip .hl { color: var(--lime); }
.cta-strip p { color: #B9B8AE; max-width: 34rem; margin: 8px auto 28px; }

/* ============ FAQ ============ */
.faq { max-width: 46rem; }
.faq details {
  border: var(--border); border-radius: var(--r-tile);
  background: var(--white); margin-bottom: 14px; overflow: hidden;
}
.faq summary {
  padding: 18px 22px; font-weight: 700; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-body); font-size: 1.3rem; font-weight: 700; }
.faq details[open] summary::after { content: "x"; font-size: 1rem; }
.faq details[open] { background: var(--lavender); }
.faq .a { padding: 0 22px 20px; color: var(--ink-soft); }

/* ============ FOOTER ============ */
footer {
  border-top: var(--border); background: var(--cream-deep);
  padding: 44px 0 30px; margin-top: 40px;
}
footer .wrap { width: 100%; max-width: none; padding: 0 28px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.foot-links { display: flex; gap: 26px; list-style: none; padding: 0; margin: 0; }
.foot-links a { text-decoration: none; font-weight: 600; font-size: .93rem; color: var(--ink-soft); }
.foot-links a:hover { color: var(--ink); }
.foot-note { color: var(--muted); font-size: .84rem; margin-top: 26px; }

/* ============ LAUNCH PAGE ============ */
.launch-grid { display: grid; grid-template-columns: 1fr .9fr; gap: 44px; align-items: start; }
.form-card {
  background: var(--white); border: var(--border); border-radius: var(--r-card);
  padding: 30px; box-shadow: var(--shadow-hard-sm);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 8px; }
.field .hint { font-weight: 500; color: var(--muted); font-size: .8rem; margin-left: 6px; }
.field input, .field textarea {
  width: 100%; padding: 13px 16px;
  border: var(--border); border-radius: var(--r-tile);
  background: var(--cream); font: inherit; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--lime); outline-offset: 0; }
.field .err { color: var(--red); font-size: .82rem; font-weight: 600; margin-top: 6px; min-height: 1em; }

.logo-row { display: flex; gap: 18px; align-items: flex-start; }
.logo-drop {
  width: 112px; height: 112px; flex: none;
  border: 2px dashed var(--muted); border-radius: var(--r-tile);
  background: var(--cream);
  display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: .75rem; line-height: 1.4;
  cursor: pointer; overflow: hidden; padding: 8px;
  transition: border-color .12s ease;
}
.logo-drop:hover { border-color: var(--ink); color: var(--ink-soft); }
.logo-drop.has-img { border-style: solid; border-color: var(--ink); padding: 0; }
.logo-drop img { width: 100%; height: 100%; object-fit: cover; }
.logo-input { display: none; }
.logo-fields { flex: 1; }

.socials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.supply-note {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border: var(--border); border-radius: var(--r-tile);
  background: var(--cream); padding: 14px 16px;
  font-size: .92rem;
}
.supply-note strong { font-family: var(--font-body); }
.supply-note .tag {
  background: var(--lime); border: var(--border); border-radius: var(--r-pill);
  padding: 3px 12px; font-size: .75rem; font-weight: 700; letter-spacing: .05em;
}

.preview-sticky { position: sticky; top: 110px; }
.preview-card {
  background: var(--lavender); border: var(--border); border-radius: var(--r-card);
  padding: 26px; box-shadow: var(--shadow-hard);
}
.preview-card .tok-desc { margin: 16px 0 0; color: var(--ink-soft); font-size: .93rem; overflow-wrap: anywhere; }
.preview-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.preview-links span {
  border: var(--border); border-radius: var(--r-pill);
  background: var(--white); padding: 3px 12px;
  font-size: .75rem; font-weight: 700;
}

.notice {
  margin-top: 18px; padding: 14px 18px;
  border: var(--border); border-radius: var(--r-tile);
  background: var(--lime-soft); font-size: .88rem;
}

/* ============ EXPLORE PAGE ============ */
.explore-bar { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.explore-bar input {
  flex: 1; min-width: 240px; padding: 13px 18px;
  border: var(--border); border-radius: var(--r-pill);
  background: var(--white); font: inherit;
}
.pillset { display: flex; gap: 10px; flex-wrap: wrap; }
.pill-toggle {
  padding: 11px 20px; border: var(--border); border-radius: var(--r-pill);
  background: var(--white); font-weight: 700; font-size: .9rem;
}
.pill-toggle[aria-pressed="true"] { background: var(--ink); color: var(--lime); }
.empty-state {
  border: 2px dashed var(--muted); border-radius: var(--r-card);
  padding: 48px; text-align: center; color: var(--ink-soft);
}

/* ============ UTILITIES ============ */
.pt0 { padding-top: 0; }
.badge-static { position: static; display: inline-block; margin-bottom: 16px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 920px) {
  .hero-grid, .launch-grid { grid-template-columns: 1fr; }
  .card-fan { min-height: 420px; margin-top: 12px; }
  .steps, .tok-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .socials { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .steps, .tok-grid { grid-template-columns: 1fr; }
  .tok-card { position: static; transform: none !important; margin-bottom: 16px; width: 100%; }
  .card-fan { min-height: 0; }
  .cta-strip { padding: 40px 24px; }
  .logo-row { flex-direction: column; }
}

/* ============ REVISION 3 ============ */

/* Nav links on the left, wallet button stays right */
.nav-links { margin-left: 0; }
.nav #connect-btn { margin-left: auto; }

/* Hero typing animation */
.hero h1 .line { opacity: 1; transform: none; animation: none; min-height: 1.2em; }
.type-caret {
  display: inline-block; width: .09em; height: 1em;
  background: var(--ink); margin-left: 3px; vertical-align: -0.12em;
  animation: blink .8s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.marker { animation: none; }
.marker.on { animation: sweep .55s ease-out forwards; }

/* Hero fan holds 5 cards */
.card-fan { min-height: 600px; }
.tok-card.c1 { top: 0;     right: 10%; transform: rotate(3deg);  background: var(--lavender); }
.tok-card.c2 { top: 118px; right: 24%; transform: rotate(-4deg); z-index: 2; background: var(--white); }
.tok-card.c3 { top: 240px; right: 4%;  transform: rotate(2deg);  background: var(--lime-soft); }
.tok-card.c4 { top: 360px; right: 20%; transform: rotate(-2deg); background: var(--white); }
.tok-card.c5 { top: 480px; right: 8%;  transform: rotate(3deg);  background: var(--lavender); }

/* $JUST spotlight */
.spotlight {
  background: var(--ink); color: var(--cream);
  border: var(--border); border-radius: var(--r-card);
  padding: 36px; box-shadow: var(--shadow-hard);
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center;
}
.spotlight .tok-ava { width: 64px; height: 64px; }
.spotlight-id .tok-name { color: var(--white); font-size: 1.3rem; font-family: var(--font-display); }
.spotlight-id .tok-meta { color: #B9B8AE; }
.spotlight-metrics {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; flex: 1; min-width: 320px; margin-left: auto;
}
.metric {
  border: 2px solid #3A3A34; border-radius: var(--r-tile);
  padding: 16px 18px; background: #232320;
}
.metric .m-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #8B8A80; margin-bottom: 6px;
}
.metric .m-value {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.25rem; color: var(--lime);
}
.metric .m-sub { font-size: .8rem; font-weight: 700; margin-top: 4px; }

/* Trending filter bar */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: space-between; align-items: center;
  margin-bottom: 28px;
}
.pill-toggle.sm { padding: 8px 16px; font-size: .82rem; }
.g-stats {
  display: flex; justify-content: space-between;
  font-size: .85rem; color: var(--ink-soft); font-weight: 600;
}

/* Centered footer */
.foot-grid {
  flex-direction: column; align-items: center;
  justify-content: center; gap: 20px; text-align: center;
}
.foot-note { text-align: center; }

@media (max-width: 920px) {
  .spotlight-metrics { grid-template-columns: 1fr; margin-left: 0; }
  .filter-bar { justify-content: flex-start; }
}
@media (max-width: 620px) {
  .card-fan { min-height: 0; }
}

/* ============ REVISION 4 ============ */

/* Brand flush left, CTA pair on the right */
.nav .wrap { padding: 0 16px 0 12px; }
.nav .launch-cta { margin-left: auto; }
.nav #connect-btn { margin-left: 0; }

/* Live chat widget */
.chat-toggle {
  position: fixed; left: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  background: var(--ink); color: var(--lime);
  border: var(--border); border-radius: var(--r-pill);
  font-weight: 700; font-size: .9rem;
  box-shadow: var(--shadow-hard-sm); cursor: pointer;
}
.chat-toggle .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--lime);
}
.chat-panel {
  position: fixed; left: 18px; bottom: 76px; z-index: 60;
  width: min(320px, calc(100vw - 36px)); height: 420px;
  background: var(--cream); border: var(--border); border-radius: var(--r-tile);
  box-shadow: var(--shadow-hard);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--lime);
  border-bottom: var(--border);
  font-weight: 700; font-size: .9rem;
}
.chat-head button {
  background: none; border: none; font-weight: 700; font-size: 1rem;
  cursor: pointer; padding: 0 4px;
}
.chat-msgs {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-msg { font-size: .87rem; line-height: 1.45; overflow-wrap: anywhere; }
.chat-msg .who { font-weight: 700; margin-right: 6px; }
.chat-msg.me .who { color: #3F7D20; }
.chat-form {
  display: flex; gap: 8px; padding: 10px;
  border-top: var(--border); background: var(--white);
}
.chat-form input {
  flex: 1; padding: 10px 14px;
  border: var(--border); border-radius: var(--r-pill);
  background: var(--cream); font: inherit; font-size: .87rem;
  min-width: 0;
}
.chat-form button {
  padding: 10px 16px; border: var(--border); border-radius: var(--r-pill);
  background: var(--lime); font-weight: 700; font-size: .85rem;
}

@media (max-width: 920px) {
  .nav .launch-cta { margin-left: auto; }
}

/* ============ REVISION 5 ============ */

/* Relay bridge embed */
.bridge-frame-wrap {
  border: var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-hard);
  overflow: hidden; background: var(--white);
  max-width: 760px;
}
.bridge-frame {
  display: block; width: 100%; height: 720px; border: 0;
}
.bridge-fallback { margin-top: 18px; }

/* Taller chat room */
.chat-panel { height: min(72vh, 660px); }

/* ============ REVISION 7: bridge UI ============ */
.bridge-head { text-align: center; max-width: none; }
.bridge-box { max-width: 520px; margin: 0 auto; }
.bridge-card {
  background: var(--white); border: var(--border); border-radius: var(--r-card);
  padding: 22px 24px; box-shadow: var(--shadow-hard-sm);
}
.bridge-row-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.bridge-label { font-weight: 700; font-size: .9rem; }
.bridge-net { color: var(--muted); font-size: .82rem; font-weight: 600; }
.bridge-row-main {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.bridge-amount {
  font-family: var(--font-display); font-weight: 700; font-size: 2rem;
  border: none; background: none; padding: 0; width: 55%;
  color: var(--ink); min-width: 0;
}
.bridge-amount:focus { outline: none; }
.bridge-amount-out { display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bridge-token {
  display: flex; align-items: center; gap: 10px;
  border: var(--border); border-radius: var(--r-pill);
  background: var(--cream); padding: 8px 16px 8px 10px;
  line-height: 1.2; flex: none;
}
.bridge-token small { color: var(--muted); font-weight: 600; }
.bridge-token-ico {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--lavender); border: var(--border);
  display: grid; place-items: center; font-weight: 700; font-size: .85rem;
}
.bridge-token-ico.lime { background: var(--lime); }
.bridge-arrow {
  text-align: center; font-size: 1.4rem; font-weight: 700;
  margin: 10px 0;
}
.bridge-go { margin-top: 18px; }
.bridge-note {
  color: var(--muted); font-size: .82rem; text-align: center;
  margin: 14px 0 0;
}
.bridge-info { margin-top: 44px; }
.bridge-info .mono {
  font-family: ui-monospace, "Cascadia Mono", "Courier New", monospace;
  font-size: .82rem; overflow-wrap: anywhere;
}

/* ============ REVISION 8: live bridge ============ */
.bridge-row-bot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px;
}
.bridge-status {
  text-align: center; font-weight: 600; font-size: .88rem;
  margin: 14px 0 0; overflow-wrap: anywhere;
}

/* ============ REVISION 9: relay widget embed ============ */
.widget-wrap { max-width: 480px; margin: 0 auto; }
.widget-wrap > div { min-height: 380px; }

/* ============ REVISION 10: bridge polish ============ */
.widget-wrap {
  max-width: 470px; margin: 0 auto;
  background: var(--white);
  border: var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-hard);
  padding: 14px;
}
.widget-wrap > div { min-height: 380px; }
.bridge-note { max-width: 470px; margin-left: auto; margin-right: auto; }
img.brand-mark { width: 40px; height: 40px; border-radius: 13px; object-fit: cover; background: var(--ink); }

/* ============ REVISION 11: clean widget, no frame ============ */
.widget-wrap {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* ============ REVISION 12: widget final polish ============ */
.widget-wrap {
  display: flex;
  justify-content: center;
  max-width: none;
}
.widget-wrap :focus-visible,
.widget-wrap input:focus,
.widget-wrap input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* ============ REVISION 13: profile & referral dashboards ============ */
.acct-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  background: var(--white); border: var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-hard-sm); padding: 24px 28px; margin-bottom: 26px;
}
.acct-ava {
  width: 62px; height: 62px; border-radius: 18px;
  background: var(--ink); color: var(--lime);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
}
.acct-id .acct-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.acct-id .acct-sub { color: var(--muted); font-size: .85rem; font-weight: 600; }
.acct-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 18px; margin-bottom: 34px;
}
.stat {
  background: var(--white); border: var(--border); border-radius: var(--r-tile);
  box-shadow: var(--shadow-hard-sm); padding: 18px 20px;
}
.stat.lav { background: var(--lavender); }
.stat.lime { background: var(--lime-soft); }
.stat .s-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px;
}
.stat .s-value { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
.stat .s-sub { font-size: .82rem; font-weight: 700; margin-top: 4px; }

.hold-list { display: flex; flex-direction: column; gap: 14px; }
.hold-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: var(--border); border-radius: var(--r-tile);
  box-shadow: var(--shadow-hard-sm); padding: 14px 18px;
}
.hold-row .h-qty { color: var(--ink-soft); font-size: .85rem; }
.hold-right { margin-left: auto; text-align: right; }
.hold-right .h-val { font-weight: 700; }
.hold-right .h-pnl { font-size: .85rem; font-weight: 700; }

.ref-link-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  background: var(--ink); color: var(--cream);
  border: var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-hard); padding: 24px 28px; margin-bottom: 34px;
}
.ref-link-card .r-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #8B8A80; width: 100%;
}
.ref-link {
  font-family: ui-monospace, "Cascadia Mono", "Courier New", monospace;
  font-size: .92rem; color: var(--lime);
  overflow-wrap: anywhere; flex: 1; min-width: 200px;
}
.connect-note {
  border: 2px dashed var(--muted); border-radius: var(--r-card);
  padding: 44px; text-align: center; color: var(--ink-soft); font-weight: 600;
}
.data-note { color: var(--muted); font-size: .82rem; margin-top: 22px; }
[hidden] { display: none !important; }

@media (max-width: 920px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .stat-grid { grid-template-columns: 1fr; } }

/* ============ REVISION 14: claim button ============ */
.stat-claim { margin-top: 10px; padding: 8px 18px; font-size: .82rem; }

/* ============ REVISION 15: token page ============ */
.token-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 34px; align-items: start; }
.tk-big { width: 62px; height: 62px; font-size: 1.1rem; }
.chart-card {
  background: var(--white); border: var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-hard-sm); padding: 16px; overflow: hidden;
}
.chart-card svg { display: block; width: 100%; height: 260px; }
.trade-card {
  background: var(--white); border: var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-hard); padding: 24px;
}
.trade-tabs { margin-bottom: 18px; }
.trade-tabs .pill-toggle { flex: 1; }
.tr-quote { font-weight: 700; margin: 0 0 6px; min-height: 1.3em; }
.tr-bal { color: var(--muted); font-size: .85rem; font-weight: 600; margin: 0 0 14px; min-height: 1.2em; }
@media (max-width: 920px) { .token-grid { grid-template-columns: 1fr; } }

/* ============ REVISION 16: trades table, pct buttons, feed tabs ============ */
.feed-tabs { margin: 30px 0 16px; }
.table-wrap {
  background: var(--white); border: var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-hard-sm); overflow-x: auto;
}
.jh-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.jh-table th {
  text-align: left; padding: 12px 16px; font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
}
.jh-table td { padding: 11px 16px; border-bottom: 1px solid var(--cream-dark, #EAE6D8); font-weight: 600; }
.jh-table tr:last-child td { border-bottom: none; }
.cell-buy { color: #4C9A2A; font-weight: 700; }
.cell-sell { color: var(--red); font-weight: 700; }
.cell-mono, .cell-tx { font-family: ui-monospace, "Cascadia Mono", "Courier New", monospace; font-size: .82rem; }
a.cell-tx { color: inherit; text-decoration: underline; }
.pct-row { display: flex; gap: 8px; margin: 4px 0 12px; }
.pct-btn {
  flex: 1; padding: 8px 0; font: inherit; font-weight: 700; font-size: .82rem;
  background: var(--cream); border: var(--border); border-radius: var(--r-pill);
  cursor: pointer;
}
.pct-btn:hover { background: var(--lime-soft); }
.comment-form { display: flex; gap: 10px; margin-bottom: 10px; }
.comment-form input {
  flex: 1; padding: 12px 16px; font: inherit;
  border: var(--border); border-radius: var(--r-pill); background: var(--white);
}
.comment-form input:focus { outline: 3px solid var(--lime); outline-offset: 1px; }
