/* =========================================================
   Linked Inu — mobile-first design system
   ========================================================= */

:root {
  color-scheme: light;
  --navy-950: #071526;
  --navy-900: #0b2038;
  --navy-800: #12345b;
  --blue-600: #2468d8;
  --blue-500: #3a7af0;
  --blue-100: #e7f0ff;
  --blue-050: #f4f8ff;
  --ink: #16202e;
  --ink-2: #2c3a4c;
  --muted: #617083;
  --line: #dde4ec;
  --line-strong: #c7d2df;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --canvas: #f1f5f9;
  --soft: #eef3f8;
  --green: #12795a;
  --green-soft: #e6f6f0;
  --red: #c03540;
  --red-soft: #fdeff0;
  --gold: #a97c1d;
  --gold-soft: #fdf6e5;
  --shadow-sm: 0 1px 2px rgba(7, 21, 38, .06), 0 1px 4px rgba(7, 21, 38, .04);
  --shadow-md: 0 10px 28px rgba(7, 21, 38, .10);
  --shadow-lg: 0 26px 64px rgba(7, 21, 38, .20);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --max: 1260px;
  --topbar-h: 58px;
  --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: Manrope, var(--font-sans);
}

[data-theme='dark'] {
  color-scheme: dark;
  --ink: #e8eef6;
  --ink-2: #c3cddb;
  --muted: #93a3b6;
  --line: #22303f;
  --line-strong: #33475c;
  --surface: #101c28;
  --surface-2: #16232f;
  --canvas: #0a141d;
  --soft: #1a2836;
  --blue-100: #16304f;
  --blue-050: #12253c;
  --green-soft: #10382c;
  --red-soft: #3a1c20;
  --gold-soft: #362c14;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, .45);
  --shadow-lg: 0 26px 64px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--canvas);
  color: var(--ink);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.5;
}
button, input, textarea, select { font: inherit; color: inherit; min-width: 0; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.025em; }
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 2px; border-radius: 6px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 3px solid var(--canvas); }

/* ---------------- layout primitives ---------------- */
.container { width: min(var(--max), 100% - 24px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center { text-align: center; }
.hide { display: none !important; }
.scroll-x { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll-x::-webkit-scrollbar { display: none; }

@media (max-width: 699px) { .hide-mobile { display: none !important; } }
@media (min-width: 700px) { .only-mobile { display: none !important; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 16px; }
.card-title { margin: 0; font-size: 16px; }
.section-subtitle { margin: 6px 0 0; color: var(--muted); line-height: 1.6; }

/* ---------------- buttons ---------------- */
.btn {
  min-height: 44px; border-radius: 11px; padding: 0 16px; border: 1px solid transparent;
  font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .16s ease, border-color .16s ease, transform .12s ease, opacity .16s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: #1c59bf; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--blue-050); border-color: var(--blue-500); color: var(--blue-600); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--soft); color: var(--ink); }
.btn-dark { background: var(--navy-900); color: #fff; }
.btn-danger { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-xs { min-height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { min-height: 52px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); position: relative; }
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }

/* ---------------- badges / chips ---------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 0 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 11px; font-weight: 700; }
.badge-blue { background: var(--blue-100); color: var(--blue-600); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-gold { background: var(--gold-soft); color: var(--gold); }
.chip { min-height: 34px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 13px; color: var(--muted); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.chip.active, .chip:hover { border-color: var(--blue-600); color: var(--blue-600); background: var(--blue-050); }
.positive { color: var(--green); }
.negative { color: var(--red); }
.price-change { font-size: 12px; font-weight: 800; }

/* ---------------- avatars ---------------- */
.avatar { flex: 0 0 auto; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(145deg, #2c5e93, #5e8fc7); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 28px; height: 28px; font-size: 10px; }
.avatar-sm { width: 40px; height: 40px; font-size: 13px; }
.avatar-md { width: 52px; height: 52px; font-size: 16px; }
.avatar-lg { width: 76px; height: 76px; font-size: 22px; }
.avatar-xl { width: 96px; height: 96px; font-size: 30px; border: 4px solid var(--surface); box-shadow: var(--shadow-sm); }
.coin-logo { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, var(--navy-800), var(--blue-500)); color: #fff; font: 800 14px var(--font-display); }
.coin-logo img { width: 100%; height: 100%; object-fit: cover; }
.coin-logo-sm { width: 36px; height: 36px; border-radius: 10px; font-size: 11px; }
.coin-logo-lg { width: 66px; height: 66px; border-radius: 18px; font-size: 20px; }
.avatar-edit { position: relative; flex: 0 0 auto; }
.avatar-edit-btn {
  position: absolute; right: 0; bottom: 4px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--blue-600); color: #fff;
  border: 3px solid var(--surface); box-shadow: var(--shadow-sm); transition: background .16s ease, transform .12s ease;
}
.avatar-edit-btn:hover { background: #1c59bf; transform: scale(1.06); }
.avatar-edit-btn:active { transform: scale(.96); }
.avatar-edit-btn svg { width: 16px; height: 16px; }

.verified { display: inline-flex; color: var(--blue-600); vertical-align: -2px; }
.verified svg { width: 15px; height: 15px; }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.topbar-inner { height: var(--topbar-h); display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 800; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-600); color: #fff; font-size: 14px; letter-spacing: -.04em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 4px 12px rgba(36,104,216,.32); }
.brand-text { line-height: 1.05; font-size: 17px; display: none; }
.brand-text small { display: block; margin-top: 4px; color: var(--muted); font: 700 9px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav-links { display: none; }
.nav-link { min-width: 62px; height: 46px; border-radius: 10px; padding: 4px 8px; display: grid; place-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); position: relative; }
.nav-link svg { width: 21px; height: 21px; }
.nav-link:hover { color: var(--ink); background: var(--soft); }
.nav-link.active { color: var(--blue-600); }
.nav-link.active::after { content: ''; position: absolute; bottom: -6px; left: 12px; right: 12px; height: 3px; border-radius: 3px; background: var(--blue-600); }
.chain-pill { display: none; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12px; font-weight: 700; color: var(--ink); background: var(--surface); white-space: nowrap; flex: 0 0 auto; }
.chain-pill svg { width: 17px; height: 17px; }
.chain-pill:hover { border-color: var(--blue-500); color: var(--blue-600); }
.chain-pill .dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 18%, transparent); }
.chain-pill.wrong .dot-live { background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent); }

/* search */
.search-wrap { position: relative; flex: 1; min-width: 0; }
.search-input { width: 100%; height: 40px; border: 1px solid transparent; background: var(--soft); border-radius: 11px; padding: 0 38px; outline: none; font-size: 14px; }
.search-input:focus { background: var(--surface); border-color: var(--blue-500); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue-500) 14%, transparent); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); padding: 7px; }
.search-panel { position: absolute; top: 48px; left: 0; right: 0; max-height: min(66vh, 520px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 70; }
.search-group-title { padding: 9px 11px 5px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.search-result { width: 100%; display: flex; gap: 10px; align-items: center; padding: 9px 11px; border-radius: 10px; text-align: left; }
.search-result:hover { background: var(--blue-050); }
.search-result strong { display: block; font-size: 14px; }
.search-result span { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* mobile search overlay */
.mobile-search { position: fixed; inset: 0; z-index: 130; background: var(--canvas); padding: calc(env(safe-area-inset-top) + 10px) 12px 12px; display: grid; grid-template-rows: auto 1fr; gap: 10px; }
.mobile-search .search-panel { position: static; max-height: none; box-shadow: none; border: 0; background: transparent; padding: 0; }

/* account menu */
.menu-pop { position: absolute; top: 52px; right: 0; width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 90; }
.menu-pop button, .menu-pop a { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-align: left; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--soft); }
.menu-pop svg { width: 18px; height: 18px; color: var(--muted); }
.menu-head { padding: 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; gap: 10px; align-items: center; }
.menu-pop-wide { width: min(340px, calc(100vw - 24px)); max-height: min(70vh, 460px); overflow: auto; }
.panel-row { width: 100%; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; text-align: left; }
.panel-row:hover { background: var(--soft); }
.panel-row.unread { background: var(--blue-050); }
.panel-text { font-size: 13px; line-height: 1.45; color: var(--ink-2); font-weight: 500; }
.panel-empty { padding: 26px 18px; text-align: center; color: var(--muted); }
.panel-empty svg { width: 30px; height: 30px; margin: 0 auto 10px; color: var(--line-strong); }
.panel-empty p { margin: 0; font-size: 13px; line-height: 1.55; }

/* ---------------- bottom nav (mobile) ---------------- */
.mobile-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(18px); border-top: 1px solid var(--line);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
}
.mobile-nav button { min-height: 52px; border-radius: 10px; display: grid; place-items: center; gap: 3px; font-size: 10px; font-weight: 700; color: var(--muted); position: relative; }
.mobile-nav button svg { width: 22px; height: 22px; }
.mobile-nav button.active { color: var(--blue-600); }
.mobile-nav .nav-avatar { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; }
.fab { position: fixed; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 79; width: 56px; height: 56px; border-radius: 18px; background: var(--blue-600); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px rgba(36,104,216,.4); }
.fab svg { width: 26px; height: 26px; }

.main-area { padding: 14px 0 calc(84px + env(safe-area-inset-bottom)); }
.app-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.left-rail, .right-rail { display: none; }

/* ---------------- page head ---------------- */
.page-head { margin-bottom: 14px; }
.page-head h1 { margin: 0; font-size: 24px; line-height: 1.15; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* ---------------- landing ---------------- */
.landing { background: var(--surface); }
.landing-nav { position: absolute; inset: 0 0 auto; z-index: 20; }
.landing-nav .container { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.landing-nav .brand { color: #fff; }
.landing-nav .brand-text { color: #fff; }
.landing-nav .brand-text small { color: rgba(255,255,255,.66); }
.landing-nav .brand-mark { background: var(--blue-500); border: 1px solid rgba(255,255,255,.3); box-shadow: 0 4px 14px rgba(58,122,240,.4); }
.landing-nav .btn-secondary { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); color: #fff; }
.landing-hero {
  position: relative; overflow: hidden; color: #fff; padding: 96px 0 56px;
  background: radial-gradient(circle at 78% 12%, rgba(61,137,236,.4), transparent 42%), linear-gradient(160deg, #071526 0%, #12345b 58%, #1f5b98 100%);
}
.landing-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 90%, rgba(36,104,216,.22), transparent 60%); }
.hero-grid { position: relative; z-index: 2; display: grid; gap: 34px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); border-radius: 999px; padding: 7px 12px; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: #75d8b8; box-shadow: 0 0 0 4px rgba(117,216,184,.16); }
.hero-title { font-size: clamp(34px, 9vw, 54px); line-height: 1.02; letter-spacing: -.045em; margin: 20px 0 16px; }
.hero-title span { color: #8ebdff; }
.hero-copy { font-size: 16px; line-height: 1.65; color: rgba(255,255,255,.78); max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-actions .btn-primary { background: #fff; color: var(--navy-900); }
.hero-actions .btn-primary:hover { background: #e9f0fb; }
.hero-actions .btn-secondary { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.3); }
.hero-proof { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 26px; color: rgba(255,255,255,.74); font-size: 13px; }
.hero-proof span { display: inline-flex; align-items: center; gap: 7px; }
.hero-proof i { width: 18px; height: 18px; border-radius: 50%; background: rgba(117,216,184,.16); color: #75d8b8; display: grid; place-items: center; font-style: normal; font-size: 11px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 28px; }
.hero-stat {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px; padding: 12px 13px; backdrop-filter: blur(8px);
}
.hero-stat span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: rgba(255, 255, 255, .6); font-weight: 700; line-height: 1.35; }
.hero-stat strong { display: block; margin-top: 6px; font: 800 clamp(17px, 4.2vw, 24px) var(--font-display); letter-spacing: -.03em; color: #fff; }

.hero-visual { position: relative; }
.hero-photo-wrap { border-radius: 22px; overflow: hidden; border: 1px solid rgba(255,255,255,.22); box-shadow: 0 26px 60px rgba(0,0,0,.35); }
.hero-photo-wrap img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-market-card { position: absolute; right: 8px; top: -14px; width: 170px; background: rgba(7,21,38,.9); color: #fff; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 13px; backdrop-filter: blur(10px); }
.hero-market-card strong { font-family: var(--font-display); font-size: 21px; display: block; margin: 5px 0; }
.hero-profile-card { position: absolute; left: -6px; bottom: -22px; width: 210px; background: var(--surface); color: var(--ink); border-radius: 16px; padding: 13px; box-shadow: var(--shadow-lg); }
.mini-line { height: 7px; border-radius: 99px; background: var(--soft); margin-top: 7px; }
.mini-line.short { width: 62%; }
.spark-mini { height: 40px; margin-top: 6px; }

.landing-section { padding: 56px 0; }
.landing-section.alt { background: var(--canvas); }
.landing-heading { max-width: 720px; margin-bottom: 28px; }
.landing-heading h2 { font-size: clamp(26px, 6vw, 42px); line-height: 1.1; margin: 8px 0 0; }
.landing-heading p { color: var(--muted); font-size: 15px; line-height: 1.7; margin-top: 12px; }
.feature-grid { display: grid; gap: 12px; }
.feature-card { padding: 20px; }
.feature-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--blue-100); color: var(--blue-600); margin-bottom: 16px; }
.feature-icon svg { width: 21px; height: 21px; }
.feature-card h3 { margin: 0 0 8px; font-size: 18px; }
.feature-card p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 14px; }
.metric-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.metric-cell { background: var(--surface); padding: 18px; }
.metric-cell strong { display: block; font: 800 24px var(--font-display); letter-spacing: -.03em; }
.metric-cell span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.product-preview { display: grid; gap: 24px; align-items: center; }
.preview-window { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-md); overflow: hidden; }
.preview-window-bar { height: 40px; background: var(--surface-2); border-bottom: 1px solid var(--line); display: flex; gap: 6px; align-items: center; padding: 0 14px; }
.preview-window-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.preview-window-content { padding: 16px; }
.preview-profile { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.preview-coin-list { display: grid; gap: 9px; margin-top: 14px; }
.preview-coin-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 11px; }
.landing-cta { padding: 56px 0; background: linear-gradient(140deg, var(--navy-950), var(--navy-800)); color: #fff; }
.cta-box { display: grid; gap: 18px; }
.cta-box h2 { margin: 0; font-size: clamp(26px, 6vw, 40px); line-height: 1.12; }
.cta-box p { color: rgba(255,255,255,.72); margin: 10px 0 0; }
.landing-footer { padding: 28px 0 40px; background: #061019; color: rgba(255,255,255,.6); font-size: 12px; }
.landing-footer .brand { color: #fff; }
.landing-footer .brand-text { color: #fff; display: block; }
.landing-footer .brand-text small { color: rgba(255,255,255,.5); }
.footer-grid { display: grid; gap: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.footer-links button { color: rgba(255,255,255,.72); font-size: 12px; font-weight: 600; }
.footer-links button:hover { color: #fff; }

/* ---------------- feed ---------------- */
.composer { padding: 14px; }
.composer-top { display: flex; gap: 10px; align-items: center; }
.composer-trigger { flex: 1; min-height: 44px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; text-align: left; padding: 0 16px; color: var(--muted); font-weight: 600; font-size: 14px; }
.composer-trigger:hover { background: var(--blue-050); }
.composer-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 10px; }
.composer-action { padding: 9px 4px; border-radius: 9px; color: var(--muted); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.composer-action svg { width: 17px; height: 17px; }
.composer-action:hover { background: var(--blue-050); color: var(--blue-600); }

.feed { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.post { padding: 14px 14px 6px; }
.post-head { display: flex; gap: 10px; align-items: flex-start; }
.post-author { min-width: 0; flex: 1; }
.post-author strong { font-size: 14px; display: block; }
.post-author p { margin: 1px 0 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.post-text { margin: 12px 0; line-height: 1.6; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.post-image { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 12px; }
.post-project { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; background: var(--surface-2); text-align: left; }
.post-stats { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; padding: 10px 0 8px; border-bottom: 1px solid var(--line); }
.post-actions { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 4px; }
.post-action { min-height: 42px; border-radius: 8px; color: var(--muted); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.post-action svg { width: 18px; height: 18px; }
.post-action:hover { background: var(--soft); color: var(--ink); }
.post-action.active { color: var(--blue-600); }
.comment-list { display: grid; gap: 12px; margin-top: 14px; }
.comment { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.comment-bubble { background: var(--soft); border-radius: 12px; padding: 10px 12px; }
.comment-bubble strong { font-size: 13px; }
.comment-bubble p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.comment-form { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 14px; }

/* ---------------- market ---------------- */
.market-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.coin-card { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.coin-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.coin-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.coin-card h3 { margin: 0; font-size: 15px; }
.coin-card .tagline { margin: 0; color: var(--muted); line-height: 1.5; font-size: 13px; }
.coin-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.coin-metric { background: var(--surface-2); border-radius: 10px; padding: 9px 10px; }
.coin-metric span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.coin-metric strong { display: block; margin-top: 3px; font-size: 13px; }
.coin-card-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: auto; }
.market-table { width: 100%; border-collapse: collapse; }
.market-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--line); }
.market-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.market-table tr:last-child td { border-bottom: 0; }
.market-table tbody tr:hover { background: var(--surface-2); cursor: pointer; }
.toolbar { display: flex; gap: 8px; align-items: center; }

/* ---------------- profile ---------------- */
.profile-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.profile-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.profile-side { display: grid; gap: 14px; }
.profile-hero { overflow: hidden; }
.profile-hero-cover { height: 120px; background: linear-gradient(120deg, var(--navy-900), var(--blue-500)); position: relative; background-size: cover; background-position: center; }
.profile-hero-body { padding: 0 16px 18px; }
.profile-hero-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: -48px; position: relative; z-index: 2; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.profile-name { margin: 14px 0 4px; font-size: 22px; }
.profile-headline { margin: 0; line-height: 1.5; font-size: 14px; }
.profile-meta { color: var(--muted); font-size: 13px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.profile-counts { display: flex; gap: 16px; margin-top: 10px; color: var(--blue-600); font-size: 13px; font-weight: 700; flex-wrap: wrap; }
.profile-section { padding: 16px; }
.profile-section h2 { margin: 0 0 12px; font-size: 17px; }
.experience-list { display: grid; gap: 16px; }
.experience { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
.experience-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--blue-100); color: var(--blue-600); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.experience h3 { margin: 0; font-size: 14px; }
.experience .org { margin: 2px 0; font-size: 13px; }
.experience .period { color: var(--muted); font-size: 12px; }
.experience p { color: var(--muted); line-height: 1.55; font-size: 13px; margin: 7px 0 0; }
.skill-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.skill-row:last-child { border-bottom: 0; }
.skill-row strong { font-size: 13px; }
.skill-count { color: var(--muted); font-size: 12px; }
.split-bar { height: 14px; border-radius: 999px; background: var(--soft); overflow: hidden; display: flex; gap: 2px; }
.split-bar span { height: 100%; }
.split-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.split-legend span { display: inline-flex; align-items: center; gap: 7px; }
.split-legend i { width: 10px; height: 10px; border-radius: 3px; }
.meter { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; display: flex; }
.meter span { height: 100%; background: var(--blue-600); }

/* ---------------- coin detail ---------------- */
.coin-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.coin-detail-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.coin-hero { padding: 16px; }
.coin-hero-head { display: grid; gap: 14px; }
.coin-title-wrap { display: flex; gap: 12px; align-items: center; }
.coin-title-wrap h1 { margin: 0; font-size: 21px; }
.coin-title-wrap p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.coin-price strong { display: block; font: 800 26px var(--font-display); letter-spacing: -.03em; }
.coin-price span { display: block; margin-top: 3px; font-size: 13px; font-weight: 700; }
.chart-box { height: 190px; margin-top: 14px; background: linear-gradient(to bottom, var(--blue-050), transparent); border: 1px solid var(--line); border-radius: 13px; padding: 12px; }
.geckoterminal-chart-card { height: 500px; margin-top: 14px; border: 1px solid var(--line); border-radius: 13px; background: #0a0d0a; overflow: hidden; }
.geckoterminal-chart { display: block; width: 100%; height: 100%; border: 0; background: #0a0d0a; }
.geckoterminal-chart-empty { height: 100%; padding: 24px; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--surface-2); }
.geckoterminal-chart-empty div { max-width: 440px; }
.geckoterminal-chart-empty strong, .geckoterminal-chart-empty span { display: block; }
.geckoterminal-chart-empty strong { font-size: 14px; }
.geckoterminal-chart-empty span { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.range-tabs { display: flex; gap: 6px; margin-top: 10px; }
.detail-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.detail-metric { padding: 11px; background: var(--surface-2); border-radius: 11px; }
.detail-metric span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.detail-metric strong { display: block; margin-top: 4px; font-size: 13px; word-break: break-word; }
.trade-panel { padding: 16px; }
.trade-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border-radius: 11px; padding: 4px; margin: 14px 0; }
.trade-tab { min-height: 38px; border-radius: 8px; font-weight: 700; color: var(--muted); font-size: 14px; }
.trade-tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.trade-tab.active[data-side='buy'] { color: var(--green); }
.trade-tab.active[data-side='sell'] { color: var(--red); }
.trade-balance { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.trade-input-wrap { position: relative; }
.trade-input { width: 100%; height: 54px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 68px 0 14px; outline: none; font-size: 19px; font-weight: 800; background: var(--surface); }
.trade-input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue-500) 14%, transparent); }
.trade-unit { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; font-weight: 800; }
.preset-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.trade-summary { display: grid; gap: 7px; margin: 14px 0; font-size: 12px; color: var(--muted); }
.trade-summary div { display: flex; justify-content: space-between; gap: 10px; }
.trade-summary strong { color: var(--ink); }
.creator-fee-card { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); display: flex; align-items: flex-start; gap: 10px; }
.creator-fee-card.is-owner { border-color: color-mix(in srgb, var(--green) 34%, var(--line)); background: var(--green-soft); }
.creator-fee-icon { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; color: var(--blue-600); background: var(--blue-100); }
.creator-fee-card.is-owner .creator-fee-icon { color: var(--green); background: color-mix(in srgb, var(--green-soft) 70%, var(--surface)); }
.creator-fee-icon svg { width: 17px; height: 17px; }
.creator-fee-card strong, .creator-fee-card span { display: block; }
.creator-fee-card strong { font-size: 13px; }
.creator-fee-card .grow > span { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.trade-route-pending { white-space: normal; line-height: 1.3; padding-block: 12px; }
.notice { padding: 11px 13px; border-radius: 11px; background: var(--gold-soft); color: var(--gold); font-size: 12px; line-height: 1.55; border: 1px solid color-mix(in srgb, var(--gold) 26%, transparent); }
.notice-blue { background: var(--blue-050); color: var(--blue-600); border-color: color-mix(in srgb, var(--blue-600) 24%, transparent); }
.address-line { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }

/* ---------------- portfolio ---------------- */
.portfolio-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.portfolio-summary { padding: 18px; }
.portfolio-value { font: 800 32px var(--font-display); letter-spacing: -.035em; margin: 6px 0 10px; }
.holding-row { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; }
.holding-row:last-child { border-bottom: 0; }
.holding-row .right { text-align: right; }
.holding-row strong { font-size: 13px; display: block; }
.holding-row span { color: var(--muted); font-size: 11px; }
.allocation-bar { height: 12px; border-radius: 999px; background: var(--soft); overflow: hidden; display: flex; margin: 14px 0; }
.allocation-segment { height: 100%; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; }
.data-table th { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }

/* ---------------- jobs / messages / notifications ---------------- */
.job-card { padding: 16px; display: grid; gap: 10px; }
.job-card h3 { margin: 0; font-size: 16px; }
.job-card-image { height: 150px; margin: -16px -16px 2px; overflow: hidden; border-radius: 12px 12px 0 0; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.job-card-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.job-image-preview { min-height: 150px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; overflow: hidden; text-align: center; font-size: 12px; }
.job-image-preview > svg { width: 28px; height: 28px; }
.job-image-preview img { width: 100%; height: 190px; display: block; object-fit: cover; }
.notif-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.notif-item:last-child { border-bottom: 0; }
.notif-item.unread { background: var(--blue-050); }
.notif-item p { margin: 0; font-size: 13px; line-height: 1.45; }
.thread-list { display: grid; }
.thread-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.thread-item:hover { background: var(--surface-2); }
.chat-window { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; min-width: 0; height: min(70dvh, 620px); }
.chat-foot .input { width: 100%; }
.chat-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.chat-body { overflow-y: auto; padding: 14px; display: grid; gap: 10px; align-content: start; }
.bubble { max-width: 78%; padding: 10px 13px; border-radius: 15px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.bubble.in { background: var(--soft); justify-self: start; border-bottom-left-radius: 5px; }
.bubble.out { background: var(--blue-600); color: #fff; justify-self: end; border-bottom-right-radius: 5px; }
.chat-foot { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }

/* ---------------- forms ---------------- */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.form-field { display: grid; gap: 6px; }
.form-field label { font-size: 12px; font-weight: 700; color: var(--muted); }
.input, .textarea, .select { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); outline: none; padding: 11px 12px; font-size: 16px; transition: border-color .16s ease, box-shadow .16s ease; }
.input { height: 46px; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.select { height: 46px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue-500) 13%, transparent); }
.form-help { font-size: 11px; color: var(--muted); line-height: 1.45; }
.form-error { color: var(--red); font-size: 12px; min-height: 16px; font-weight: 600; }
.upload-row { display: flex; align-items: center; gap: 12px; }
input[type='file'][data-preview] { display: none; }

/* form sections used by the launch / edit modals */
.form-section { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; background: var(--surface); }
.form-section > header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.form-section > header .step { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 8px; background: var(--blue-100); color: var(--blue-600); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.form-section > header h3 { margin: 0; font-size: 14px; }
.form-section > header p { margin: 1px 0 0; font-size: 12px; color: var(--muted); }

.logo-picker { display: flex; align-items: center; gap: 14px; }
.logo-preview {
  width: 72px; height: 72px; flex: 0 0 auto; border-radius: 18px; overflow: hidden;
  display: grid; place-items: center; background: var(--soft); border: 1px dashed var(--line-strong); color: var(--muted);
}
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.logo-preview svg { width: 24px; height: 24px; }
.fee-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px; border-radius: 14px;
  background: linear-gradient(120deg, var(--green-soft), var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--green) 22%, var(--line));
}
.fee-hero-value { font: 800 clamp(24px, 5vw, 32px) var(--font-display); letter-spacing: -.035em; margin-top: 4px; color: var(--green); }

.venue-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 560px) { .venue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.venue-card {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
  transition: border-color .16s ease, background .16s ease, transform .12s ease;
}
.venue-card:hover { border-color: var(--blue-500); background: var(--blue-050); transform: translateY(-1px); }
.venue-card strong { display: block; font-size: 14px; }
.venue-card span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.venue-card svg { width: 16px; height: 16px; color: var(--muted); flex: 0 0 auto; }

.fixed-term { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.fixed-term:last-child { border-bottom: 0; }
.fixed-term span { color: var(--muted); }
.fixed-term strong { text-align: right; }

/* ---------------- modal ---------------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(7,21,38,.6); z-index: 140; display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: fade .16s ease; }
.modal { width: 100%; max-height: 94dvh; overflow: auto; background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg); animation: sheetUp .22s cubic-bezier(.22,.9,.36,1); padding-bottom: env(safe-area-inset-bottom); }
@keyframes sheetUp { from { transform: translateY(26px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-close { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; color: var(--muted); flex: 0 0 auto; }
.modal-close svg { width: 17px; height: 17px; }
.modal-body { padding: 16px; }
.modal-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; background: var(--surface); }
.auth-visual { display: none; }
.wallet-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.wallet-status { padding: 10px 12px; border-radius: 10px; background: var(--blue-050); color: var(--blue-600); font-size: 12px; margin-top: 8px; line-height: 1.5; }

/* ---------------- misc ---------------- */
.empty { text-align: center; padding: 34px 18px; }
.empty-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--blue-100); color: var(--blue-600); }
.empty-icon svg { width: 24px; height: 24px; }
.empty h3 { margin: 0; font-size: 17px; }
.empty p { color: var(--muted); font-size: 13px; line-height: 1.6; max-width: 380px; margin: 8px auto 16px; }
.toast-root { position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 200; display: grid; gap: 8px; pointer-events: none; }
.toast { background: var(--navy-950); color: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-lg); display: flex; align-items: flex-start; gap: 10px; font-size: 13px; animation: toastIn .18s ease; }
.toast i { font-style: normal; font-weight: 800; }
.toast.error { background: #8f2730; }
.toast.success { background: #0f6a4d; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.loading-screen { min-height: 100dvh; display: grid; place-items: center; }
.loader { width: 40px; height: 40px; border: 4px solid var(--line); border-top-color: var(--blue-600); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tab-bar button { padding: 11px 13px; font-weight: 700; font-size: 14px; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tab-bar button.active { color: var(--blue-600); border-bottom-color: var(--blue-600); }

/* =========================================================
   Mobile refinement — compact phones through large phones
   ========================================================= */
@media (max-width: 699px) {
  :root {
    --radius: 16px;
    --topbar-h: 60px;
    --shadow-sm: 0 1px 2px rgba(7, 21, 38, .05), 0 5px 18px rgba(7, 21, 38, .045);
  }

  body { background: color-mix(in srgb, var(--canvas) 88%, var(--surface)); }
  .container { width: 100%; padding-inline: 12px; }
  .main-area { padding: 14px 0 calc(88px + env(safe-area-inset-bottom)); }
  .card { border-color: color-mix(in srgb, var(--line) 88%, transparent); }
  .card-pad, .profile-section, .coin-hero, .trade-panel, .portfolio-summary { padding: 15px; }

  /* Compact, stable app header. */
  .topbar { box-shadow: 0 1px 10px rgba(7, 21, 38, .04); }
  .topbar-inner { height: var(--topbar-h); gap: 4px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .topbar-actions { gap: 0; }
  .topbar .icon-btn { width: 40px; height: 40px; border-radius: 11px; }
  .topbar .btn-sm { min-height: 38px; padding-inline: 12px; }
  .topbar .btn-secondary { border-color: transparent; background: transparent; }
  .menu-pop { position: fixed; top: calc(var(--topbar-h) + env(safe-area-inset-top) + 8px); left: 12px; right: 12px; width: auto; max-height: calc(100dvh - var(--topbar-h) - 28px - env(safe-area-inset-top)); overflow: auto; }
  .menu-pop-wide { width: auto; }

  /* Thumb-friendly bottom navigation with a clear active state. */
  .mobile-nav {
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 28px rgba(7, 21, 38, .07);
  }
  .mobile-nav button { min-height: 54px; border-radius: 12px; gap: 2px; font-size: 10px; }
  .mobile-nav button svg { width: 21px; height: 21px; }
  .mobile-nav button.active { background: var(--blue-050); }
  .mobile-nav button.active::before { content: ''; position: absolute; top: 1px; width: 24px; height: 3px; border-radius: 0 0 4px 4px; background: var(--blue-600); }
  .fab { right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); width: 54px; height: 54px; border-radius: 17px; }

  /* Page rhythm and typography. */
  .page-head { margin: 2px 0 15px; }
  .page-head.row-between { display: grid; justify-items: start; gap: 13px; }
  .page-head h1 { font-size: clamp(23px, 7vw, 27px); line-height: 1.12; }
  .page-head p { font-size: 13px; line-height: 1.55; margin-top: 5px; }
  .page-head > .btn { min-height: 42px; }
  .main-area .btn-sm { min-height: 40px; }
  .main-area .btn-xs { min-height: 36px; }
  .section-subtitle { font-size: 14px; line-height: 1.62; }
  .metric-cell { padding: 16px; min-width: 0; }
  .metric-cell strong { font-size: clamp(20px, 6vw, 25px); overflow-wrap: anywhere; }

  /* Feed cards. */
  .feed { gap: 13px; }
  .composer { padding: 13px; }
  .composer-trigger { padding-inline: 14px; font-size: 13px; }
  .post { padding: 14px 14px 7px; }
  .post-text { font-size: 14px; line-height: 1.58; }
  .post-image img { width: 100%; max-height: 440px; object-fit: cover; }
  .post-project { padding: 10px; gap: 8px; }
  .post-action { min-height: 44px; }

  /* Discovery and marketplace cards. */
  .market-grid { gap: 13px; }
  .coin-card { padding: 15px; border-radius: 16px; }
  .coin-card-head { gap: 9px; }
  .coin-card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coin-card-actions .btn { width: 100%; padding-inline: 8px; }
  .scroll-x { margin-inline: -15px; padding-inline: 15px; scroll-padding-inline: 15px; }
  .scroll-x > .row { width: max-content; padding-right: 15px; }
  .chip { min-height: 38px; padding-inline: 14px; }
  #market-sort { max-width: none !important; flex: 1 1 150px; }
  .market-table { min-width: 720px; }

  /* Profiles keep all primary actions on one intentional row. */
  .profile-page, .profile-main, .profile-side { gap: 13px; }
  .profile-hero-cover { height: 116px; }
  .profile-hero-body { padding: 0 15px 16px; }
  .profile-hero-top { margin-top: -46px; }
  .avatar-xl { width: 92px; height: 92px; font-size: 28px; }
  .profile-name { font-size: 21px; margin-top: 13px; }
  .profile-headline { font-size: 13.5px; line-height: 1.5; }
  .profile-meta { font-size: 12px; gap: 5px 10px; }
  .profile-counts { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 7px 16px; }
  .profile-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .profile-actions .btn { width: 100%; min-height: 42px; padding-inline: 5px; font-size: 12px; white-space: normal; line-height: 1.15; }
  .profile-section h2 { font-size: 17px; }
  .experience { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
  .experience-icon { width: 38px; height: 38px; }

  /* Project detail and trading. */
  .coin-detail, .coin-detail-main { gap: 13px; }
  .coin-title-wrap { align-items: flex-start; gap: 10px; }
  .coin-logo-lg { width: 58px; height: 58px; border-radius: 16px; }
  .coin-title-wrap h1 { font-size: 20px; }
  .coin-price strong { font-size: 25px; }
  .chart-box { height: 180px; padding: 9px; }
  .geckoterminal-chart-card { height: 430px; border-radius: 12px; }
  .detail-metrics { gap: 7px; }
  .detail-metric { padding: 10px; }
  .coin-hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coin-hero-actions .btn { width: 100%; padding-inline: 8px; }
  .trade-panel { order: 2; }
  .preset-row .btn { padding-inline: 6px; }

  /* Roles, portfolio, notifications, and chat. */
  .job-card { padding: 15px; border-radius: 16px; }
  .job-card-image { height: 156px; margin: -15px -15px 2px; border-radius: 15px 15px 0 0; }
  .holding-row { grid-template-columns: auto minmax(0, 1fr); }
  .holding-row .right { grid-column: 2; text-align: left; display: flex; align-items: center; gap: 8px; }
  .notif-item { grid-template-columns: auto minmax(0, 1fr); padding: 12px; align-items: start; }
  .notif-item > .badge { grid-column: 2; justify-self: start; }
  .thread-item { padding: 12px; }
  .chat-window { height: calc(100dvh - var(--topbar-h) - 118px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); min-height: 420px; border-radius: 16px; }
  .chat-head { padding: 10px 12px; }
  .chat-body { padding: 12px; }
  .bubble { max-width: 86%; font-size: 13.5px; }

  /* Bottom-sheet forms: roomy controls, compact chrome. */
  .modal { max-height: calc(100dvh - env(safe-area-inset-top)); border-radius: 22px 22px 0 0; }
  .modal-head { padding: 15px 14px 12px; }
  .modal-head h2 { font-size: 18px; }
  .modal-body { padding: 14px; }
  .modal-foot { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1 1 0; padding-inline: 10px; }
  .form-section { padding: 13px; margin-bottom: 12px; }
  .form-section > header { align-items: flex-start; margin-bottom: 13px; }
  .form-section > header .step { width: 28px; height: 28px; }
  .form-section > header p { line-height: 1.4; }
  .wallet-row { grid-template-columns: 1fr; }
  .wallet-row .btn { width: 100%; }
  .upload-row { flex-wrap: wrap; gap: 8px; }
  .logo-picker { align-items: flex-start; gap: 12px; }
  .logo-preview { width: 64px; height: 64px; border-radius: 16px; }
  .job-image-preview { min-height: 132px; }
  .job-image-preview img { height: 170px; }
  .fixed-term { align-items: flex-start; }
  .fixed-term strong { max-width: 58%; overflow-wrap: anywhere; }

  /* Landing page spacing tuned for one-handed screens. */
  .landing-nav .container { height: 62px; }
  .landing-hero { padding: 88px 0 52px; }
  .hero-grid { gap: 38px; }
  .hero-title { margin-top: 18px; font-size: clamp(34px, 10.5vw, 46px); }
  .hero-copy { font-size: 15px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { padding-inline: 10px; }
  .hero-proof { gap: 9px 14px; }
  .hero-stats { gap: 6px; }
  .hero-stat { padding: 11px 9px; }
  .hero-profile-card { left: 8px; bottom: -24px; width: min(210px, 68%); }
  .hero-market-card { right: 8px; width: min(170px, 54%); }
  .landing-section { padding: 48px 0; }
  .landing-heading { margin-bottom: 22px; }
  .feature-card { padding: 18px; }
  .landing-cta { padding: 48px 0; }
}

@media (max-width: 359px) {
  .container { padding-inline: 10px; }
  .topbar .btn-sm { padding-inline: 9px; font-size: 12px; }
  .topbar .icon-btn { width: 38px; }
  .profile-counts { gap-x: 12px; }
  .profile-actions { gap: 5px; }
  .profile-actions .btn { font-size: 11.5px; }
  .fixed-term { display: grid; gap: 3px; }
  .fixed-term strong { max-width: none; text-align: left; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .hero-stat strong { margin-top: 0; }
  .geckoterminal-chart-card { height: 390px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================
   Tablet — 700px and up
   ========================================================= */
@media (min-width: 700px) {
  .container { width: min(var(--max), 100% - 40px); }
  :root { --topbar-h: 64px; }
  .brand-text { display: block; }
  .main-area { padding: 20px 0 40px; }
  .mobile-nav, .fab { display: none; }
  .page-head h1 { font-size: 30px; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-strip { grid-template-columns: repeat(4, 1fr); }
  .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-field.full { grid-column: 1 / -1; }
  .modal-backdrop { align-items: center; padding: 20px; }
  .modal { width: min(640px, 100%); border-radius: 18px; max-height: calc(100dvh - 40px); }
  .modal-lg { width: min(860px, 100%); }
  .launch-modal { width: min(920px, 100%); }
  .launch-modal .modal-head { padding: 20px 24px 16px; }
  .launch-modal .modal-head h2 { font-size: 21px; letter-spacing: -.02em; }
  .launch-modal .modal-body { padding: 20px 24px 8px; background: var(--surface-2); }
  .launch-modal .modal-foot { padding: 14px 24px; }
  .launch-modal .modal-foot .btn { min-width: 132px; }
  .launch-form-section {
    display: grid;
    grid-template-columns: minmax(170px, 195px) minmax(0, 1fr);
    column-gap: 24px;
    padding: 22px;
    margin-bottom: 16px;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(7, 21, 38, .025);
  }
  .launch-form-section > header { align-items: flex-start; margin: 2px 0 0; }
  .launch-form-section > header .step { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
  .launch-form-section > header h3 { font-size: 16px; line-height: 1.3; }
  .launch-form-section > header p { margin-top: 4px; font-size: 12px; line-height: 1.5; }
  .launch-section-content { min-width: 0; }
  .launch-modal .form-grid { gap: 16px; }
  .launch-modal .form-field { gap: 7px; }
  .launch-modal .form-field label { font-size: 12px; color: var(--ink); }
  .launch-modal .input,
  .launch-modal .select { height: 44px; font-size: 14px; }
  .launch-modal .textarea { min-height: 128px; font-size: 14px; }
  .launch-logo-picker {
    margin: 0 0 18px;
    padding: 14px;
    border: 1px dashed var(--line-strong);
    border-radius: 13px;
    background: var(--surface-2);
  }
  .launch-logo-picker .logo-preview { width: 68px; height: 68px; border-radius: 16px; background: var(--surface); }
  .launch-modal .fixed-term { padding: 10px 2px; }
  .launch-modal .notice { padding: 12px 14px; }
  .landing-hero { padding: 120px 0 72px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; }
  .hero-photo-wrap img { aspect-ratio: 1 / .92; }
  .landing-section { padding: 76px 0; }
  .product-preview { grid-template-columns: 1fr 1.05fr; }
  .cta-box { grid-template-columns: 1fr auto; align-items: center; }
  .footer-grid { grid-template-columns: 1fr auto; align-items: start; }
  .coin-title-wrap h1 { font-size: 24px; }
  .chart-box { height: 240px; }
  .profile-hero-cover { height: 170px; }
  .profile-hero-top { margin-top: -56px; }
  .avatar-xl { width: 128px; height: 128px; font-size: 36px; }
  .profile-name { font-size: 26px; }
  .toast-root { left: auto; right: 20px; bottom: 20px; width: min(380px, calc(100vw - 40px)); }
  .chain-pill { display: inline-flex; }
}

/* =========================================================
   Wide tablet / small laptop — 940px and up
   ========================================================= */
@media (min-width: 940px) {
  .coin-hero-head { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .coin-price { text-align: right; }
  .coin-title-wrap h1 { font-size: 26px; }
  .detail-metrics { grid-template-columns: repeat(4, 1fr); }
  .portfolio-grid { grid-template-columns: 1.15fr .85fr; align-items: start; }
  .profile-page { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .coin-detail { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
  .trade-panel, .profile-side { position: sticky; top: calc(var(--topbar-h) + 16px); }
}

/* =========================================================
   Desktop — 1000px and up
   ========================================================= */
@media (min-width: 1000px) {
  .nav-links { display: flex; align-items: center; gap: 2px; }
  .topbar-inner { gap: 14px; }
  .search-wrap { max-width: 420px; }
  .app-grid { grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
  .left-rail { display: grid; gap: 14px; position: sticky; top: calc(var(--topbar-h) + 16px); }
  .market-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1240px) {
  .app-grid { grid-template-columns: 240px minmax(0, 1fr) 300px; }
  .right-rail { display: grid; gap: 14px; position: sticky; top: calc(var(--topbar-h) + 16px); }
}
