/* Curve sunrise identity. Shared tokens keep every page and dialog consistent. */
:root, body.relay-terminal {
  --bg: #17131d;
  --panel: #211b29;
  --panel2: #2a2233;
  --inset: #1b1622;
  --line: #3b3044;
  --border: var(--line);
  --text: #fff5e8;
  --muted: #b5a8bf;
  --accent: #ebb58a;
  --red: #f49a9a;
  --sunrise-cream: #fff2bd;
  --sunrise-gold: #f4d797;
  --sunrise-peach: #ebb58a;
  --sunrise-coral: #da7f7d;
  --sunrise-mauve: #b5728e;
  --sunrise-purple: #776e99;
  --token-accent: var(--accent);
  --token-border: var(--line);
  --token-dim: var(--muted);
  --token-surface: var(--panel);
  --token-text: var(--text);
  --coin-muted: var(--muted);
  color-scheme: dark;
}
body.relay-terminal { background: var(--bg); color: var(--text); }
::selection { background: #b5728e80; color: #fff9ee; }
:focus-visible { outline: 2px solid var(--sunrise-gold); outline-offset: 4px; }
body a { text-underline-offset: 3px; }
body a:is(.small-button,.primary,.brand,.sidebar-link,.explore-coin) { text-decoration: none; }
body.relay-terminal .brand { letter-spacing: -1.3px; font-weight: 720; color: var(--sunrise-cream); }
body.relay-terminal .brand-dot { color: var(--sunrise-coral); }
body.relay-terminal .brand .mark, body.relay-terminal .workspace-sidebar .mark { width: 38px; height: 38px; border-radius: 50%; background: transparent; }
body.relay-terminal .workspace-sidebar > .brand { gap: 8px; height: 60px; min-height: 60px; padding-left: 2px; margin-bottom: 24px; font-size: 36px; line-height: 1; white-space: nowrap; }
body.relay-terminal .workspace-sidebar > .brand .mark { width: 52px; height: 52px; flex: 0 0 52px; }
@media (min-width: 1580px) {
  body.relay-terminal .workspace-sidebar > .brand { font-size: 38px; }
  body.relay-terminal .workspace-sidebar > .brand .mark { width: 56px; height: 56px; flex-basis: 56px; }
}
@media (min-width: 821px) and (max-width: 1190px) {
  body.relay-terminal .workspace-sidebar > .brand { padding-left: 2px; gap: 8px; font-size: 31px; height: 54px; min-height: 54px; }
  body.relay-terminal .workspace-sidebar > .brand .mark { width: 44px; height: 44px; flex-basis: 44px; }
}
body.relay-terminal .workspace-sidebar { background: #1c1623; border-color: var(--line); }
body.relay-terminal[data-shell=true] .app-header { background: #1c1623ed; border-color: var(--line); backdrop-filter: blur(14px); }
body.relay-terminal[data-shell=true] .app-header .local { font: 12px var(--sans); letter-spacing: 0; }
body.relay-terminal[data-shell=true] .app-header .small-button { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; font-weight: 600; }
body.relay-terminal .sidebar-label { color: #a395af; letter-spacing: 1.3px; text-transform: uppercase; }
body.relay-terminal .sidebar-utilities, body.relay-terminal .sidebar-footer { border-color: var(--line); }
body.relay-terminal .sidebar-link, body.relay-terminal .workspace-navigation > :is(button,a) { color: #c4b7ce; border-radius: 11px; }
body.relay-terminal .sidebar-link:hover, body.relay-terminal .workspace-navigation > :is(button,a):hover { background: #302539; color: var(--text); }
body.relay-terminal .sidebar-link[aria-current], body.relay-terminal .workspace-navigation > :is(.is-active,[aria-pressed=true],[aria-selected=true]) { background: #3b293a; border-color: #664252; color: #ffd0ae; }
body.relay-terminal .workspace-primary-nav .sidebar-launch { color: #f3bd99; background: linear-gradient(105deg,#4c3043,#31243b); border-color: #714957; }
body.relay-terminal .workspace-primary-nav .sidebar-launch:hover { background: #563448; color: var(--sunrise-cream); border-color: #a66879; }
body.relay-terminal .relay-toolkit > summary { color: #ded0e5; }
body.relay-terminal .relay-toolkit[open] > summary { background: #2d2336; }
body.relay-terminal .small-button { background: #302638; border-color: #51405d; color: #f4e6ed; border-radius: 9px; }
body.relay-terminal .small-button:hover:not(:disabled) { background: #423048; border-color: #966779; }
body.relay-terminal .primary { background: linear-gradient(105deg,#f4d797,#ebb58a 58%,#e69986); color: #2e1d30; font-weight: 700; border: 1px solid #f4cc9d; border-radius: 10px; box-shadow: 0 3px 12px #0002; }
body.relay-terminal .primary:hover:not(:disabled) { background: linear-gradient(105deg,#fff2bd,#f2c092 58%,#eda58e); color: #2e1d30; }
body.relay-terminal .text-button { color: #f1bf9b; }
body button:disabled { box-shadow: none; }
body input, body select, body textarea, body.relay-terminal input, body.relay-terminal select, body.relay-terminal textarea { border-color: var(--line); background: var(--inset); color: var(--text); border-radius: 9px; }
body input::placeholder, body textarea::placeholder { color: #9d8eaa; opacity: 1; }
body input:focus, body select:focus, body textarea:focus { border-color: #c78891; box-shadow: 0 0 0 3px #b5728e24; }
body label, body legend { color: #e0d1e5; }
body.relay-terminal .card, body.relay-terminal .launch-history, body.relay-terminal .launch-form-footer, body.relay-terminal .coin-overview, body.relay-terminal .coin-info, body.relay-terminal .token-info-card { border-color: var(--line); box-shadow: 0 4px 20px #09050e18; }
body.relay-terminal .help, body.relay-terminal .subtitle { line-height: 1.7; }
body dialog, body.relay-terminal .account-dialog, body.relay-terminal .launch-asset-dialog, body.relay-terminal .launch-buy-dialog, body.relay-terminal .tokens-wallet-dialog { background: #251c2d; color: var(--text); border: 1px solid #58425e; box-shadow: 0 24px 80px #08040db3; }
body dialog::backdrop { background: #100a17b3; backdrop-filter: blur(7px); }
body.relay-terminal .account-overview .account-address, body.relay-terminal .account-connection-strip { background: #1c1623; border-color: var(--line); }
body.relay-terminal .account-tabs { overflow-x: auto; scrollbar-width: thin; }
body.relay-terminal .account-tabs :is(button,a) { color: var(--muted); }
body.relay-terminal .account-tabs button[aria-pressed=true] { color: var(--accent); border-color: var(--accent); }
body.relay-terminal .connection-chains button[aria-pressed=true], body.relay-terminal .launch-segments > button[aria-pressed=true], body.relay-terminal .launch-rewards > label:has(:checked) { background: #433040; border-color: #805566; color: #ffe0be; }
body.relay-terminal .launch-segments { background: #1c1623; }
body.launch-page .launch-rewards > label { color: var(--muted); }
body.relay-terminal .launch-token-card { background: radial-gradient(ellipse at 0 0,#67415345,transparent 65%),#241c2b !important; }
body.relay-terminal .launch-upload { background: #291f30; border-color: #866077; }
body.relay-terminal .launch-upload:hover, body.relay-terminal .launch-upload:focus-within { background: #332539; border-color: #d49196; }
body.relay-terminal .launch-upload-art { background: #3b2943; }
body.relay-terminal .launch-upload-button { background: #edb78e; color: #302136; border-color: #edb78e; }
body.relay-terminal .launch-upload-copy { display: grid; gap: 7px; }
body.relay-terminal .launch-upload-copy strong { color: var(--text); }
body.relay-terminal .launch-preview-facts { color: var(--muted); }
body.relay-terminal .launch-progress-dot { background: var(--sunrise-peach); }
body.relay-terminal .launch-toast { background: #2d2335; border-color: #bf8793; color: var(--text); }
body.relay-terminal .coin-chart, body.relay-terminal .token-chart, body.relay-terminal .coin-curve-plot { background: #1b1622; }
body.relay-terminal .coin-chart-controls button[aria-pressed=true] { background: #433040; color: #ffe0be; }
body.relay-terminal .coin-rewards, body.relay-terminal .token-rewards-card { background: linear-gradient(140deg,#39273770,#221b29 70%); border-color: #52394f; }
body.relay-terminal .coin-rewards-metric, body.relay-terminal .coin-rewards-cell { background: #1d1625; border-color: var(--line); }
body progress { accent-color: var(--sunrise-coral); }
body progress::-webkit-progress-bar { background: #46364e; border-radius: 20px; }
body progress::-webkit-progress-value { background: linear-gradient(90deg,#776e99,#b5728e,#ebb58a); border-radius: 20px; }
body progress::-moz-progress-bar { background: linear-gradient(90deg,#776e99,#b5728e,#ebb58a); border-radius: 20px; }
body footer { border-color: var(--line); color: #b9a9bf; letter-spacing: .35px; }
body.relay-terminal .owner-gate { background: var(--panel); border-color: var(--line); }
body.relay-terminal .chain-switch a[aria-current=page] { background: #3b2c41; border-color: #75536d; color: #ffe0b8; }

/* The sunrise lives in the discovery header; market data remains calm and legible. */
.explore-page .explore-intro { position: relative; isolation: isolate; overflow: hidden; min-height: 205px; padding: 32px 34px; border: 1px solid #71506a; border-radius: 22px; background: radial-gradient(ellipse at 83% 118%,#f4d7976b 0%,#da7f7d3d 26%,transparent 58%),linear-gradient(115deg,#34253f,#4d334c 65%,#765268); }
.explore-page .explore-intro::after { content: ''; position: absolute; z-index: -1; width: 360px; height: 360px; right: 3%; top: 65px; border-radius: 50%; background: linear-gradient(165deg,#fff2bd,#ebb58a 38%,#da7f7d 72%); opacity: .14; pointer-events: none; }
.explore-page .explore-intro .eyebrow { color: #f4d797; font-size: 10px; letter-spacing: 1.7px; text-transform: uppercase; }
.explore-page .explore-intro h1 { color: #fff2bd; font-size: clamp(29px,3.1vw,44px); letter-spacing: -1.4px; font-weight: 650; line-height: 1.14; }
.explore-page .explore-intro p:last-child { color: #e2cddd; max-width: 560px; line-height: 1.7; }
.explore-page .explore-controls { background: transparent; }
.explore-page .explore-search { background: #251c2d; border-color: #57415e; border-radius: 14px; }
.explore-page .explore-search:focus-within { border-color: #bd8292; box-shadow: 0 0 0 3px #b5728e20; }
.explore-page .explore-search input { background: transparent; box-shadow: none; border: 0; }
.explore-page .explore-search kbd { background: #382b41; border-color: #594160; color: #d1bed9; }
.explore-page .explore-categories { background: #251c2d; border-color: var(--line); border-radius: 14px; }
.explore-page .explore-categories button { color: #cbbbd3; }
.explore-page .explore-categories button[aria-pressed=true] { background: #473042; color: #ffe0ba; border-color: #835769; }
.explore-page .explore-section { background: #211b29; border-color: #49374f; border-radius: 20px; }
.explore-page .explore-graduated { background: linear-gradient(130deg,#49304733,#211b29 65%); }
.explore-page .explore-moving { background: linear-gradient(130deg,#776e9920,#211b29 65%); }
.explore-page .explore-section-icon { color: #f4d797; }
.explore-page .explore-moving .explore-section-icon { color: #c0a8db; }
.explore-page .explore-section-heading p, .explore-page .explore-section-tag { color: #bdaec1; }
.explore-page .explore-count { background: #3f2d40; color: #f6c0a3; border-color: #604459; }
.explore-page .explore-coin { padding: 9px; border-radius: 16px; background: #2a2132; border-color: #47334f; }
.explore-page .explore-coin:hover { background: #342739; border-color: #a06c87; box-shadow: 0 9px 24px #0d071b36; }
.explore-page .explore-coin-image { background: linear-gradient(145deg,#776e9960,#b5728e45 60%,#ebb58a30); border-radius: 11px; }
.explore-page .explore-coin-image > span:first-child { color: #f3d4c7; }
.explore-page .explore-coin-badge { background: #271b32e8; color: #fff1e6; border-color: #ffffff24; border-radius: 7px; }
.explore-page .explore-coin-badge.is-moving { background: #5c3a50ee; color: #ffe0ae; border-color: #c491884d; }
.explore-page .explore-coin-body { padding: 12px 4px 3px; }
.explore-page .explore-coin-name { font-size: 14px; font-weight: 650; }
.explore-page .explore-coin-symbol, .explore-page .explore-coin-value small, .explore-page .explore-coin-secondary, .explore-page .explore-coin-footer, .explore-page .explore-coin-status { color: #bbaac5; }
.explore-page .explore-coin-secondary .explore-coin-pair { color: #dfc6d8; }
.explore-page .explore-coin-footer { border-color: #4c3851; }
.explore-page .explore-coin-age, .explore-page .explore-coin-age.is-recent { color: #f2c49f; }
.explore-page .explore-skeleton .explore-coin-image { background: #3c2c46; }
.explore-page .explore-empty { background: #261d2d; border-color: #503b58; }
.explore-page .explore-pagination button { background: #2d2235; border-color: var(--line); color: var(--text); }
.explore-page .explore-pagination button[aria-current] { background: #58394a; color: #ffe0bb; }

/* Keep action labels readable on narrow screens and avoid duplicate destinations. */
body[data-shell=true] .app-header .header-help { display: none; }
body.launch-page .launch-venue { text-transform: none; }
body.launch-page .launch-section { padding: 23px; }
body.launch-page .launch-fields { gap: 17px; }
body.launch-page .launch-form-footer { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px 16px; }
body.launch-page .launch-form-footer .launch-wallet-line { margin: 0; flex-wrap: wrap; }
body.launch-page .launch-form-footer .primary { margin: 0; min-width: 150px; }
body.launch-page .launch-form-footer .launch-fine { grid-column: 1/-1; margin-top: 8px; }
@media (max-width: 850px) {
  body.relay-terminal .workspace-primary-nav { background: #211829f5; border-color: #5a3b59; backdrop-filter: blur(16px); }
  body.relay-terminal .workspace-primary-nav .relay-toolkit[open] > .workspace-navigation { background: #271c30; border-color: #72526e; }
  body.relay-terminal[data-shell=true] .app-header .local { min-width: 0; }
  body.relay-terminal[data-shell=true] .app-header .small-button { max-width: 165px; }
  .explore-page .explore-intro { min-height: 180px; padding: 26px; }
}
@media (max-width: 560px) {
  body.relay-terminal .brand .mark { width: 33px; height: 33px; }
  body.relay-terminal[data-shell=true] .app-header .small-button { max-width: 135px; font-size: 11px; }
  .explore-page .explore-intro { min-height: 175px; padding: 23px 20px; border-radius: 17px; }
  .explore-page .explore-intro h1 { font-size: 30px; max-width: 290px; }
  .explore-page .explore-intro p:last-child { font-size: 12px; max-width: 290px; }
  .explore-page .explore-intro::after { right: -190px; top: 15px; }
  .explore-page .explore-section { padding: 14px; border-radius: 16px; }
  .explore-page .explore-coin { padding: 7px; border-radius: 12px; }
  .explore-page .explore-coin-body { padding: 10px 2px 2px; }
  .explore-page .explore-coin-name { font-size: 13px; }
  body.launch-page .launch-form-footer { grid-template-columns: 1fr; gap: 13px; }
  body.launch-page .launch-section { padding: 17px; }
  body input, body select, body textarea { scroll-margin-top: 95px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  body.relay-terminal .explore-coin, body button, body a { transition: none !important; }
}

body.relay-terminal[data-shell=true] .app-header > .local { margin-left: auto; }
body.relay-terminal .coin-avatar, body.relay-terminal .token-avatar { background: linear-gradient(140deg,#584361,#34273f); color: #fff2bd; }
body.relay-terminal .coin-stage, body.relay-terminal .token-status.is-live { background: #443342; border-color: #785867; color: #f4d797; }
body.relay-terminal .coin-progress-wrap progress, body.relay-terminal .explore-progress { background: #46364e; }
body.relay-terminal .coin-page .text-button { color: #edbf9d; }

body.relay-terminal .card { background: var(--panel); border-color: var(--line); }
body.relay-terminal .small-button { text-decoration: none; }
body.relay-terminal .text-button { color: #f1bf9b; }
body.relay-terminal label { color: #d2c3d5; }
body.relay-terminal .launch-preview-image { background: #44304b; color: #f6d2bd; }
body.relay-terminal .launch-preview-facts dt { color: var(--muted); }
body.relay-terminal .launch-preview-facts dd { color: var(--text); }
body.relay-terminal .launch-auto-fee { background: #302334; border-color: #64485e; }
body.relay-terminal .launch-auto-fee > span { color: #c4b3cc; }
body.relay-terminal .launch-auto-fee > strong { color: #f4d797; }
body.relay-terminal .mainnet-badge { background: #41303f; border-color: #715267; color: #f5cfaf; }
body.relay-terminal .explore-filter-row select { background: var(--inset); border-color: var(--line); }
body.relay-terminal .explore-refresh { background: #302638; border-color: #51405d; color: #f4e6ed; }
body.relay-terminal .explore-progress-row progress { background: #46364e; }
body.relay-terminal .explore-progress-row progress::-webkit-progress-bar { background: #46364e; }
body.relay-terminal .explore-progress-row progress::-webkit-progress-value { background: linear-gradient(90deg,#776e99,#b5728e,#ebb58a); }
body.relay-terminal .explore-progress-row progress::-moz-progress-bar { background: linear-gradient(90deg,#776e99,#b5728e,#ebb58a); }
body.relay-terminal :is(.admin-overview > div,.admin-card,.admin-fee-form,.admin-user-row,.admin-session-detail,.admin-session-metrics,.admin-gate,.admin-protocol-facts > div,.admin-protocol-coin,.admin-protocol-gas,.admin-branding-target) { background: var(--panel); border-color: var(--line); }
body.relay-terminal .admin-card :is(.launch-admin-create,.launch-admin-row) { background: var(--inset); border-color: var(--line); }
body.relay-terminal .admin-session-users button { background: var(--panel2); border-color: var(--line); color: var(--text); }
body.relay-terminal .workspace-summary, body.relay-terminal .token-search > div { background: var(--panel); border-color: var(--line); }
body.relay-terminal .overview-stat { border-color: var(--line); }
body.relay-terminal .overview-network { color: #f4d797; }
body.relay-terminal .terminal-rail :is(.manual-card,#rh-manual-card,.execution-preset-card) { background: var(--panel); border-color: var(--line); }
body.relay-terminal .terminal-rail :is(.manual-card,#rh-manual-card) :is(input,select,.manual-wallet-menu) { background: var(--inset); border-color: var(--line); }
body.relay-terminal .execution-preset-tabs button { background: var(--panel2); border-color: var(--line); color: var(--muted); }
body.relay-terminal .execution-preset-tabs button[aria-pressed=true] { background: #473042; border-color: #835769; color: #ffe0ba; }
body.relay-terminal .chart-empty > span { display:block; width:54px; height:54px; font-size:0; border:0; background:transparent url('/curve-icon.png?v=17') center/contain no-repeat; border-radius:50%; }
body.relay-terminal .chart-empty strong { color: #ebd6e4; }
body.relay-terminal .coin-rewards-secondary > div { background: var(--inset); border-color: var(--line); }
body.relay-terminal .coin-rewards-primary > div { border-color: var(--line); }
body.relay-terminal .coin-rewards-schedule:not(:empty) { background: #342637; border-color: #63455d; color: #d4bed4; }
body.relay-terminal :is(.coin-rewards-mode,.coin-reward-value-row > span,.coin-rewards-latest) { color: #cdbbce; }
body.relay-terminal .coin-progress-wrap progress::-webkit-progress-bar { background: #46364e; }
body.relay-terminal .positive { color: #bbecbf !important; }

.creator-row{display:flex;align-items:center;gap:10px;padding:16px 20px;margin-bottom:16px;border:1px solid var(--line);border-radius:16px;background:var(--panel)}.creator-row>span{color:var(--muted);margin-right:auto}.creator-avatar{width:32px;height:32px;border-radius:50%;object-fit:cover}.creator-row strong{overflow-wrap:anywhere}#profile-form{display:grid;gap:14px}#profile-form label{display:grid;gap:8px}#profile-preview{width:80px;height:80px}#profile-form input,#profile-form textarea{width:100%;box-sizing:border-box}
.creator-row a{color:var(--accent);font-weight:600;text-decoration:none}.creator-row a:hover{text-decoration:underline}.creator-page main{max-width:1400px;margin:0 auto;padding:32px 24px}.creator-profile{display:flex;gap:24px;align-items:center;margin-bottom:36px}.creator-profile>.creator-avatar{width:96px;height:96px}.creator-profile p{white-space:pre-wrap;overflow-wrap:anywhere}.creator-coins{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px;margin:24px 0}.creator-coin{display:block;text-decoration:none;color:var(--text);padding:16px;border:1px solid var(--line);border-radius:20px;background:var(--panel)}.creator-coin:hover{border-color:var(--accent)}.creator-coin img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:12px}.creator-coin h3,.creator-coin p{overflow-wrap:anywhere}.creator-coin p{color:var(--muted)}.creator-section-title,#creator-pages{display:flex;justify-content:space-between;gap:12px;align-items:center}#creator-count{font-size:.7em;color:var(--muted)}

.creator-profile>div{min-width:0}.creator-profile h1{overflow-wrap:anywhere}.creator-profile>.creator-avatar{flex:0 0 96px}.creator-coin{min-width:0}@media(max-width:600px){.creator-page main,.wallet-account-page main{padding:24px 16px}.creator-profile{align-items:flex-start;gap:14px}.creator-profile>.creator-avatar{width:64px;height:64px;flex-basis:64px}.creator-profile h1{font-size:26px}.creator-coins{grid-template-columns:repeat(auto-fill,minmax(min(220px,100%),1fr))}}
/* Explore dashboard overrides replace the old promotional hero. */
body.explore-page #explore-main .explore-intro{display:none}
body.explore-page .explore-dashboard{margin-top:24px}
body.explore-page .explore-section{background:transparent;border:0;border-radius:0;padding:0}
body.explore-page .explore-coin{padding:0;border-radius:14px;background:var(--panel)}
body.explore-page .explore-coin-image{border-radius:0}
body.explore-page .explore-coin-body{padding:14px}
body.explore-page .explore-featured h2,body.explore-page .explore-contenders h2,body.explore-page .explore-leaders h2{font-family:var(--sans,Arial,sans-serif)}
body.explore-page :is(h1,h2,h3),body.explore-page .explore-mini-coin strong,body.explore-page .explore-feature-stats strong{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}

.coin-page .coin-address-row{flex-wrap:wrap;row-gap:10px}.coin-page .coin-creator-compact{display:inline-flex;align-items:center;gap:7px;padding:5px 9px;margin:0 0 0 6px;border-radius:8px;max-width:250px;min-width:0;font-size:12px}.coin-page .coin-creator-compact[hidden]{display:none}.coin-page .coin-creator-compact>span{margin:0;font-size:11px}.coin-page .coin-creator-compact .creator-avatar{width:22px;height:22px;flex-shrink:0}.coin-page .coin-creator-compact a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.coin-page .coin-description-section{margin-top:18px;font-size:13px}.coin-page .coin-description-section>strong{font-size:12px;color:var(--text)}.coin-page .coin-description-section .coin-description{margin-top:6px}@media(max-width:540px){.coin-page .coin-creator-compact{margin-left:0;max-width:100%}}

/* Compact header navigation: shared desktop/mobile shell, without a sidebar. */
body.relay-terminal[data-navigation=top] { padding:0; --sidebar:0px; }
body.relay-terminal[data-navigation=top] main,body.relay-terminal[data-navigation=top] #explore-main { width:100%; max-width:1240px; margin:0 auto; padding:28px 20px 40px; min-height:calc(100dvh - 150px); }
body.relay-terminal[data-navigation=top] .app-header { display:block; height:auto; min-height:0; padding:0 20px; position:sticky; top:0; z-index:60; }
body[data-navigation=top] .workspace-header-inner { display:flex; align-items:center; gap:26px; width:100%; max-width:1200px; min-height:76px; margin:0 auto; }
body.relay-terminal[data-navigation=top] .app-header .brand { display:flex; align-items:center; flex-shrink:0; gap:9px; margin:0; padding:0; font-size:30px; line-height:1; }
body.relay-terminal[data-navigation=top] .app-header .brand .mark { width:38px; height:38px; flex:0 0 38px; }
body[data-navigation=top] .workspace-primary-nav { position:static; inset:auto; display:flex; align-items:center; gap:12px; flex-shrink:0; padding:0; background:none; border:0; backdrop-filter:none; }
body[data-navigation=top] .workspace-primary-nav>a { display:flex; align-items:center; gap:7px; min-height:37px; padding:8px 11px; border:1px solid transparent; border-radius:9px; color:var(--muted); font:600 12px var(--sans); text-decoration:none; white-space:nowrap; }
body[data-navigation=top] .workspace-primary-nav>a:hover,body[data-navigation=top] .workspace-primary-nav>.top-explore[aria-current] { color:var(--text); background:var(--panel2); }
body[data-navigation=top] .workspace-primary-nav>.top-launch { color:#2e1d30; background:linear-gradient(105deg,#f4d797,#ebb58a 58%,#e69986); border-color:#f4cc9d; }
body[data-navigation=top] .workspace-primary-nav>.top-launch:hover { color:#2e1d30; background:#f4d797; }
body[data-navigation=top] .tool-icon { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
body.relay-terminal[data-navigation=top] .app-header .local { margin-left:auto; display:flex; align-items:center; gap:10px; min-width:0; }
body[data-navigation=top] .relay-toolkit { position:relative; margin:0; border:0; padding:0; background:none; flex-shrink:0; }
body[data-navigation=top] .relay-toolkit>summary { display:flex; align-items:center; gap:8px; list-style:none; cursor:pointer; min-height:37px; padding:8px 11px; background:var(--panel2); border:1px solid var(--line); border-radius:9px; font:600 12px var(--sans); white-space:nowrap; }
body[data-navigation=top] .relay-toolkit>summary::-webkit-details-marker { display:none; }
body[data-navigation=top] .relay-toolkit>summary:hover,body[data-navigation=top] .relay-toolkit[open]>summary { border-color:#92647c; background:#382940; }
body[data-navigation=top] .relay-toolkit .toolkit-chevron { width:12px; height:12px; margin:0; }
body[data-navigation=top] .toolkit-panel { position:absolute; top:calc(100% + 12px); right:0; width:280px; max-width:calc(100vw - 32px); max-height:calc(100dvh - 104px); overflow-y:auto; background:#251d2e; border:1px solid #61465c; padding:9px; border-radius:14px; box-shadow:0 18px 60px #08040d80; }
body[data-navigation=top] .relay-toolkit:not([open])>.toolkit-panel { display:none; }
body.relay-terminal[data-navigation=top] .workspace-navigation { position:static; inset:auto; width:100%; display:flex; flex-direction:column; gap:3px; padding:0; margin:0; border:0; background:none; overflow:visible; }
body.relay-terminal[data-navigation=top] .workspace-navigation>:is(a,button),body.relay-terminal[data-navigation=top] .toolkit-admin { display:flex; align-items:center; justify-content:flex-start; flex-direction:row; gap:10px; width:100%; min-height:41px; padding:9px 11px; border:1px solid transparent; border-radius:8px; font:500 12px var(--sans); text-align:left; text-decoration:none; color:#d8c9e0; background:none; }
body.relay-terminal[data-navigation=top] .workspace-navigation>:is(a,button):hover,body.relay-terminal[data-navigation=top] .toolkit-admin:hover { color:var(--text); background:#3a2b43; }
body.relay-terminal[data-navigation=top] .workspace-navigation>:is(.is-active,[aria-pressed=true],[aria-selected=true]) { background:#432f40; color:#ffd0ae; border-color:#714b61; }
body[data-navigation=top] .workspace-navigation>.is-active:after { display:none; }
body.relay-terminal[data-navigation=top] .workspace-navigation>[data-account-connection] { border-top:1px solid var(--line); border-radius:0 0 8px 8px; margin-top:5px; padding-top:12px; }
body[data-navigation=top] .toolkit-networks { display:grid; gap:8px; margin:8px 0 0; padding:12px 3px 3px; border-top:1px solid var(--line); }
body[data-navigation=top] .toolkit-networks>span { color:var(--muted); padding-left:8px; font-size:10px; }
body.relay-terminal[data-navigation=top] .app-header .chain-switch { display:flex; width:100%; padding:3px; gap:3px; }
body.relay-terminal[data-navigation=top] .app-header .chain-switch>a { flex:1; width:auto; min-height:34px; padding:6px; font-size:11px; }
body.relay-terminal[data-navigation=top] .app-header .toolkit-admin:not([hidden]) { display:flex!important; max-width:none; margin-top:7px; border-top:1px solid var(--line); border-radius:0 0 8px 8px; color:var(--accent); font-size:12px; }
body.relay-terminal[data-navigation=top] .app-header .header-account { display:inline-flex; align-items:center; gap:8px; padding:5px 10px 5px 5px; min-height:37px; max-width:180px; }
body.relay-terminal[data-navigation=top] .app-header .header-account[hidden] { display:none; }
body[data-navigation=top] .header-account-avatar { display:grid; place-items:center; width:25px; height:25px; flex:0 0 25px; overflow:hidden; border-radius:50%; background:linear-gradient(140deg,#776e99,#b5728e); color:#fff5e8; font-size:12px; font-weight:700; }
body[data-navigation=top] .header-account-avatar>img { display:block; width:100%; height:100%; object-fit:cover; }
body[data-navigation=top] .header-account-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.relay-terminal[data-navigation=top] footer { max-width:1240px; margin:0 auto; padding:22px 20px; }
body[data-navigation=top] .skip-link { left:16px; }
@media(min-width:1000px) { body[data-navigation=top].explore-page:not(.explore-list-view) .explore-grid { grid-template-columns:repeat(5,minmax(0,1fr)); } }
@media(max-width:1000px) { body[data-navigation=top] .workspace-header-inner { gap:16px; } body[data-navigation=top] .explore-network { display:none; } }
@media(max-width:700px) {
  body.relay-terminal[data-navigation=top] .app-header { padding:0 16px; }
  body[data-navigation=top] .workspace-header-inner { flex-wrap:wrap; gap:12px; padding:13px 0 10px; }
  body.relay-terminal[data-navigation=top] .app-header .brand { font-size:26px; gap:7px; }
  body.relay-terminal[data-navigation=top] .app-header .brand .mark { width:32px; height:32px; flex-basis:32px; }
  body[data-navigation=top] .workspace-primary-nav { order:3; width:100%; gap:8px; padding-top:2px; }
  body[data-navigation=top] .workspace-primary-nav>a { min-height:34px; padding:7px 11px; font-size:11px; }
  body[data-navigation=top] .workspace-primary-nav>.top-launch { margin-left:auto; }
  body.relay-terminal[data-navigation=top] .app-header .local { gap:7px; }
  body[data-navigation=top] .relay-toolkit>summary { min-height:35px; padding:7px 9px; font-size:11px; gap:5px; }
  body[data-navigation=top] .relay-toolkit>summary>.tool-icon:first-child { display:none; }
  body[data-navigation=top] .toolkit-panel { position:fixed; top:64px; right:16px; max-height:calc(100dvh - 84px); }
  body.relay-terminal[data-navigation=top] .app-header .small-button { min-height:35px; max-width:130px; padding:6px 9px; font-size:11px; }
  body.relay-terminal[data-navigation=top] .app-header .header-account { gap:6px; padding:4px 8px 4px 4px; }
  body.relay-terminal[data-navigation=top] main,body.relay-terminal[data-navigation=top] #explore-main { padding:22px 16px 32px; }
  body.relay-terminal[data-navigation=top] footer { padding:20px 16px; }
}
@media(max-width:390px) { body[data-navigation=top] .workspace-header-inner { gap:8px; } body.relay-terminal[data-navigation=top] .app-header .header-account { max-width:115px; } }

/* Header actions stay together; accounts open above the current page. */
body[data-navigation=top] .workspace-header-inner .top-launch { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:37px; padding:8px 12px; border:1px solid #f4cc9d; border-radius:9px; background:linear-gradient(105deg,#f4d797,#ebb58a 58%,#e69986); color:#2e1d30; font:650 12px var(--sans); text-decoration:none; white-space:nowrap; }
body[data-navigation=top] .workspace-header-inner .top-launch:hover { background:#f4d797; }
body[data-navigation=top] .relay-toolkit>summary { width:38px; min-height:37px; padding:9px; justify-content:center; }
body[data-navigation=top] .relay-toolkit>summary>.tool-icon:first-child { display:block; width:18px; height:18px; }
body.relay-terminal .public-account-dialog { width:min(700px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); padding:26px; overflow:auto; }
.public-account-dialog [hidden] { display:none!important; }
.public-account-dialog .card-heading { position:sticky; top:-26px; padding:8px 0 14px; background:#251c2d; z-index:1; }
.public-account-dialog [data-profile] { display:grid; gap:12px; }
.public-account-dialog [data-profile]>.help { margin:0; }
.public-account-dialog [data-profile]>.primary { justify-self:start; min-height:39px; padding:9px 18px; }
.public-account-dialog .public-profile-photo { display:flex; align-items:center; gap:15px; }
.public-account-dialog .public-profile-photo>img { width:64px; height:64px; object-fit:cover; border-radius:50%; flex:0 0 64px; }
.public-account-dialog .public-profile-photo>div { flex:1; min-width:0; }
.public-account-dialog input[type=file] { width:100%; min-width:0; font-size:12px; }
.public-account-dialog .account-address,.public-account-dialog .cashback-summary { overflow-wrap:anywhere; }
.public-account-dialog [data-export-controls] { margin-top:16px; }
.public-account-dialog [data-export-result] { margin-top:12px; }
@media(max-width:700px) {
  body[data-navigation=top] .workspace-primary-nav { order:0; width:auto; padding:0; margin-right:auto; }
  body.relay-terminal[data-navigation=top] .app-header .local { order:2; width:100%; justify-content:flex-end; }
  body[data-navigation=top] .workspace-header-inner .top-launch { min-height:35px; padding:7px 10px; font-size:11px; }
  body[data-navigation=top] .relay-toolkit>summary { width:35px; height:35px; min-height:35px; padding:8px; }
  body[data-navigation=top] .toolkit-panel { top:111px; max-height:calc(100dvh - 131px); }
  body.relay-terminal .public-account-dialog { width:calc(100vw - 20px); max-height:calc(100dvh - 24px); padding:18px; }
  .public-account-dialog .card-heading { top:-18px; }
}

/* Wallet sign-in and password sign-in are separate alternatives. */
body.relay-terminal .signin-dialog { width:min(430px,calc(100vw - 24px)); max-height:calc(100dvh - 32px); padding:26px; overflow:auto; }
.signin-dialog [hidden] { display:none!important; }
.signin-dialog .card-heading { gap:18px; }
.signin-dialog h2 { margin:0; font-size:23px; }
.signin-dialog .signin-wallet { display:flex; justify-content:center; width:100%; min-height:44px; margin-top:20px; }
.signin-dialog .signin-wallet-note { font-size:12px; text-align:center; line-height:1.65; }
.signin-dialog .signin-divider { display:flex; align-items:center; gap:15px; margin:24px 0; color:var(--muted); font-size:11px; font-weight:650; letter-spacing:1px; }
.signin-dialog .signin-divider::before,.signin-dialog .signin-divider::after { content:''; flex:1; height:1px; background:var(--line); }
.signin-dialog .signin-manual-heading { margin:0 0 17px; font-size:14px; font-weight:650; }
.signin-dialog form { display:grid; gap:15px; }
.signin-dialog form label { font-size:12px; }
.signin-dialog form input { margin-top:5px; }
.signin-dialog [data-message]:empty { display:none; }
.signin-dialog form>.primary { justify-content:center; min-height:42px; }
.signin-dialog [data-mode] { display:block; margin:17px auto 0; font-size:12px; }
.signin-wallets { display:grid; gap:8px; margin-top:12px; }
.signin-wallets>.small-button { min-height:40px; width:100%; }
@media(max-width:500px) { body.relay-terminal .signin-dialog { padding:21px; } .signin-dialog h2 { font-size:21px; } }

.cashback-wallet-settings [hidden] { display:none!important; }
.cashback-wallet-settings form { margin-top:18px; display:grid; gap:12px; }
.cashback-wallet-settings .account-address { overflow-wrap:anywhere; }
.cashback-wallet-settings .account-actions { flex-wrap:wrap; }
.cashback-wallet-settings input { width:100%; min-width:0; }
.cashback-wallet-settings [data-cbw-message]:empty { display:none; }

/* Optional legacy tools stay absent until an explicit host feature flag loads. */
body:not([data-toolkit="true"]) .relay-toolkit,.relay-toolkit[hidden] { display:none!important; }
body[data-navigation=top] .header-admin { display:inline-flex; align-items:center; gap:7px; white-space:nowrap; }
body[data-navigation=top] .header-admin .tool-icon { width:16px; height:16px; }
@media(max-width:600px) { body[data-navigation=top] .header-admin { padding:8px; } body[data-navigation=top] .header-admin span { display:none; } }

body.relay-terminal[data-navigation=top] { min-height:100dvh; display:flex; flex-direction:column; }
body.relay-terminal[data-navigation=top] .app-header { flex-shrink:0; }
body.relay-terminal[data-navigation=top] .app-header .header-admin:not([hidden]) { display:inline-flex!important; }
body.relay-terminal[data-navigation=top] footer.site-footer { display:block; max-width:none; margin: auto 0 0; padding:0 20px; width:100%; border-top:1px solid var(--line); color:var(--muted); font:12px var(--sans); }
.site-footer-inner { display:flex; align-items:center; gap:24px; width:100%; max-width:1200px; min-height:80px; margin:0 auto; padding:18px 0; }
.site-footer-brand { color:var(--text); font-size:20px; font-weight:750; letter-spacing:-1px; text-decoration:none; }
.site-footer-links { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:10px 22px; margin-left:auto; }
.site-footer-links a { color:var(--muted); padding:10px 0; text-decoration:none; }
.site-footer-links a:hover,.site-footer-links a:focus-visible { color:var(--accent); }
.site-footer-social { display:inline-flex; align-items:center; justify-content:center; min-width:38px; min-height:38px; border:1px solid var(--line); border-radius:9px; color:var(--text); font-size:17px; text-decoration:none; }
.site-footer-social:hover,.site-footer-social:focus-visible { background:var(--panel2); border-color:var(--accent); }
@media(max-width:540px) { .site-footer-inner { flex-wrap:wrap; gap:10px 18px; padding:18px 0; } .site-footer-links { order:3; flex-basis:100%; margin:0; justify-content:flex-start; gap:8px 22px; } .site-footer-social { margin-left:auto; } }
