/* DXED shared interface. Public welcome and Terminal share this palette. */
body.dx2 {
  --ui-bg:#0d0f14; --ui-surface:#15171e; --ui-raised:#1b1e27;
  --ui-line:#282c38; --ui-line-strong:#3c4354;
  --ui-text:#eceef4; --ui-secondary:#a0a6b5; --ui-muted:#8992a3;
  --ui-blue:#6385ff; --ui-link:#8da6ff; --ui-primary:#536bd9;
  --ui-selected:#202a45; --ui-on-primary:#fff;
  --bg-primary:var(--ui-bg); --bg-secondary:var(--ui-surface);
  --bg-card:var(--ui-surface); --bg-widget:var(--ui-surface);
  --bg-card-hover:var(--ui-raised); --bg-elevated:var(--ui-raised); --bg-input:var(--ui-bg);
  --text-primary:var(--ui-text); --text-secondary:var(--ui-secondary); --text-muted:var(--ui-muted);
  --border:var(--ui-line); --border-strong:var(--ui-line-strong); --border-accent:var(--ui-blue);
  --accent:var(--ui-primary); --accent-2:#465bc0; --accent-light:var(--ui-link);
  --accent-soft:var(--ui-selected); --accent-hover:var(--ui-raised); --accent-glow:transparent;
  --radius:12px; --radius-md:12px; --radius-lg:16px; --radius-sm:8px;
  --dx2-panel:var(--ui-surface); --dx2-line:var(--ui-line); --dx2-chamfer:none; --dx2-chamfer-sm:none;
  background:var(--ui-bg); color:var(--ui-text); color-scheme:dark;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:14px; line-height:1.5;
}
html[data-theme="light"] body.dx2 {
  --ui-bg:#f5f6f8; --ui-surface:#fff; --ui-raised:#eef0f5;
  --ui-line:#dce0e8; --ui-line-strong:#bbc3d1;
  --ui-text:#202532; --ui-secondary:#515c70; --ui-muted:#5f6a7c;
  --ui-blue:#4d68d8; --ui-link:#435bbd; --ui-primary:#536bd9; --ui-selected:#e9edfc; color-scheme:light;
}
body.dx2[data-dx2-accent="ice"] { --dx2-acc:var(--ui-blue); --dx2-acc-soft:var(--ui-selected); --dx2-acc-dim:var(--ui-line-strong); --dx2-acc-text:var(--ui-text); }
html body.dx2::before { display:none; }
body.dx2 :is(button,input,select,textarea) { font-family:inherit; }
body.dx2 button { transition:background .15s,color .15s,border-color .15s; }
body.dx2 :is(button,a,input,select,textarea,[tabindex]):focus-visible { outline:2px solid var(--ui-blue); outline-offset:3px; }
body.dx2 :is(input,textarea)::placeholder { color:var(--ui-muted); }
html body.dx2 :is(.btn-primary,.btn-secondary,.dx2-w-btn,.dx2-strip-btn,.dx2-rail-link,.widget button,.follow-row-btn) { border-radius:8px!important; clip-path:none; }
html body.dx2 :is(.btn-primary,.comm-new) { background:var(--ui-primary); color:var(--ui-on-primary); font-weight:600; }
html body.dx2 :is(.btn-primary,.comm-new):hover { background:#465bc0; }

/* Header and primary navigation. */
html body.dx2 #dx2-strip { height:60px; padding:0 max(24px,calc((100vw - 1280px)/2)); gap:16px; background:var(--ui-bg); border-bottom:1px solid var(--ui-line); backdrop-filter:none; }
html body.dx2 .dx2-brand { font-size:17px; font-weight:750; letter-spacing:1px; gap:9px; color:var(--ui-text); }
.dx2-brand i { display:none; }
body.dx2 .dx2-logo { width:27px; height:27px; border-radius:7px; }
.site-nav { display:flex; align-items:center; gap:3px; }
.site-nav-link { border:0; border-radius:7px; padding:8px 12px; background:transparent; color:var(--ui-secondary); font-size:13px; font-weight:550; cursor:pointer; }
.site-nav-link:hover { color:var(--ui-text); background:var(--ui-surface); }
.site-nav-link.on { color:var(--ui-text); background:var(--ui-raised); }
.site-search { display:flex; align-items:center; gap:9px; min-width:170px; padding:8px 10px; border:1px solid var(--ui-line); border-radius:7px; background:var(--ui-surface); color:var(--ui-secondary); font-size:12px; cursor:pointer; }
.site-search kbd { margin-left:auto; border:1px solid var(--ui-line-strong); border-radius:3px; padding:0 4px; font-size:10px; }
.site-create { display:flex; align-items:center; gap:6px; border:1px solid transparent; border-radius:7px; padding:8px 12px; background:var(--ui-primary); color:var(--ui-on-primary); font-size:12px; font-weight:600; cursor:pointer; }
.site-create:hover { background:#465bc0; }
html body.dx2 .dx2-strip-btn { color:var(--ui-secondary); padding:0 7px; min-width:34px; height:36px; }
html body.dx2 .dx2-strip-btn:hover { background:var(--ui-raised); color:var(--ui-text); }
body.dx2 .dx2-strip-btn[data-nav="settings"] { display:none; }
html body.dx2 .dx2-avatar { border-radius:50%; clip-path:none; border:1px solid var(--ui-line-strong); }
body.dx2 #dx2-section-label { display:none; }

/* Reading width and rails. Content panels leave the viewport on scroll. */
body.dx2 #app { max-width:1120px; padding:88px 28px 60px; }
html body.dx2 #main-content,html body.dx2[data-section] #main-content { min-width:0; border:0; background:transparent; }
body.dx2 .sec-photo-bg { display:none; }
body.dx2 .section-header { position:relative; top:auto; background:transparent; border-bottom:1px solid var(--ui-line); }
body.dx2 .section-header h2 { font-size:25px; line-height:1.25; font-weight:650; letter-spacing:-.65px; text-transform:none; }
body.dx2 .section-header h2::before { display:none; }
body.dx2[data-section="home"] #dx2-rail,body.dx2[data-section="explore"] #dx2-rail,body.dx2[data-section="clips"] #dx2-rail { position:relative; top:auto; align-self:start; }
html body.dx2 .dx2-rail-card { padding:0; background:transparent; border:0; border-radius:0; clip-path:none; }
html body.dx2 .dx2-operator { padding:12px 10px 20px; border-bottom:1px solid var(--ui-line); margin-bottom:18px; }
html body.dx2 .dx2-op-av { width:36px; height:36px; border-radius:50%; clip-path:none; background-color:var(--ui-raised); color:var(--ui-text); }
html body.dx2 .dx2-op-id strong { color:var(--ui-text); font-size:13px; font-weight:600; }
body.dx2 .dx2-op-id em { color:var(--ui-muted); font-size:11px; font-style:normal; letter-spacing:0; }
html body.dx2 .dx2-rail-title { color:var(--ui-muted); font-size:11px; font-weight:500; letter-spacing:.03em; text-transform:none; padding:0 10px 8px; }
body.dx2 .dx2-rail-edit { color:var(--ui-muted); font-size:11px; letter-spacing:0; text-transform:none; }
html body.dx2 .dx2-rail-link { min-height:39px; padding:9px 10px; gap:11px; color:var(--ui-secondary); font-size:13px; font-weight:500; }
html body.dx2 .dx2-rail-link:hover { color:var(--ui-text); background:var(--ui-raised); }
html body.dx2 .dx2-rail-link[aria-current="page"] { color:var(--ui-link); background:var(--ui-selected); }
.site-updates-link { display:block; margin:20px 10px 0; padding:16px 0; border-top:1px solid var(--ui-line); color:var(--ui-muted); font-size:12px; text-decoration:none; }
.site-updates-link:hover { color:var(--ui-link); }
html body.dx2 .dx2-board { background:var(--ui-surface); border:1px solid var(--ui-line); border-radius:12px; clip-path:none; }
html body.dx2 .dx2-board-head { color:var(--ui-text); border-color:var(--ui-line); font-size:13px; font-weight:600; letter-spacing:0; text-transform:none; padding:16px; }
html body.dx2 .dx2-board .widget::before { color:var(--ui-muted); font-family:inherit; font-size:11px; font-weight:500; line-height:1.5; letter-spacing:0; text-transform:none; }
html body.dx2 .widget { border-radius:10px; clip-path:none; background:var(--ui-surface); border-color:var(--ui-line); }
html body.dx2 .widget-title { color:var(--ui-secondary); font-size:12px; font-weight:600; letter-spacing:0; text-transform:none; }
html body.dx2 .widget-title svg { width:15px; height:15px; }
html body.dx2 .widget-count { font-family:inherit; border-radius:5px; clip-path:none; }
html body.dx2 #right-sidebar :is(.widget-action-btn,.follow-row-btn) { background:var(--ui-raised); color:var(--ui-text); border:1px solid var(--ui-line-strong); border-radius:7px!important; font-size:11px; font-weight:550; }
html body.dx2 #right-sidebar :is(.widget-action-btn,.follow-row-btn):hover { background:var(--ui-selected); border-color:var(--ui-blue); }
body.dx2 #right-sidebar :is(.hashtag-pill,.trending-tag,.hashtag-trending-pill) { border-radius:5px; clip-path:none; background:var(--ui-raised); color:var(--ui-secondary); }
body.dx2 .follow-row { padding:10px 0; }
body.dx2 .follow-row-name { font-size:12px; font-weight:600; }
body.dx2 .follow-row-handle { color:var(--ui-muted); font-size:11px; }
body.dx2 .follow-row-avatar { width:31px; height:31px; }

/* Home introduction. */
body.dx2 #home-section > .section-header { border:0; padding:0; min-height:0; }
body.home-v2 #home-section > .section-header { display:none; }
.home-welcome { position:relative; padding:0 0 18px; margin:0 0 16px; border:0; border-bottom:1px solid var(--ui-line); background:transparent; }
.home-welcome[hidden] { display:none!important; }
.home-kicker { display:none; }
.home-welcome h1 { font-size:28px; line-height:1.2; letter-spacing:-.8px; font-weight:650; color:var(--ui-text); margin:0 40px 7px 0; }
.home-welcome p { color:var(--ui-secondary); font-size:13px; line-height:1.6; margin:0; }
.home-welcome-dismiss { position:absolute; top:0; right:0; width:30px; height:30px; border:0; border-radius:6px; background:transparent; color:var(--ui-muted); font-size:21px; cursor:pointer; }
.home-welcome-dismiss:hover { background:var(--ui-raised); color:var(--ui-text); }
.home-destinations { display:flex; gap:10px; margin:15px 0; flex-wrap:wrap; }
.home-destinations button { min-height:34px; border:1px solid var(--ui-line-strong); border-radius:7px; padding:7px 11px; background:var(--ui-surface); color:var(--ui-text); text-align:left; cursor:pointer; }
.home-destinations button:hover { border-color:var(--ui-blue); background:var(--ui-raised); }
.home-destinations span { display:none; }
.home-destinations strong { display:flex; align-items:center; gap:14px; font-size:12px; font-weight:550; }
.home-destinations b { color:var(--ui-muted); font-weight:400; }
.site-release { display:flex; align-items:center; gap:9px; min-width:0; }
.site-release>span { flex:none; font-size:10px; color:var(--ui-link); font-weight:600; text-transform:none; }
.site-release p { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; color:var(--ui-muted); }
.site-release a { flex:none; margin-left:auto; font-size:11px; color:var(--ui-secondary); text-decoration:none; }
.site-release a:hover { color:var(--ui-link); }
body.dx2 #guest-bar { position:relative; inset:auto; transform:none; z-index:auto; display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; width:auto; max-width:none; padding:10px 12px; margin:0 0 16px; border:1px solid var(--ui-line); border-radius:8px; background:var(--ui-surface); box-shadow:none; }
body.dx2 #guest-bar .guest-bar-info { display:flex; }
body.dx2 #guest-bar .guest-bar-dot { display:none; }
body.dx2 #guest-bar .guest-bar-copy strong { color:var(--ui-secondary); font-size:12px; font-weight:400; }
body.dx2 #guest-bar .guest-bar-actions { display:flex; align-items:center; gap:7px; width:auto; }
body.dx2 #guest-bar .guest-bar-btn { padding:6px 9px; min-height:30px; border-radius:6px; font-size:11px; font-weight:550; color:var(--ui-secondary); }
body.dx2 #guest-bar .guest-bar-btn.primary { color:var(--ui-on-primary); background:var(--ui-primary); border-color:transparent; }
body.dx2 #guest-bar .guest-bar-btn.ghost { background:transparent; border-color:transparent; }
.guest-bar-dismiss { width:26px; height:28px; border:0; border-radius:5px; background:transparent; color:var(--ui-muted); font-size:20px; cursor:pointer; }
.guest-bar-dismiss:hover { background:var(--ui-raised); color:var(--ui-text); }

/* Social cards. */
html body.dx2 .post-card { padding:20px; border:1px solid var(--ui-line); border-radius:12px!important; background:var(--ui-surface); box-shadow:none; --card-fade:var(--ui-surface); }
body.dx2 .post-card::before { display:none; }
body.dx2 .post-card + .post-card { margin-top:12px; }
body.dx2 :is(.post-content,.post-body) { font-size:14px; line-height:1.65; }
body.dx2 .post-username { font-size:13px; font-weight:650; color:var(--ui-text); }
body.dx2 :is(.post-handle,.post-dot-time,.post-meta-row) { color:var(--ui-muted); font-size:12px; }
body.dx2 .post-header > .post-avatar { width:38px; height:38px; border-radius:50%; }
body.dx2 .post-actions { border-color:var(--ui-line); padding-top:8px; margin-top:14px; }
body.dx2 .post-action-btn { color:var(--ui-muted); font-size:12px; min-height:34px; }
body.dx2 .views-btn { color:var(--ui-muted); opacity:1; }
body.dx2 .post-image:hover,body.dx2 .post-image:hover img { transform:none; opacity:1; }
body.dx2 .hv-strip { margin:0 0 12px; padding:0; gap:8px; }
body.dx2 .hv-strip-item { min-height:30px; padding:4px 10px; border:1px solid var(--ui-line); border-radius:6px; background:var(--ui-surface); color:var(--ui-secondary); }
body.dx2 .hv-strip-domain { color:var(--ui-muted); letter-spacing:0; text-transform:none; font-weight:500; }
body.dx2 .hv-feed-item { margin:0 0 12px; border:1px solid var(--ui-line); border-radius:12px; overflow:hidden; background:var(--ui-surface); }
html body.dx2 .hv-feed-post .post-card { margin:0; border:0; }
body.dx2 .hv-native { padding:18px; gap:12px; }
body.dx2 .hv-native-text { line-height:1.6; }
body.dx2 .hv-native-head strong { font-size:13px; font-weight:600; }
body.dx2 .hv-native-media { margin-top:8px; max-width:100%; border-radius:8px; }
body.dx2 .hv-native-media img { max-height:280px; }
body.dx2 .hv-native-actions { margin-top:6px; }
body.dx2 .hv-nact { color:var(--ui-secondary); padding:7px 9px; border-radius:6px; }
body.dx2 .hv-card { padding:18px; }
body.dx2 .hv-queue { position:relative; top:auto; border-radius:7px; box-shadow:none; background:var(--ui-selected); color:var(--ui-link); }

/* Discovery and communities share controls and card geometry. */
html body.dx2 :is(.comm-card,.game-card,.user-card) { background:var(--ui-surface); border:1px solid var(--ui-line); border-radius:12px; box-shadow:none; }
html body.dx2 :is(.comm-card,.game-card,.user-card):hover { transform:none; border-color:var(--ui-line-strong); background:var(--ui-raised); }
body.dx2 :is(.comm-head-title,.profile-name) { font-weight:650; letter-spacing:-.7px; }
body.dx2 .comm-head-title { font-size:28px; }
body.dx2 .comm-head-sub { font-size:14px; color:var(--ui-secondary); }
body.dx2 :is(.comm-card-name,.comm-section-title) { font-weight:600; }
body.dx2 :is(.comm-search,.comm-sort,.comm-chips,.search-bar-big) { border-color:var(--ui-line); border-radius:8px; background:var(--ui-surface); box-shadow:none; }
body.dx2 .comm-search:focus-within,body.dx2 .search-bar-big:focus-within { border-color:var(--ui-blue); }
body.dx2 :is(.comm-chip,.explore-tab,.tab-btn) { font-weight:550; letter-spacing:0; text-transform:none; }
html body.dx2 :is(.tab-btn,.trending-posts,.clip-card-sub) { color:var(--ui-secondary); }
html body.dx2 .tab-btn.active { color:var(--ui-text); background:var(--ui-selected); }
body.dx2 .comm-chip.active { background:var(--ui-selected); color:var(--ui-link); }
body.dx2 .comm-grid { gap:16px; }
body.dx2 .comm-card-body { padding:14px 16px 16px; }
body.dx2 .comm-card-avatar { border-radius:10px; }
body.dx2 #communities-view,body.dx2 #community-page { padding:0 0 40px; }

/* Deliberate overlays, hidden until requested. */
html body.dx2 #sidebar,html body.dx2 #right-sidebar { background:var(--ui-surface); backdrop-filter:none; border-color:var(--ui-line); }
body.dx2 #sidebar { visibility:hidden; pointer-events:none; }
body.dx2.dx2-mods-open #sidebar { visibility:visible; pointer-events:auto; }
html body.dx2 .dx2-drawer-title { background:var(--ui-surface); color:var(--ui-text); font-weight:600; letter-spacing:0; text-transform:none; }
html body.dx2 .dx2-drawer-x { border-radius:7px; color:var(--ui-secondary); border-color:var(--ui-line-strong); }
body.dx2 .scroll-top-btn { display:none; }
#dxed-loader { transition:opacity .15s,visibility .15s; }

@media(min-width:1260px) {
  body.dx2[data-section="home"] #app { display:grid; max-width:1320px; grid-template-columns:192px minmax(0,1fr) 250px; gap:28px; }
  body.dx2[data-section="home"] #right-sidebar { position:relative; inset:auto; height:auto; max-height:none; overflow:visible; align-self:start; padding:0; }
}
@media(max-width:1259px) {
  body.dx2 #right-sidebar { visibility:hidden; pointer-events:none; }
  body.dx2.dx2-intel-open #right-sidebar { visibility:visible; pointer-events:auto; }
  .site-search { min-width:0; }
  .site-search span,.site-search kbd { display:none; }
  .site-nav-link { padding:8px 10px; }
}
@media(min-width:1100px) { body.dx2 #dx2-dock { display:none; } }
@media(max-width:1099px) {
  .site-nav,.site-create { display:none; }
  html body.dx2 #dx2-strip { position:relative; inset:auto; height:56px; padding:0 18px; gap:8px; }
  body.dx2 #app { padding:24px 20px calc(90px + env(safe-area-inset-bottom,0px)); }
  .site-search { border:0; background:transparent; padding:8px; }
  body.dx2 #dx2-dock { left:0; right:0; bottom:0; transform:none; width:100%; }
  html body.dx2 .dx2-dock-inner { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:0; padding:4px max(8px,env(safe-area-inset-left,0px)) calc(4px + env(safe-area-inset-bottom,0px)); background:var(--ui-surface); border:0; border-top:1px solid var(--ui-line); border-radius:0; box-shadow:none; clip-path:none; backdrop-filter:none; }
  html body.dx2 #dx2-dock :is(.dx2-dock-btn,.dx2-post) { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; width:100%; height:48px; min-height:48px; margin:0; padding:5px 0; border:0; border-radius:7px; clip-path:none; box-shadow:none; background:transparent; color:var(--ui-muted); transform:none; animation:none; }
  body.dx2 #dx2-dock .dx2-post svg { width:21px; height:21px; }
  body.dx2 #dx2-dock :is(.dx2-post,.dx2-dock-btn) span { font-size:10px; font-weight:500; line-height:1.2; letter-spacing:0; text-transform:none; color:inherit; }
  html body.dx2 #dx2-dock .dx2-dock-btn.on { color:var(--ui-link); background:var(--ui-selected); }
  body.dx2 .dx2-dock-btn.on svg { filter:none; }
}
@media(max-width:650px) {
  html body.dx2 #dx2-strip { gap:3px; padding:0 14px; }
  body.dx2 .dx2-brand { font-size:16px; }
  .dx2-strip-lbl { display:none; }
  body.dx2 #app { padding:20px 14px calc(84px + env(safe-area-inset-bottom,0px)); }
  .home-welcome { margin-bottom:12px; padding-bottom:14px; }
  .home-welcome h1 { font-size:25px; }
  .home-welcome p { font-size:12px; }
  .home-destinations { margin:12px 0; gap:7px; }
  .home-destinations button { padding:7px 9px; }
  .home-destinations strong { font-size:11px; gap:8px; }
  .site-release>span { font-size:10px; }
  .site-release p { display:none; }
  .site-release a { margin-left:0; }
  body.dx2 #guest-bar { padding:10px; margin-bottom:14px; gap:7px; }
  body.dx2 #guest-bar .guest-bar-copy strong { font-size:11px; }
  body.dx2 #guest-bar .guest-bar-actions { gap:4px; }
  body.dx2 #guest-bar .guest-bar-btn { padding:6px 8px; }
  body.dx2 #guest-bar a.guest-bar-btn { display:none; }
  body.dx2 .section-header h2 { font-size:23px; }
  html body.dx2 .post-card { padding:16px 14px 10px; }
  body.dx2 :is(.post-content,.post-body) { font-size:14px; line-height:1.6; }
  html body.dx2 .post-card :is(.post-image-container,.post-image-grid,.dxp-mount) { margin:12px 0 0; width:100%; max-width:100%; border-radius:8px; }
  html body.dx2 .post-card .post-image-grid { display:grid; }
  html body.dx2 .post-card .post-image { border-radius:8px; max-height:420px; }
  body.dx2 .hv-native { padding:16px 14px; gap:10px; }
  body.dx2 .hv-native-media img { max-height:210px; }
  body.dx2 .hv-strip { margin-bottom:12px; }
  body.dx2 .hv-card { padding:16px 14px; }
  body.dx2 .comm-head-title { font-size:26px; }
  body.dx2 .comm-head-row { gap:10px; }
  body.dx2 .comm-new { padding:9px 11px; font-size:12px; }
  body.dx2 .comm-toolbar-right { width:100%; }
  body.dx2 .comm-search { flex:1; min-width:0; }
  body.dx2 .comm-search input { min-width:0; width:100%; }
  body.dx2 .comm-grid { grid-template-columns:minmax(0,1fr); }
}
@media(prefers-reduced-motion:reduce) {
  body.dx2 *,body.dx2 *::before,body.dx2 *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
  #dxed-loader { transition:none; }
}
