/* Nodora shared UI: one palette, spacing scale and component language. */
:root{
 --ui-accent:linear-gradient(110deg,#2469ff,#7047e8);
 --ui-accent-soft:linear-gradient(110deg,#2580ff18,#7a4df218);
 --ui-radius-panel:14px;--ui-radius-control:10px;--ui-radius-small:8px;
 --ui-space-1:4px;--ui-space-2:8px;--ui-space-3:12px;
 --ui-space-4:16px;--ui-space-6:24px;--ui-space-8:32px;
 --ui-shadow-menu:0 16px 44px #0005;
 --ui-focus:#9eaeff;--ui-field:#0b1324;--ui-hover:#18233b;
 --ui-joined-bg:#1d2942;--ui-joined-text:#d7e2ff;
}
body[data-theme="light"]{
 --ui-field:#f6f8fe;--ui-hover:#edf1fc;--ui-focus:#475bd6;
 --ui-shadow-menu:0 16px 40px #23305a1a;
 --ui-joined-bg:#e7eefc;--ui-joined-text:#28427b;
}
body:has(.app){
 --type-body-leading:22px;--type-control-leading:20px;
 font-size:15px;line-height:1.47;-webkit-font-smoothing:antialiased;
}
body .app :is(h1,h2,h3,h4){letter-spacing:-.025em;font-weight:700}
body .app :is(.news-page-heading,.market-page-heading,.spaces-hero-copy,.launch-heading) h2,
body #page-messages> .card>h2{font-size:22px!important;line-height:28px!important}
body .app :is(.news-page-heading,.market-page-heading) p{margin:6px 0 0;color:var(--muted)}
body .app :is(.news-page-heading,.market-page-heading){align-items:center;gap:12px}
body .app .desktop-panel h3{font-size:14px!important;line-height:20px!important;letter-spacing:-.01em}

/* Decorative banners and chart surfaces keep their artwork and data colours. */
body .app :is(.card:not(.post):not(.feed-sponsored):not(.feed-promoted-launch):not(.feed-network-ad),
 .desktop-panel,.official-discovery-card,.community-discovery-card,.your-space-tile){
 border-radius:var(--ui-radius-panel)!important;border-color:var(--line);
}
body .app :is(.desktop-panel,.right-card){padding:var(--ui-space-4)}
body .app :is(.desktop-panel,.notification-panel,.header-dropdown){background-color:var(--panel)}
body .app :is(.profile-stat,.stat,.purchase-summary,.news-preview,.launch-empty){border-radius:var(--ui-radius-control)}
body .app :is(.space-grid,.community-grid,.news-grid,.launch-list){align-items:start}
body .app .news-card{padding:var(--ui-space-4)!important}
body .app .news-card h3{line-height:1.4!important}
body .app :is(.news-card,.launch-card) :is(.news-credit,.small){color:var(--muted)}
body .app .profile-hero{padding:var(--ui-space-6)}

/* Shared controls. Compact chart/post controls retain their dedicated dimensions. */
body .app :is(.btn,.chip,.desktop-pill,.directory-join,.growth-manage>summary){
 border-radius:var(--ui-radius-control)!important;font-weight:600;
 transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease;
}
body .app .btn{min-height:40px;line-height:20px;padding:9px 14px}
body .app :is(.btn.primary,.chip.active,.chip[aria-pressed="true"],.account-pill,
 #spaceDirectory .directory-join:not(.is-joined),.spaces-explore){
 background:var(--ui-accent)!important;color:#fff!important;border-color:transparent!important;
}
body .app :is(.btn.ghost,.chip:not(.active):not([aria-pressed="true"]),.desktop-pill){
 background:var(--ui-field);color:var(--text);border-color:var(--line);
}
body .app #spaceDirectory .directory-join{min-height:34px;padding:6px 10px;font-weight:650}
body .app #spaceDirectory .directory-join.is-joined{background:var(--ui-joined-bg);color:var(--ui-joined-text);border-color:var(--line)}
body .app :is(.spaces-explore,.image-upload-button){border-radius:var(--ui-radius-control)!important}
body .app .ui-icon{stroke-width:1.8}

/* Native text inputs use the same inset, surface and focus treatment. */
body .app :is(.input,.search input,#contractInput,.auth-field input,.chat-input,.social-reply-form input){
 border:1px solid var(--line);border-radius:var(--ui-radius-control)!important;
 background-color:var(--ui-field)!important;color:var(--text);min-height:42px;
 padding:10px 12px;line-height:22px;box-shadow:none;
}
body .app :is(input,textarea)::placeholder{color:var(--muted);opacity:.85}
body .app :is(input,textarea,select):focus-visible{
 outline:2px solid var(--ui-focus)!important;outline-offset:2px;
}
body .app :is(button,a,summary,[tabindex="0"]):focus-visible{
 outline:2px solid var(--ui-focus);outline-offset:3px;
}
body .app :is(button,a,summary):disabled{cursor:not-allowed}

/* Dropdowns and dialogs share a clear edge without changing scrolling/positioning. */
body .app :is(.growth-manage>.growth-actions,.feed-sort-menu,.post-options-menu,
 .search-results,.mention-picker,.header-dropdown){
 background:var(--panel)!important;border:1px solid var(--line);
 border-radius:var(--ui-radius-panel)!important;box-shadow:var(--ui-shadow-menu)!important;
}
body .app :is(.growth-actions,.feed-sort-menu,.post-options-menu,.header-dropdown) button{
 white-space:normal;text-align:left;line-height:20px;overflow-wrap:anywhere;
}
body .app :is(.feed-sort-menu,.post-options-menu,.header-dropdown) button{
 min-height:40px;padding:10px 12px;border-radius:var(--ui-radius-small);
}
body .app .wallet-choice{border-radius:var(--ui-radius-control)!important;line-height:1.4}
body .app .modal .modal-card{border-radius:var(--ui-radius-panel)!important;border-color:var(--line)}
body .app .modal-card>.close{width:40px;height:40px;display:grid;place-items:center;border-radius:var(--ui-radius-small)}
body .app :is(.notification-item,.message-item){border-radius:var(--ui-radius-control);line-height:1.45}
body .app .notification-item{padding:12px!important}
body .app .notification-item p{line-height:1.45}
body .app #notificationsPanel .btn{white-space:normal}

/* A single navigation treatment on desktop and mobile. */
body .app .nav button{font-weight:600;border-radius:var(--ui-radius-control)}
body .app .nav button.active{background:var(--ui-accent-soft)!important;color:var(--text)!important}
body .app .nav button:not(.active) .ico{background:transparent;border-color:transparent;color:var(--muted)}
body .app .nav button.active .ico{background:var(--ui-accent);color:#fff;border-color:transparent}
body .app .topbar :is(.header-messages,.notification-button,.theme-toggle){border-radius:var(--ui-radius-control)!important}
body .app .account-pill{border-radius:var(--ui-radius-control)!important}
@media(max-width:1099px){
 body .app .bottomnav{grid-template-columns:repeat(5,minmax(0,1fr));padding:8px;gap:4px;border-radius:16px!important}
 body .app .bottomnav button{
  display:grid;grid-template-rows:30px 14px;justify-items:center;align-content:center;
  min-height:60px;padding:5px 2px;gap:4px;line-height:14px;text-align:center;border-radius:10px!important;
 }
 body .app .bottomnav .ico{
  display:grid;place-items:center;flex:none;width:30px;height:30px;
  margin:0;line-height:1;border-radius:8px;
 }
 body .app .bottomnav .ico svg{display:block;width:22px;height:22px;margin:0}
 body .app .profile-hero{padding:16px}
}
@media(hover:hover){
 body .app :is(.btn.ghost,.chip:not(.active):not([aria-pressed="true"]),.desktop-pill,.nav button:not(.active)):hover{
  background:var(--ui-hover);border-color:#667aad;color:var(--text);
 }
 body .app :is(.btn.primary,#spaceDirectory .directory-join:not(.is-joined)):hover{box-shadow:0 4px 14px #5364e02a}
 body .app :is(.feed-sort-menu,.post-options-menu,.header-dropdown) button:hover{background:var(--ui-hover)}
}
@media(prefers-reduced-motion:reduce){body .app :is(.btn,.chip,.desktop-pill,.directory-join,.growth-manage>summary){transition:none}}

/* Public guides/discussions use the same brand and component language. */
body:not(:has(.app)):has(.site-nav),body:not(:has(.app)):has(.open-app){
 --bg:#070b16;--panel:#0f1729;--line:#263554;--text:#f5f7ff;--muted:#91a0c4;
 background:var(--bg);color:var(--text);font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;
}
body:not(:has(.app)) :is(.cta,.open-app){
 background:var(--ui-accent);border-radius:var(--ui-radius-control);min-height:44px;
 display:inline-flex;align-items:center;justify-content:center;padding:10px 18px;line-height:1.5;
}
body:not(:has(.app)) :is(.feature-card,.notice){border-radius:var(--ui-radius-panel);border-color:var(--line)}
body:not(:has(.app)) .site-nav{align-items:center;gap:12px 20px;border-color:var(--line)}
body:not(:has(.app)) .site-nav .brand{font-size:21px;letter-spacing:.08em;font-weight:800}
body:not(:has(.app)) :is(h1,h2){letter-spacing:-.025em;line-height:1.25}
body:not(:has(.app)) .site-footer{gap:12px 20px;line-height:1.5}
@media(prefers-color-scheme:light){
 body:not(:has(.app)):has(.site-nav),body:not(:has(.app)):has(.open-app){
  --bg:#f5f8fe;--panel:#fff;--line:#c2cee4;--text:#16233d;--muted:#526582;
 }
}

/* Older page-specific selected-tab rules must use the same geometry too. */
body .app :is(#newsAll,#newsSaved,.news-filters .chip,
 .composer-tools[aria-label="Feed"]>.chip,#feedSortButton,
 .growth-manage>summary,.desktop-tabs button,.launch-filters .chip){
 border-radius:var(--ui-radius-control)!important;
}
body .app :is(#newsAll.active,#newsSaved.active,.news-filters .chip.active,
 .composer-tools[aria-label="Feed"]>.chip.active,.desktop-tabs button.active){
 background:var(--ui-accent)!important;color:#fff!important;
}
body .app #tokenChart{border-radius:var(--ui-radius-panel)!important}
body .app .token-embed{border-radius:var(--ui-radius-panel)}
body .app .post :is(.post-media,.post-gif){border-radius:var(--ui-radius-panel)}
body .app .launch-discovery-hero h2{font-size:22px!important;line-height:28px!important}
body .app #page-launchpad #createLaunch{
 border-radius:var(--ui-radius-control)!important;min-height:40px!important;padding:9px 14px!important;
}
body .app .desktop-tabs button[aria-pressed="true"]{background:var(--ui-accent)!important;color:#fff!important}

/* Space artwork stays colourful; card bodies and membership follow the theme. */
body[data-theme="light"] .app #spaceDirectory .official-discovery-card{background:var(--panel);color:var(--text)}
body[data-theme="light"] .app #spaceDirectory .official-space-art::after{background:linear-gradient(0deg,var(--panel),transparent 48%)}
body[data-theme="light"] .app #spaceDirectory .official-space-copy h3{color:var(--text)}
body[data-theme="light"] .app #spaceDirectory .official-space-copy :is(p,small){color:var(--muted)}
body[data-theme="light"] .app #spaceDirectory .official-discovery-card .directory-card-status{color:#ad2446}
body[data-theme="light"] .app #spaceDirectory .directory-view-all{color:#355bb8}

body[data-theme="light"] .app #page-tokencheck .compact-sentiment .sentiment-split,
body[data-theme="light"] .app #page-tokencheck .compact-sentiment[data-empty="true"] .sentiment-split{
 background:#dce5f3;box-shadow:inset 0 0 0 1px #c6d2e5;
}
body[data-theme="light"] .app #page-tokencheck .compact-sentiment .sentiment-bull{background:linear-gradient(90deg,#0a9869,#20b87f)}
body[data-theme="light"] .app #page-tokencheck .compact-sentiment .sentiment-bear{background:linear-gradient(90deg,#dc3e61,#eb667b)}
body[data-theme="light"] .app #page-tokencheck .compact-sentiment .sentiment-side{color:#08704f}
body[data-theme="light"] .app #page-tokencheck .compact-sentiment .sentiment-side.bearish{color:#b52848}
body[data-theme="light"] .app #page-tokencheck .compact-sentiment[data-empty="true"] .sentiment-side{color:var(--muted)}

/* Information stays available once on Profile, without a repeated link wall. */
body .app .site-information{display:block;line-height:1.5}
body .app .site-information summary{width:max-content;cursor:pointer;padding:8px 0;font-weight:600}
body .app .site-information nav{display:flex;flex-wrap:wrap;gap:12px 20px;margin-top:8px}

/* Post charts are a compact quote and sparkline; detailed controls live on Charts. */
body .app .post .live-chart.post-chart-preview{
 padding:0!important;background:var(--panel)!important;border:1px solid var(--line)!important;
 border-radius:var(--ui-radius-panel);box-shadow:none;overflow:hidden!important;
}
.post-chart-open{
 display:grid;grid-template-columns:minmax(0,1.2fr) minmax(70px,1fr);align-items:center;gap:12px;
 box-sizing:border-box;width:100%;min-height:72px;padding:10px 12px;border:0;border-radius:inherit;
 background:transparent;color:var(--text);text-align:left;cursor:pointer;font:inherit;line-height:1.3;
}
.post-chart-meta{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:8px;min-width:0}
.post-chart-logo{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--ui-accent-soft);overflow:hidden}
body .app .post-chart-logo .chart-coin-logo{display:block;width:30px;height:30px;background:transparent;object-fit:contain}
.post-chart-logo .post-chart-initial{display:none;font-weight:700;color:var(--muted)}
.post-chart-logo:not(:has(img:not([hidden]))) .post-chart-initial{display:block}
.post-chart-info{min-width:0}
.post-chart-name{display:block;font-size:13px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.post-chart-quote{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 6px;margin-top:2px}
body .app .post-chart-open .chart-current-price{font-size:12px!important;line-height:16px!important;font-weight:600;white-space:nowrap;margin:0!important}
.post-chart-change{font-size:11px;line-height:15px;white-space:nowrap;font-variant-numeric:tabular-nums}
.post-chart-change small{font-size:10px;color:var(--muted)}
body[data-theme="light"] .post-chart-change.price-up{color:#08704f}
body[data-theme="light"] .post-chart-change.price-down{color:#b52848}
.post-chart-cached{display:block;font-size:10px;color:var(--muted);line-height:14px}
body .app .post .post-chart-preview .post-chart-spark{display:block;width:100%!important;height:48px!important;min-height:0!important;pointer-events:none;touch-action:pan-y}
.post-chart-spark :is(.nodora-glow,.nodora-line-shine){display:none}
.post-chart-source{position:absolute!important;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.post-chart-preview .chart-ranges{display:none!important}
.post-chart-preview .chart-message{box-sizing:border-box;min-height:72px;padding:14px;font-size:12px;line-height:1.4}
body .app .post-chart-open:focus-visible{outline-offset:-3px}
@media(max-width:360px){.post-chart-open{gap:8px;padding:8px 10px}.post-chart-meta{grid-template-columns:26px minmax(0,1fr);gap:6px}.post-chart-logo,body .app .post-chart-logo .chart-coin-logo{width:26px;height:26px}}
