/* psychoSocial - Dashboard (pack v0.1)
   GOAL: standalone Dashboard page with "glass" panels, no regressions.
   SCOPE: only affects dashboard.html via explicit stylesheet include.
*/

.dashHeader{ margin-top: 6px; }
.dashHeader .pageRow{ margin-top: 0; }
.dashHeader .tagRow{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  width:100%;
}

/* Mobile harmony guardrail:
   keep dashboard top row aligned to shared top-level header system. */
@media (max-width: 900px){
  body[data-page="dashboard"] .dashHeader{
    margin-top: 6px !important;
    margin-bottom: 10px !important;
  }
  body[data-page="dashboard"] .dashHeader .tagRow{
    width: 100%;
    justify-content: flex-start;
    align-items: stretch;
  }
  body[data-page="dashboard"] .dashHeader .pageTag{
    display: block;
    width: 100%;
    margin: 0;
    padding: 12px 13px;
    min-height: 44px;
    border-radius: 12px;
    font-size: 14px;
    letter-spacing: .14em;
    border: 1px solid rgba(255,255,255,.16);
    color: var(--fg);
    background:
      radial-gradient(120% 120% at 16% 0%, rgba(247,147,26,.16), transparent 62%),
      linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
    box-shadow: 0 0 0 1px rgba(255,255,255,.07) inset;
    text-align: left;
  }
  html[data-theme="light"] body[data-page="dashboard"] .dashHeader .pageTag{
    border-color: rgba(0,0,0,.14);
    background:
      radial-gradient(120% 120% at 16% 0%, rgba(247,147,26,.10), transparent 62%),
      linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.01));
    box-shadow: 0 0 0 1px rgba(0,0,0,.06) inset;
  }
}

.dashSection{
  --psDashCardBg: rgba(255,255,255,.04);
  --psDashCardBorder: var(--border);
  --psDashCardShadow: 0 10px 26px rgba(0,0,0,.28);
  --psDashCardInset: rgba(255,255,255,.035);
  --psDashCardText: var(--fg);
  --psDashCardSub: var(--muted);
  --psDashPanelBodyBg: rgba(255,255,255,.018);
  --psDashPanelBodyBorder: rgba(255,255,255,.06);
  --psDashStatusErr: rgba(255,180,160,.95);
  --psDashStatusWarn: rgba(255,210,140,.95);
}
html[data-theme="light"] .dashSection{
  --psDashCardBg: rgba(0,0,0,.02);
  --psDashCardBorder: rgba(0,0,0,.12);
  --psDashCardShadow: 0 10px 26px rgba(0,0,0,.10);
  --psDashCardInset: rgba(0,0,0,.04);
  --psDashCardSub: rgba(0,0,0,.62);
  
  --psDashPanelBodyBg: rgba(255,255,255,.55);
  --psDashPanelBodyBorder: rgba(0,0,0,.10);
  --psDashStatusErr: rgba(140,35,25,.82);
  --psDashStatusWarn: rgba(140,90,20,.86);
}
html[data-ps-ui-theme="paper"] .dashSection{
  --psDashCardBg: rgba(255,255,255,.78);
}
html[data-theme="dark"][data-ps-ui-theme="paper"] .dashSection{
  --psDashCardBg: rgba(255,255,255,.12);
  --psDashCardBorder: rgba(255,255,255,.12);
}

.dashPageHeader{
  margin: 14px 0 6px;
  text-align: center;
}
.dashTitle{
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--psDashCardText);
}
.dashSubtitle{
  margin-top: 6px;
  font-size: var(--font-size-xs);
  color: var(--psDashCardSub);
}
@media (min-width: 860px){
  .dashPageHeader{ margin: 18px 0 10px; }
  .dashTitle{ font-size: var(--font-size-xl); }
  .dashSubtitle{ font-size: 13px; }
}

.dashTag{
  display:inline-flex;
  align-items:center;
  gap:var(--spacing-sm);
  padding:10px 14px;
  border-radius: var(--border-radius-full);
  border: 1px solid var(--psDashCardBorder);
  background: var(--psDashCardBg);
  color: var(--psDashCardText);
  backdrop-filter: blur(10px);
}

/* Dashboard landing cleanup: calmer board + lighter hierarchy.
   Includes hash deep-link state where dashboard sets data-page="bitcoin-stats". */
body[data-page="dashboard"] .card.dashSection,
body[data-page="bitcoin-stats"] .card.dashSection{
  border-color: rgba(255,255,255,.10);
  background: rgba(0,0,0,.26);
  --psRimInnerBg: rgba(0,0,0,.26);
  box-shadow: 0 10px 26px rgba(0,0,0,.32), 0 0 0 1px rgba(255,255,255,.03) inset;
}
body[data-page="dashboard"] .card.dashSection:hover,
body[data-page="bitcoin-stats"] .card.dashSection:hover{
  box-shadow: 0 12px 28px rgba(0,0,0,.36), 0 0 0 1px rgba(255,255,255,.04) inset;
  transform: none;
}
html[data-theme="light"] body[data-page="dashboard"] .card.dashSection,
html[data-theme="light"] body[data-page="bitcoin-stats"] .card.dashSection{
  border-color: rgba(0,0,0,.12);
  background: rgba(255,255,255,.78);
  --psRimInnerBg: rgba(255,255,255,.78);
  box-shadow: 0 10px 24px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.04) inset;
}
html[data-theme="light"] body[data-page="dashboard"] .card.dashSection:hover,
html[data-theme="light"] body[data-page="bitcoin-stats"] .card.dashSection:hover{
  box-shadow: 0 12px 26px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.05) inset;
}

body[data-page="dashboard"] .dashHeader,
body[data-page="bitcoin-stats"] .dashHeader{
  margin-top: 0;
  margin-bottom: 10px;
  text-align: left;
}
body[data-page="dashboard"] .dashHeader .pageTag,
body[data-page="bitcoin-stats"] .dashHeader .pageTag{
  margin-left: 0;
  width: 100%;
  text-align: left;
}

body[data-page="dashboard"] .dashHub,
body[data-page="bitcoin-stats"] .dashHub{
  margin-top: 20px;
  gap: var(--spacing-lg);
}
body[data-page="dashboard"] .dashHubSection,
body[data-page="bitcoin-stats"] .dashHubSection{
  gap: 12px;
}
body[data-page="dashboard"] .dashHubTitle,
body[data-page="bitcoin-stats"] .dashHubTitle{
  font-size: 10px;
  letter-spacing: .14em;
  font-weight: 600;
  opacity: .68;
}
body[data-page="dashboard"] .dashHubCard,
body[data-page="bitcoin-stats"] .dashHubCard{
  border-color: rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  backdrop-filter: none;
  box-shadow: none;
}
body[data-page="dashboard"] .dashHubCard:hover,
body[data-page="bitcoin-stats"] .dashHubCard:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 8px 18px rgba(0,0,0,.20);
}
html[data-theme="light"] body[data-page="dashboard"] .dashHubCard,
html[data-theme="light"] body[data-page="bitcoin-stats"] .dashHubCard{
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.02);
}
html[data-theme="light"] body[data-page="dashboard"] .dashHubCard:hover,
html[data-theme="light"] body[data-page="bitcoin-stats"] .dashHubCard:hover{
  border-color: rgba(0,0,0,.16);
  box-shadow: 0 8px 16px rgba(0,0,0,.10);
}
body[data-page="dashboard"] .dashHubCardMeta,
body[data-page="bitcoin-stats"] .dashHubCardMeta{
  color: rgba(242,242,242,.72);
  line-height: 1.45;
}
html[data-theme="light"] body[data-page="dashboard"] .dashHubCardMeta,
html[data-theme="light"] body[data-page="bitcoin-stats"] .dashHubCardMeta{
  color: rgba(0,0,0,.60);
}
body[data-page="dashboard"] .dashHubCardAction,
body[data-page="bitcoin-stats"] .dashHubCardAction{
  font-size: 9px;
  letter-spacing: .08em;
  font-weight: 600;
  opacity: .52;
}
body[data-page="dashboard"] .dashHubCardAction{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 56px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: rgba(242,242,242,.9);
  letter-spacing: .11em;
  font-size: 10px;
  font-weight: 700;
  opacity: .95;
}
body[data-page="dashboard"] .dashHubCard:hover .dashHubCardAction{
  border-color: rgba(255,255,255,.26);
  background: rgba(255,255,255,.10);
  color: #fff;
}
html[data-theme="light"] body[data-page="dashboard"] .dashHubCardAction{
  border-color: rgba(0,0,0,.28);
  background: rgba(0,0,0,.10);
  color: rgba(0,0,0,.86);
  font-weight: 700;
  opacity: 1;
}
html[data-theme="light"] body[data-page="dashboard"] .dashHubCard:hover .dashHubCardAction{
  border-color: rgba(0,0,0,.34);
  background: rgba(0,0,0,.14);
  color: rgba(0,0,0,.94);
}
html[data-ps-preset="paper"] body[data-page="dashboard"] .dashHubCardAction{
  border-color: var(--paper-line-strong, rgba(34,30,24,.28));
  background: color-mix(in srgb, var(--paper-surface-soft, rgba(216,211,202,.82)) 86%, rgba(0,0,0,.10));
  color: rgba(34,30,24,.90);
}
body[data-page="dashboard"] .dashHubCardTitle,
body[data-page="bitcoin-stats"] .dashHubCardTitle{
  line-height: 1.28;
}

body[data-page="dashboard"] .psBreadcrumbBar,
body[data-page="bitcoin-stats"] .psBreadcrumbBar{
  margin: 2px 0 6px;
}
body[data-page="dashboard"] .psCrumbs,
body[data-page="bitcoin-stats"] .psCrumbs{
  font-size: 10px;
  letter-spacing: .10em;
  text-transform: none;
  opacity: .60;
}
body[data-page="dashboard"] .psCrumbs{
  letter-spacing: .08em;
  opacity: .78;
}
body[data-page="dashboard"] .psCrumbs a{
  color: rgba(242,242,242,.88);
  border-bottom-color: rgba(255,255,255,.18);
}
body[data-page="dashboard"] .psCrumbHere{
  color: rgba(242,242,242,.98);
}
html[data-theme="light"] body[data-page="dashboard"] .psCrumbs a{
  color: rgba(0,0,0,.78);
  border-bottom-color: rgba(0,0,0,.16);
}
html[data-theme="light"] body[data-page="dashboard"] .psCrumbHere{
  color: rgba(0,0,0,.9);
}

/* -----------------------------
   Dashboard hub cards
------------------------------ */

.dashHub{
  margin-top: var(--spacing-md);
  display:grid;
  gap:18px;
}

.dashHubSection{
  display:grid;
  gap:10px;
}

.dashHubTitle{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--psDashCardSub);
  padding-left: 2px;
}

.dashHubGrid{
  display:grid;
  gap:12px;
}

.dashHubCard{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--psDashCardBorder);
  background: var(--psDashCardBg);
  color: var(--psDashCardText);
  text-decoration:none;
  backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px var(--psDashCardInset) inset;
  /* Keep hub cards clean in standard shell: no global link underline rhythm. */
  text-decoration-line: none !important;
  text-decoration-thickness: initial !important;
  text-underline-offset: initial !important;
}

html[data-theme="light"] .dashHubCard{
  box-shadow: var(--psDashCardShadow);
}

.dashHubCard:active{ transform: translateY(1px); }
.dashHubCardMain{ min-width:0; }

.dashHubCardTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.dashHubCardTitle{
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2px;
}

.dashHubState{
  flex:0 0 auto;
  padding:var(--spacing-xs) var(--spacing-sm);
  border-radius:var(--border-radius-full);
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: var(--psDashCardSub);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1;
}

.dashHubCard[data-dash-state="live"] .dashHubState{
  border-color: rgba(80,255,150,.34);
  color: rgba(170,255,205,.96);
  background: rgba(80,255,150,.12);
}

.dashHubCard[data-dash-state="degraded"] .dashHubState{
  border-color: rgba(255,200,120,.34);
  color: rgba(255,220,160,.96);
  background: rgba(255,200,120,.14);
}
.dashHubCard[data-dash-state="proxy"] .dashHubState{
  border-color: rgba(255,200,120,.34);
  color: rgba(255,220,160,.96);
  background: rgba(255,200,120,.14);
}

.dashHubCard[data-dash-state="wip"] .dashHubState{
  border-color: rgba(160,170,190,.34);
  color: rgba(214,219,230,.9);
  background: rgba(160,170,190,.14);
}

html[data-theme="light"] .dashHubState{
  border-color: rgba(0,0,0,.34);
  background: rgba(0,0,0,.13);
  color: rgba(0,0,0,.88);
  font-size: 11px;
  letter-spacing: .06em;
  font-weight: 800;
}
html[data-theme="light"] .dashHubCard[data-dash-state="live"] .dashHubState{
  color: rgba(18,78,45,.99);
  border-color: rgba(40,128,75,.72);
  background: rgba(132,214,169,.58);
}
html[data-theme="light"] .dashHubCard[data-dash-state="degraded"] .dashHubState{
  color: rgba(96,57,10,.99);
  border-color: rgba(160,110,38,.70);
  background: rgba(236,196,120,.58);
}
html[data-theme="light"] .dashHubCard[data-dash-state="proxy"] .dashHubState{
  color: rgba(96,57,10,.99);
  border-color: rgba(160,110,38,.70);
  background: rgba(236,196,120,.58);
}
html[data-theme="light"] .dashHubCard[data-dash-state="wip"] .dashHubState{
  color: rgba(40,48,63,.99);
  border-color: rgba(84,94,112,.66);
  background: rgba(175,184,200,.55);
}
html[data-ps-preset="paper"] .dashHubState{
  box-shadow:
    0 0 0 1px rgba(255,255,255,.52) inset,
    0 1px 0 rgba(255,255,255,.30);
}

.dashHubCardMeta{
  margin-top: var(--spacing-xs);
  font-size: var(--font-size-xs);
  color: var(--psDashCardSub);
}

.dashHubCardAction{
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--psDashCardSub);
  flex:0 0 auto;
}

/* Dashboard hub: keep cards optically flat on mobile (avoid double-blur text artifacts). */
body[data-page="dashboard"] .dashHubCard,
body[data-page="bitcoin-stats"] .dashHubCard{
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Bitcoin preset: prevent generic [class*="Card"] pack rules from skinning inner hub text blocks. */
html[data-ps-preset="bitcoin"] body[data-page="dashboard"] .dashHubCard .dashHubCardMain,
html[data-ps-preset="bitcoin"] body[data-page="dashboard"] .dashHubCard .dashHubCardTitle,
html[data-ps-preset="bitcoin"] body[data-page="dashboard"] .dashHubCard .dashHubCardMeta,
html[data-ps-preset="bitcoin"] body[data-page="dashboard"] .dashHubCard .dashHubCardAction,
html[data-ps-preset="bitcoin"] body[data-page="bitcoin-stats"] .dashHubCard .dashHubCardMain,
html[data-ps-preset="bitcoin"] body[data-page="bitcoin-stats"] .dashHubCard .dashHubCardTitle,
html[data-ps-preset="bitcoin"] body[data-page="bitcoin-stats"] .dashHubCard .dashHubCardMeta,
html[data-ps-preset="bitcoin"] body[data-page="bitcoin-stats"] .dashHubCard .dashHubCardAction{
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (prefers-reduced-motion: no-preference){
  .dashHubCard{
    transition:transform .12s ease, box-shadow .18s ease, border-color .18s ease;
  }
  .dashHubCard:hover{
    transform:translateY(-2px);
    box-shadow:0 14px 28px rgba(0,0,0,.30);
  }
  html[data-theme="light"] .dashHubCard:hover{
    box-shadow:0 14px 28px rgba(0,0,0,.16);
  }
}

@media (min-width: 860px){
  .dashHubGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px){
  .dashHubGrid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .dashHubCard{ align-items:flex-start; }
}

.dashBtn{
  border-radius: var(--border-radius-full);
  padding:10px 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--fg);
}
.dashBtn:hover{ background: rgba(255,255,255,.08); }
.dashBtnGhost{
  border-radius: var(--border-radius-full);
  padding:10px 14px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
}
.dashBtnGhost:hover{ background: rgba(255,255,255,.06); }

.dashSub{
  margin-top: 10px;
  font-size: var(--font-size-xs);
  color: var(--psDashCardSub);
}

/* -----------------------------
   Games embed + overlay
------------------------------ */

.dashGameCard{
  border-radius: var(--radius);
  border: 1px solid var(--psDashCardBorder);
  background: var(--psDashCardBg);
  box-shadow: 0 0 0 1px var(--psDashCardInset) inset;
  backdrop-filter: blur(14px);
  padding: 14px;
  display:grid;
  gap:12px;
}

.dashGameHead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.dashGameActions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

/* Preview block (replaces inline iframe on desktop) */
.dashGamePreview{
  border-radius: var(--radius);
  border: 1px solid var(--psDashCardBorder);
  background: linear-gradient(180deg, rgba(40,60,90,.45), rgba(20,24,30,.6));
  overflow:hidden;
  height: clamp(240px, 36vh, 420px);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  position:relative;
}
.dashGamePreviewImg,
.dashGamePreviewVideo{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
.dashGamePreviewVideo{ background:#000; }
.dashGamePreviewInner{
  padding:18px;
  color: var(--psDashCardText);
  letter-spacing:.08em;
  text-transform:uppercase;
  position:relative;
  z-index:var(--z-base);
  backdrop-filter: blur(2px);
}
.dashGamePreviewTitle{
  font-size:var(--font-size-base);
  font-weight:700;
}
.dashGamePreviewSub{
  margin-top:var(--spacing-sm);
  font-size:11px;
  color: var(--psDashCardSub);
}

.dashGameLoader{
  position:absolute;
  z-index:2;
  padding:var(--spacing-sm) 12px;
  border-radius: var(--border-radius-full);
  border: 1px solid var(--psDashCardBorder);
  background: rgba(0,0,0,.35);
  color: var(--psDashCardText);
  font-size: var(--font-size-xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  pointer-events:none;
}
.dashGameLoader{
  top:12px;
  left:12px;
}
html[data-theme="light"] .dashGameLoader{
  background: rgba(255,255,255,.75);
}

.dashGameOverlayFrame{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex:1 1 auto;
  min-height:0;
}

body.psEmbedOpen{
  overflow:hidden;
}

.dashGameOverlay{
  position:fixed;
  inset:0;
  z-index:var(--z-game-overlay);
  display:none;
  flex-direction:column;
  gap:12px;
  padding:calc(12px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background:rgba(0,0,0,.78);
  backdrop-filter: blur(6px);
}
.dashGameOverlay:not([hidden]){ display:flex; }
.dashGameOverlay[hidden]{
  display:none !important;
  pointer-events:none !important;
}
html[data-theme="light"] .dashGameOverlay{
  background:rgba(255,255,255,.92);
}

.dashGameOverlayBar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--psDashCardBorder);
  background: var(--psDashCardBg);
  color: var(--psDashCardText);
  box-shadow: 0 0 0 1px var(--psDashCardInset) inset;
}

.dashGameOverlayTitle{
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2px;
}

.dashGameStage{
  width:min(92vw, 560px);
  aspect-ratio: 9 / 16;
  max-height: calc(100vh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  border-radius: var(--radius);
  border: 1px solid var(--psDashCardBorder);
  background: rgba(0,0,0,.35);
  overflow:hidden;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
}
.dashGameOverlayNotice{
  max-width:min(92vw, 560px);
  font-size:var(--font-size-xs);
  color: var(--psDashCardSub);
  text-align:center;
}
.dashGameOverlayNotice a{
  color: var(--psDashCardText);
  text-decoration: underline;
  font-weight:600;
}
.dashGameStage iframe{
  display:block;
  width:calc(100% + 2px);
  height:calc(100% + 2px);
  margin:-1px;
  border:0;
}

/* Desktop Games polish: theater sizing (desktop-only, scoped to dash-games) */
@media (min-width: 980px){
  body[data-page="dash-games"] .dashGameOverlay{
    align-items:center;
    justify-content:center;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  body[data-page="dash-games"] .dashGameOverlayBar,
  body[data-page="dash-games"] .dashGameOverlayFrame,
  body[data-page="dash-games"] .dashGameOverlayNotice{
    width:min(92vw, 1200px);
  }

  /* Default desktop stage: landscape theater (future games) */
  body[data-page="dash-games"] .dashGameStage{
    width:min(92vw, 1200px);
    aspect-ratio: 16 / 9;
    max-height: 82vh;
  }

  /* Current game is portrait: use height-driven sizing to avoid "mini window" */
  body.psGamePortrait[data-page="dash-games"] .dashGameStage{
    height:min(82vh, 860px);
    width:auto;
    max-width:min(92vw, 1200px);
    aspect-ratio: 9 / 16;
  }
  body[data-page="dash-games"] .dashGameOverlayNotice{
    text-align: left;
  }
}

/* Dash-games: ensure inline embed uses full width */
body[data-page="dash-games"] .dashHubGrid{
  grid-template-columns: minmax(0, 1fr);
}
body[data-page="dash-games"] .dashGameCard,
body[data-page="dash-games"] .dashGamePreview{
  width:100%;
  min-width:0;
}

.dashGrid{
  margin-top: 14px;
  display:grid;
  gap: 12px;
}

@media (min-width: 780px){
  .dashGrid{ grid-template-columns: 1fr 1fr; }
}

.dashPanel{
  border-radius: var(--radius);
  border: 1px solid var(--psDashCardBorder);
  background: var(--psDashCardBg);
  box-shadow: 0 0 0 1px var(--psDashCardInset) inset;
  backdrop-filter: blur(14px);
  padding: 14px;
}

.dashPanelTitle{
  font-size: 13px;
  letter-spacing: .2px;
  color: var(--fg);
  opacity: .92;
}

.dashBig{
  margin-top: 6px;
  font-size: var(--font-size-lg);
  font-weight: 700;
  letter-spacing: .2px;
}

.dashUnit{
  font-size: var(--font-size-xs);
  font-weight: 600;
  opacity: .78;
  margin-left: var(--spacing-xs);
}

.dashHint{
  margin-top: var(--spacing-xs);
  font-size: var(--font-size-xs);
  color: var(--muted);
}

.dashFeeRow{ display:grid; gap:12px; }
@media (min-width: 780px){ .dashFeeRow{ grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr);} }

.dashBlocks{ grid-column: 1 / -1; }

/* Mempool blocks: compact by default, expand on demand */
.dashBlocks[data-expanded="0"] .dashBlockItem.is-extra{ display:none; }

.dashMoreRow{ margin-top: 12px; display:flex; justify-content:center; }
.dashMoreBtn{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.02);
  color: var(--muted);
  border-radius: var(--border-radius-full);
  padding: 10px 14px;
  font-size: var(--font-size-xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.dashMoreBtn:hover{ background: rgba(255,255,255,.06); }
.dashMoreBtn:active{ transform: scale(.98); }
.dashMoreBtn:focus-visible{ outline: 2px solid rgba(255,255,255,.22); outline-offset: 2px; }

.dashBlockItem{
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--psDashCardBorder);
  background: var(--psDashCardBg);
  padding: 12px;
}

.dashBlockTop{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.dashBlockMeta{ font-size: var(--font-size-xs); color: var(--muted); }

.dashBar{
  margin-top: 10px;
  height: 10px;
  border-radius: var(--border-radius-full);
  background: rgba(255,255,255,.06);
  overflow:hidden;
}

.dashBar > span{
  display:block;
  height: 10px;
  width: 40%;
  border-radius: var(--border-radius-full);
  background: linear-gradient(90deg, rgba(60,255,140,.55), rgba(255,200,120,.60), rgba(255,90,90,.65));
}

.dashStats{ margin-top: 10px; display:grid; grid-template-columns: repeat(3, 1fr); gap:var(--spacing-sm); }
.dashStat{ border-radius: 12px; border: 1px solid var(--psDashCardBorder); background: var(--psDashCardBg); padding: 10px; }
.dashStat kbd{ display:block; font-size: 10px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.dashStat b{ display:block; margin-top: 3px; font-size: var(--font-size-xs); }

.dashError{
  border-radius: var(--radius);
  border: 1px solid rgba(255,90,90,.35);
  background: rgba(255,90,90,.10);
  padding: 12px;
  color: rgba(242,242,242,.92);
}
html[data-theme="light"] .dashError{ color: rgba(0,0,0,.86); }

/* -----------------------------
   Dashboard accordion panels
------------------------------ */

.dashPanels{ margin-top: 18px; display:grid; gap:14px; }

.dashPanelHead{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--psDashCardBorder);
  background: var(--psDashCardBg);
  color: var(--psDashCardText);
  backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px var(--psDashCardInset) inset;
}

html[data-theme="light"] .dashPanelHead{
  background: var(--psDashCardBg);
  box-shadow: var(--psDashCardShadow);
}

html[data-theme="dark"] .dashPanelHead{
  /* depth cue, but calmer */
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.028));
  box-shadow: 0 8px 20px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.025) inset;
}

.dashPanelHead:active{ transform: translateY(1px); }

.dashPanelHeadLeft{ display:flex; align-items:center; gap:10px; min-width: 0; flex: 1; }
.dashPanelMark{ opacity:.85; font-size: var(--font-size-xs); }
.dashPanelTitleText{ font-size: 13px; font-weight: 600; letter-spacing:.2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dashPanelCaret{ opacity:.75; transition: transform .18s ease; }

.dashPanelHead[aria-expanded="true"] .dashPanelCaret{ transform: rotate(180deg); }

.dashPanelBody{
  border-radius: var(--radius);
  border: 1px solid var(--psDashPanelBodyBorder);
  background: var(--psDashPanelBodyBg);
  backdrop-filter: blur(12px);
  padding: 10px 10px;
  box-shadow: none;
}

html[data-theme="dark"] .dashPanelBody{
  background: linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,.010));
}

html[data-theme="light"] .dashPanelBody{
  background: var(--psDashPanelBodyBg);
}

.dashPanelBody[hidden]{ display:none; }

.dashPanelInner{ padding: 0; }
.dashPanelToolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 10px;
}
.dashRefreshBtn{
  border-radius:var(--border-radius-full);
  padding:8px 12px;
  flex:0 0 auto;
}
.dashRefreshBtn.isBusy,
.dashRefreshBtn:disabled{
  opacity:.65;
  pointer-events:none;
}

/* RSS */
.rssToolbar{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.rssLeft{ min-width: 0; flex: 1 1 auto; }
.rssHint{ font-size: var(--font-size-xs); color: var(--psDashCardSub); line-height: 1.3; }
/* Current feed label: keep it readable */
.rssCurrent{ margin-top: 6px; font-size: var(--font-size-xs); color: var(--psDashCardSub); line-height: 1.3; }
.rssCurrent[data-kind="error"]{ color: var(--psDashStatusErr); }
.rssCurrent[data-kind="loading"]{ opacity: .92; }
.rssCurrent[data-kind="cache"]{ opacity: .92; }

.rssCats{
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.018);
}
html[data-theme="light"] .rssCats{
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.02);
}
.rssCatBtn{
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: var(--psDashCardSub);
  border-radius: var(--border-radius-full);
  padding: 5px 10px;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .12s ease;
}
.rssCatBtn:hover{
  color: var(--psDashCardText);
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
}
.rssCatBtn:active{ transform: translateY(1px); }
html[data-theme="light"] .rssCatBtn{
  border-color: rgba(0,0,0,.15);
  background: rgba(0,0,0,.03);
  color: rgba(0,0,0,.68);
}
html[data-theme="light"] .rssCatBtn:hover{
  border-color: rgba(0,0,0,.24);
  background: rgba(0,0,0,.06);
  color: rgba(0,0,0,.84);
}

/* Unified status colors across dash pages (explicit state set by JS). */
#dashStatus[data-kind="error"],
#dashStatsStatus[data-kind="error"],
#dashNostrStatus[data-kind="error"]{
  color: var(--psDashStatusErr);
}
#dashStatus[data-kind="loading"],
#dashStatsStatus[data-kind="loading"],
#dashNostrStatus[data-kind="loading"]{
  opacity: .92;
}
#dashStatus[data-kind="cache"],
#dashStatsStatus[data-kind="cache"]{
  opacity: .92;
}

/* Make selected category obvious */
.rssCatBtn.isOn,
.rssCatBtn[aria-pressed="true"]{
  border-color: rgba(255,190,100,.5);
  background: rgba(255,182,80,.16);
  color: rgba(255,232,185,.98);
  box-shadow: 0 0 0 1px rgba(255,255,255,.18) inset, 0 0 0 1px rgba(0,0,0,.18);
  opacity: 1;
}
html[data-theme="light"] .rssCatBtn.isOn,
html[data-theme="light"] .rssCatBtn[aria-pressed="true"]{
  border-color: rgba(176,124,56,.42);
  background: rgba(176,124,56,.14);
  color: rgba(78,55,19,.96);
}
.rssBtn{ border-radius: var(--border-radius-full); padding: 8px 12px; }

.rssList{ margin-top: 12px; display:grid; gap:12px; }
.rssItem{
  list-style: none;
  border-radius: 14px;
  border: 1px solid var(--psDashCardBorder);
  background: var(--psDashCardBg);
  padding: 12px 14px;
}

.rssItemTop{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.rssSrc,
.rssSource{ font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .18em; }
.rssDate{ font-size: 10px; color: var(--muted); white-space: nowrap; }
.rssTitle{ margin-top: var(--spacing-sm); font-size: 13px; line-height: 1.35; overflow-wrap:anywhere; }
.rssTitle a{ color: var(--psDashCardText); text-decoration: none; font-weight: 600; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient: vertical; overflow:hidden; }
.rssTitle a:hover{ text-decoration: underline; }
.rssDesc{
  margin-top: 6px;
  font-size: var(--font-size-xs);
  line-height: 1.45;
  color: var(--psDashCardSub);
}

/* Substack template polish: stronger hierarchy, reusable for next duplications. */
body[data-page="dash-substack"] .rssCurrent{
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(255,255,255,.02);
}
html[data-theme="light"] body[data-page="dash-substack"] .rssCurrent{
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.02);
}
body[data-page="dash-substack"] .rssItem{
  border-left: 2px solid rgba(255,188,108,.32);
}
body[data-page="dash-substack"] .rssSrc,
body[data-page="dash-substack"] .rssSource{
  letter-spacing: .14em;
  font-size: 9px;
}
body[data-page="dash-substack"] .rssDate{
  font-size: 10px;
}
body[data-page="dash-substack"] .rssTitle{
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
}
body[data-page="dash-substack"] .rssDesc{
  line-height: 1.5;
}
body[data-page="dash-substack"] .rssList{
  margin-top: 8px;
}
@media (max-width: 640px){
  body[data-page="dash-substack"] .rssToolbar{
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  body[data-page="dash-substack"] .dashRefreshBtn{
    align-self: flex-end;
  }
}
@media (min-width: 860px){
  .rssTitle a{ -webkit-line-clamp: 3; }
}

/* ── dash-feed.html (unified news feed page) ── */
body[data-page="dash-feed"] .rssCurrent{
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(255,255,255,.02);
}
html[data-theme="light"] body[data-page="dash-feed"] .rssCurrent{
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.02);
}
body[data-page="dash-feed"] .rssSource,
body[data-page="dash-feed"] .rssSrc{
  letter-spacing: .14em;
  font-size: 9px;
}
body[data-page="dash-feed"] .rssDate{
  font-size: 10px;
}
body[data-page="dash-feed"] .rssTitle{
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
}
body[data-page="dash-feed"] .rssTitle a{
  color: var(--psDashCardText);
  text-decoration: none;
  font-weight: 600;
}
body[data-page="dash-feed"] .rssTitle a:hover{
  text-decoration: underline;
}
body[data-page="dash-feed"] .rssDesc{
  line-height: 1.5;
}
body[data-page="dash-feed"] .rssList{
  margin-top: 8px;
}
@media (max-width: 640px){
  body[data-page="dash-feed"] .rssToolbar{
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  body[data-page="dash-feed"] .dashRefreshBtn{
    align-self: flex-end;
  }
}

.rssErr{
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid rgba(255,200,120,.30);
  background: rgba(255,200,120,.08);
  color: var(--psDashCardText);
  font-size: var(--font-size-xs);
  line-height: 1.4;
}
.rssErr[hidden]{ display: none !important; }
html[data-theme="light"] .rssErr{
  border-color: rgba(176,123,53,.34);
  background: rgba(176,123,53,.09);
  color: rgba(0,0,0,.82);
}

/* RSS proxy setup (dash-rss only; safe on other pages) */
.rssProxySetup{
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--psDashCardBorder);
  background: var(--psDashCardBg);
  box-shadow: 0 0 0 1px var(--psDashCardInset) inset;
  overflow: hidden;
}
.rssProxySummary{
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: var(--font-size-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--psDashCardText);
}
.rssProxySetup > summary::-webkit-details-marker{ display:none; }
.rssProxySetup[open] .rssProxySummary{
  border-bottom: 1px solid var(--psDashCardBorder);
  background: rgba(0,0,0,.10);
}
html[data-theme="light"] .rssProxySetup[open] .rssProxySummary{
  background: rgba(0,0,0,.04);
}
.rssProxyBody{ padding: 10px 12px 12px; }
.rssProxyRow{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.rssProxyLabel{ font-size: var(--font-size-xs); color: var(--psDashCardSub); }
.rssProxyInput{
  flex: 1 1 260px;
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--psDashCardBorder);
  background: rgba(0,0,0,.18);
  color: var(--psDashCardText);
}
html[data-theme="light"] .rssProxyInput{
  background: rgba(255,255,255,.60);
  color: rgba(0,0,0,.86);
}
.rssProxyMeta{ margin-top: var(--spacing-sm); font-size: var(--font-size-xs); color: var(--psDashCardSub); overflow-wrap:anywhere; }
.rssProxyMeta code{ color: var(--psDashCardText); }
.rssProxyActions{ margin-top: 10px; display:flex; gap:10px; flex-wrap:wrap; }
.rssProxyMsg{
  margin-top: var(--spacing-sm);
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid rgba(255,180,160,.28);
  background: rgba(255,180,160,.10);
  color: var(--psDashCardText);
  font-size: var(--font-size-xs);
  line-height: 1.4;
}
.rssProxyMsg[hidden]{ display:none !important; }
.rssProxyHint{ margin-top: var(--spacing-sm); font-size: var(--font-size-xs); color: var(--psDashCardSub); line-height: 1.35; }

/* App placeholder */
.appWip{ font-size: 13px; color: var(--muted); line-height:1.4; }
.appWip a{ color: var(--fg); }

/* -----------------------------
   Nostr panel
------------------------------ */

.pulse{ animation: nostrPulse 1.5s infinite ease-in-out; }
@keyframes nostrPulse{
  0% { opacity: 0.3; }
  50% { opacity: 1; text-shadow: 0 0 5px var(--accent); }
  100% { opacity: 0.3; }
}

.nostrStatus{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; margin-bottom:10px; }
.nostrDot{ margin-right:6px; }
#dashPanelNostr .dashPanelToolbar .nostrStatus{ margin-bottom:0; }

/* Nostr - polish (status row + refresh) */
.nostrStatusRow{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.nostrStatusMain{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nostrRefreshBtn{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.78em;
  line-height: 1;
  padding: 4px 10px;
  border-radius: var(--border-radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0.85;
}
.nostrRefreshBtn:hover{ opacity:1; border-color: var(--accent); color: var(--fg); }
.nostrRefreshBtn:focus-visible{
  outline: 2px solid rgba(255,255,255,.45);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.16);
}
html[data-theme="light"] .nostrRefreshBtn:focus-visible{
  outline-color: rgba(0,0,0,.5);
  box-shadow: 0 0 0 2px rgba(0,0,0,.16);
}

.nostrList{ display:flex; flex-direction:column; gap:12px; }
.nostrItem{
  border-radius: 14px;
  border: 1px solid var(--psDashCardBorder);
  background: var(--psDashCardBg);
  padding: 12px 14px;
  border-left: 2px solid var(--accent);
}

.nostrMeta{
  opacity:0.6;
  font-size:0.75em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  margin-bottom:var(--spacing-xs);
  display:flex;
  justify-content:space-between;
  gap:10px;
}

.nostrOpen{ color: var(--accent); text-decoration:none; margin-right:var(--spacing-sm); opacity:0.7; }
.nostrOpen:hover{ opacity:1; text-decoration:underline; }

.nostrTitle{ font-weight:600; margin: 0 0 6px; overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow:hidden; }
@media (min-width: 860px){
  .nostrTitle{ -webkit-line-clamp: 3; }
}

.nostrBody{ font-size:0.9em; line-height:1.4; word-break: break-word; }

.nostrLink{ color: var(--accent); text-decoration: none; }

/* Nostr - collapse long notes (avoid "wall of text") */
.nostrBody.nostrClamp{
  display:-webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 10;
  overflow:hidden;
}
@media (min-width: 721px){
  .nostrBody.nostrClamp{ -webkit-line-clamp: 14; }
}
.nostrBody.nostrExpanded{
  display:block;
  overflow:visible;
}

.nostrMoreBtn{
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: var(--border-radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.78em;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}
.nostrMoreBtn:hover{ opacity:1; border-color: var(--accent); color: var(--fg); }
.nostrMoreBtn:focus-visible{
  outline: 2px solid rgba(255,255,255,.45);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.16);
}
html[data-theme="light"] .nostrMoreBtn:focus-visible{
  outline-color: rgba(0,0,0,.5);
  box-shadow: 0 0 0 2px rgba(0,0,0,.16);
}

.nostrLink:hover{ text-decoration: underline; }

.nostrErr{ color: var(--danger); }

/* COMPAT: PS Nav Shell + Breadcrumb for dash-* pages (pulled from base/components) */
body[data-page="dashboard"],
body[data-page^="dash-"]{
  --psDashDesktopW: 1180px;
}
body[data-page^="dash-"]{
  --psShellMaxW: var(--pageW, 1200px);
  --psShellGutter: var(--gutter, 14px);
}

body[data-page^="dash-"] .fixedHeader{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:var(--z-header);
  display:flex;
  flex-direction:column;
  align-items:stretch;
  padding-top: env(safe-area-inset-top, 0px);
  pointer-events:none;
}

body[data-page^="dash-"] .fixedHeader .psShell{ pointer-events:auto; }

body[data-page^="dash-"] .psShell{
  max-width:calc(var(--psShellMaxW) - (var(--psShellGutter) * 2));
  width:100%;
  margin:0 auto;
  padding:12px 14px 10px;
  border-radius:26px;
  border:1px solid var(--ps-shell-border, rgba(255,255,255,.12));
  background:var(--ps-shell-bg, rgba(0,0,0,.58));
  backdrop-filter: var(--ps-shell-blur, blur(8px));
  box-shadow:var(--ps-shell-shadow, 0 12px 30px rgba(0,0,0,.55));
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}
body[data-page^="dash-"] .psShellBrandRow{ width:100%; display:flex; align-items:center; justify-content:center; }
body[data-page^="dash-"] .psBrandLink{ display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
body[data-page^="dash-"] .psShellControlsRow{ width:100%; display:flex; align-items:center; justify-content:center; }
body[data-page^="dash-"] .psControlsDefault,
body[data-page^="dash-"] .psControlsTray{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}
body[data-page^="dash-"] .psControlsTray{ gap:var(--spacing-sm); }

body[data-page^="dash-"] .psShellSearch{
  flex:1 1 auto;
  display:flex;
  align-items:center;
  gap:var(--spacing-sm);
  width:100%;
  max-width:520px;
}
body[data-page^="dash-"] .psShellSearchInput{
  flex:1 1 auto;
  width:100%;
  height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:var(--color-text-primary, var(--fg));
  padding:0 12px;
  outline:none;
}
body[data-page^="dash-"] .psShellSearchInput:focus{
  border-color:rgba(34,197,94,.45);
  background:rgba(255,255,255,.08);
  box-shadow:0 0 0 2px rgba(34,197,94,.25);
}

body[data-page^="dash-"] .psShell .psShellBtn{
  width:46px;
  height:46px;
  padding:0;
  border-radius:16px;
  font-size:22px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);
  color:var(--fg);
  box-shadow:0 10px 18px rgba(0,0,0,.28);
}
body[data-page^="dash-"] .psShell .psShellBtn:hover{ background:rgba(255,255,255,.09); }
body[data-page^="dash-"] .psShell .psShellBtn:active{ transform:translateY(0); }

body[data-page^="dash-"] .psShell .psBrandLink{
  padding:6px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
}

body[data-page^="dash-"] .fixedHeader.isCompact .psShell{
  padding:8px 12px 9px;
  border-radius:22px;
  gap:var(--spacing-sm);
}
body[data-page^="dash-"] .fixedHeader.isCompact .psShellBrandRow{ display:none; }
body[data-page^="dash-"] .fixedHeader.isCompact .psControlsDefault{ gap:6px; }
body[data-page^="dash-"] .fixedHeader.isCompact .psControlsTray{ gap:6px; }
body[data-page^="dash-"] .fixedHeader.isCompact .psShellSearchInput{ height:38px; border-radius:13px; }
body[data-page^="dash-"] .fixedHeader.isCompact .psShell .psShellBtn{
  width:40px;
  height:40px;
  border-radius:14px;
  font-size:var(--font-size-lg);
}

body[data-page^="dash-"] .headerSep{ width:100%; height:1px; background:rgba(255,255,255,.10); margin-top:2px; }

html[data-theme="light"] body[data-page^="dash-"] .psShell{
  --ps-shell-border: rgba(0,0,0,.14);
  --ps-shell-bg: rgba(255,255,255,.72);
  --ps-shell-shadow: 0 12px 30px rgba(0,0,0,.18);
}
html[data-theme="light"] body[data-page^="dash-"] .psShellSearchInput{
  border:1px solid rgba(0,0,0,.14);
  background:rgba(0,0,0,.03);
  color:rgba(0,0,0,.82);
}
html[data-theme="light"] body[data-page^="dash-"] .psShell .psShellBtn{
  border-color:rgba(0,0,0,.14);
  background:rgba(0,0,0,.03);
  color:var(--fg);
  box-shadow:0 10px 18px rgba(0,0,0,.16);
}
html[data-theme="light"] body[data-page^="dash-"] .psShell .psShellBtn:hover{ background:rgba(0,0,0,.05); }
html[data-theme="light"] body[data-page^="dash-"] .psShell .psBrandLink{
  border-color:rgba(0,0,0,.12);
  background:rgba(0,0,0,.02);
}
html[data-theme="light"] body[data-page^="dash-"] .headerSep{ background:rgba(0,0,0,.10); }

@media (max-width: 420px){
  body[data-page^="dash-"] .psShell{ padding:10px 12px 8px; border-radius:22px; }
  body[data-page^="dash-"] .psShellSearch{ max-width:100%; }
}

body[data-page^="dash-"] #psBreadcrumbMount,
body[data-page^="dash-"] .psBreadcrumbBar{
  display:none !important;
  margin:6px 0 8px;
  padding:0 2px;
  overflow:hidden;
}
body[data-page^="dash-"] .psCrumbs{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:var(--spacing-sm);
  margin:0 0 6px;
  padding:0;
  font-size:11px;
  letter-spacing:.18em;
  text-transform:uppercase;
  opacity:.72;
  min-width:0;
}
body[data-page^="dash-"] .psCrumbs a{
  display:inline-flex;
  align-items:center;
  min-width:0;
  padding:2px 4px;
  border-radius:6px;
  color:rgba(242,242,242,.86);
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.12);
}
body[data-page^="dash-"] .psCrumbs a:hover{
  color:#fff;
  border-bottom-color:rgba(255,255,255,.30);
}
body[data-page^="dash-"] .psCrumbs a:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
body[data-page^="dash-"] .psCrumbSep{
  opacity:.65;
  font-size:var(--font-size-xs);
  margin:0 2px;
}
body[data-page^="dash-"] .psCrumbHere{
  display:inline-flex;
  align-items:center;
  min-width:0;
  color:rgba(242,242,242,.92);
  opacity:.92;
}
body[data-page^="dash-"] .psBreadcrumbBar .psCrumbHere{
  font-weight:700;
  opacity:.98;
}

html[data-theme="light"] body[data-page^="dash-"] .psCrumbs a{
  color:rgba(0,0,0,.78);
  border-bottom-color:rgba(0,0,0,.12);
}
html[data-theme="light"] body[data-page^="dash-"] .psCrumbs a:hover{
  color:#000;
  border-bottom-color:rgba(0,0,0,.28);
}
html[data-theme="light"] body[data-page^="dash-"] .psCrumbHere{ color:rgba(0,0,0,.84); }

@media (max-width: 640px){
  body[data-page^="dash-"] .psBreadcrumbBar{ margin:4px 0 6px; }
  body[data-page^="dash-"] .psBreadcrumbBar .psCrumbs{
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  body[data-page^="dash-"] .psBreadcrumbBar .psCrumbs > *{
    display:inline;
  }
}

/* COMPAT: Dash overlays close + declutter */
body[data-page^="dash-"] #psThemePackBtn{
  display:none !important;
}

body[data-page^="dash-"] .psControlsTray,
body[data-page^="dash-"] #psTrayBackdrop{
  pointer-events:auto;
}

body[data-page^="dash-"] #psTrayBackdrop{
  position:fixed;
  inset:0;
  z-index:var(--z-modal-backdrop);
  background: rgba(0,0,0,.45);
}

body[data-page^="dash-"] #psTrayBackdrop[hidden]{
  display:none !important;
  pointer-events:none;
}

body[data-page^="dash-"] .psControlsTray{
  position:relative;
  z-index:calc(var(--z-modal-backdrop) + 1);
}
body.psDesktopTrayMode[data-page^="dash-"] .psControlsTray{
  position: fixed !important;
}
body[data-page^="dash-"] .psControlsTray[hidden]{
  display:none !important;
  pointer-events:none;
}

/* COMPAT: Dash mask slot fixed size (anti-explosion) */
body[data-page^="dash-"] .psMaskBtn{
  flex:0 0 auto;
  width:46px;
  height:46px;
  min-width:46px;
  min-height:46px;
  max-width:46px;
  max-height:46px;
  padding:0;
  overflow:hidden;
  border-radius:14px;
}
body[data-page^="dash-"] .psMaskImg{
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  display:block;
  object-fit:cover;
}
body[data-page^="dash-"] .psMaskLabel{
  display:none !important;
}

body[data-page^="dash-"] .psShell,
body[data-page^="dash-"] .psShellBrandRow,
body[data-page^="dash-"] .psShellControlsRow{
  overflow:hidden;
}

/* Debug overlay (enabled via ?ps_shell_debug=1) */
body[data-page^="dash-"] #psShellDebugPanel{
  position:fixed;
  top:12px;
  right:12px;
  z-index:var(--z-debug);
  width:min(420px, 92vw);
  max-height:70vh;
  overflow:hidden;
  background:rgba(0,0,0,.78);
  color:#f2f2f2;
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  box-shadow:0 12px 30px rgba(0,0,0,.45);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
body[data-page^="dash-"] #psShellDebugPanel .psShellDebugHeader{
  padding:8px 10px;
  font-size:var(--font-size-xs);
  letter-spacing:.08em;
  text-transform:uppercase;
  border-bottom:1px solid rgba(255,255,255,.10);
}
body[data-page^="dash-"] #psShellDebugPanel .psShellDebugBody{
  margin:0;
  padding:8px 10px;
  font-size:11px;
  line-height:1.3;
  white-space:pre-wrap;
  max-height:42vh;
  overflow:auto;
}
body[data-page^="dash-"] #psShellDebugPanel .psShellDebugActions{
  display:flex;
  gap:var(--spacing-sm);
  padding:8px 10px;
  border-top:1px solid rgba(255,255,255,.10);
}
body[data-page^="dash-"] #psShellDebugPanel .psShellDebugBtn{
  flex:1;
  padding:6px 8px;
  border-radius:var(--border-radius-full);
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  color:#fff;
  font-size:11px;
  cursor:pointer;
}
body[data-page^="dash-"] #psShellDebugPanel .psShellDebugBtn:hover{
  background:rgba(255,255,255,.12);
}

/* v0.14 - Inline panel sections (mempool under stats)
   Safe: local styles only, no layout reflow. */
.dashInlineSep{
  height:1px;
  margin:10px 0;
  background: rgba(255,255,255,.08);
}
html[data-theme="light"] .dashInlineSep{
  background: rgba(0,0,0,.08);
}
.dashInlineLabel{
  font-weight: 600;
  opacity: .9;
}

/* Home - single dashboard entrypoint */
body[data-page="home"] .homeDashEntry{
  margin: 12px 0 10px;
}
body[data-page="home"] .homeDashEntryLink:not(.psDashNavBtn){
  display:block;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  color: var(--fg);
  text-decoration:none;
}
body[data-page="home"] .homeDashEntryTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
body[data-page="home"] .homeDashEntryTitle{
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
body[data-page="home"] .homeDashEntryState{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:var(--spacing-xs) var(--spacing-sm);
  border-radius:var(--border-radius-full);
  border:1px solid rgba(80,255,150,.34);
  background: rgba(80,255,150,.12);
  color: rgba(170,255,205,.96);
  font-size: 9px;
  font-weight:700;
  letter-spacing:.1em;
  text-transform: uppercase;
}
body[data-page="home"] .homeDashEntryHint{
  display:block;
  margin-top: 7px;
  font-size: var(--font-size-xs);
  color: var(--muted);
}
html[data-theme="light"] body[data-page="home"] .homeDashEntryLink{
  border-color: rgba(0,0,0,.14);
  background: rgba(0,0,0,.02);
}
html[data-theme="light"] body[data-page="home"] .homeDashEntryState{
  color: rgba(35,122,71,.95);
  border-color: rgba(47,148,88,.34);
  background: rgba(47,148,88,.11);
}
@media (min-width: 901px){
  body[data-page="home"] .homeDashEntry{
    margin: 14px 0 10px;
  }
  body[data-page="home"] .homeDashEntryLink{
    padding: 13px 16px;
  }
}

/* Desktop pass: denser dashboard rhythm + wider stat layout (mobile-safe). */
@media (min-width: 1040px){
  body[data-page="dashboard"] #psAppNav,
  body[data-page="bitcoin-stats"] #psAppNav,
  body[data-page^="dash-"] #psAppNav{
    display: none !important;
  }

  html[data-ps-shell="standard"] body[data-page="dashboard"],
  html[data-ps-shell="standard"] body[data-page="bitcoin-stats"],
  html[data-ps-shell="standard"] body[data-page^="dash-"]{
    padding-bottom: 0 !important;
  }

  /* Desktop readability pass: RSS panel */
  body[data-page="dash-rss"] #dashPanelRss .dashPanelInner{
    padding: 4px 2px 2px;
  }
  body[data-page="dash-rss"] .rssToolbar{
    gap: var(--spacing-md);
    margin-bottom: 2px;
  }
  body[data-page="dash-rss"] .rssLeft{
    max-width: 72ch;
  }
  body[data-page="dash-rss"] .rssHint{
    font-size: var(--font-size-xs);
    letter-spacing: .01em;
    opacity: .9;
  }
  body[data-page="dash-rss"] .rssCurrent{
    margin-top: var(--spacing-sm);
    font-size: 13px;
  }
  body[data-page="dash-rss"] .rssList{
    margin-top: 14px;
    gap: 14px;
  }
  body[data-page="dash-rss"] .rssItem{
    padding: 14px 16px;
  }
  body[data-page="dash-rss"] .rssDate{
    font-size: 11px;
  }
  body[data-page="dash-rss"] .rssTitle{
    margin-top: 10px;
    font-size: var(--font-size-sm);
    line-height: 1.42;
  }
  body[data-page="dash-rss"] .rssDesc{
    margin-top: var(--spacing-sm);
    line-height: 1.55;
    max-width: 86ch;
  }

  body[data-page="dash-substack"] #dashPanelSubstack .dashPanelInner{
    padding: 4px 2px 2px;
  }
  body[data-page="dash-substack"] .rssToolbar{
    gap: var(--spacing-md);
    margin-bottom: 2px;
  }
  body[data-page="dash-substack"] .rssLeft{
    max-width: 82ch;
  }
  body[data-page="dash-substack"] .rssList{
    margin-top: 14px;
    gap: 14px;
  }
  body[data-page="dash-substack"] .rssItem{
    padding: 14px 16px;
  }

  /* Desktop readability pass: Nostr panel */
  body[data-page="dash-nostr"] #dashPanelNostr .dashPanelInner{
    padding: 4px 2px 2px;
  }
  body[data-page="dash-nostr"] #dashPanelNostr .dashPanelToolbar{
    margin-bottom: 12px;
  }
  body[data-page="dash-nostr"] .nostrStatus{
    max-width: 62ch;
    font-size: var(--font-size-xs);
    line-height: 1.35;
  }
  body[data-page="dash-nostr"] .nostrRefreshBtn{
    padding: 8px 12px;
    font-size: var(--font-size-xs);
  }
  body[data-page="dash-nostr"] .nostrList{
    gap: 14px;
  }
  body[data-page="dash-nostr"] .nostrItem{
    padding: 14px 16px;
  }
  body[data-page="dash-nostr"] .nostrMeta{
    margin-bottom: 6px;
    font-size: 11px;
    opacity: .7;
  }
  body[data-page="dash-nostr"] .nostrTitle{
    font-size: 15px;
    line-height: 1.36;
  }
  body[data-page="dash-nostr"] .nostrBody{
    font-size: 13px;
    line-height: 1.56;
  }

  /* Desktop readability pass: Feed unified page */
  body[data-page="dash-feed"] .rssToolbar{
    gap: var(--spacing-md);
    margin-bottom: 2px;
  }
  body[data-page="dash-feed"] .rssLeft{
    max-width: 82ch;
  }
  body[data-page="dash-feed"] .rssList{
    margin-top: 14px;
    gap: 14px;
  }
  body[data-page="dash-feed"] .rssItem{
    padding: 14px 16px;
  }
  body[data-page="dash-feed"] .rssDate{
    font-size: 11px;
  }
  body[data-page="dash-feed"] .rssTitle{
    margin-top: 10px;
    font-size: var(--font-size-sm);
    line-height: 1.42;
  }
  body[data-page="dash-feed"] .rssDesc{
    margin-top: var(--spacing-sm);
    line-height: 1.55;
    max-width: 86ch;
  }
  body[data-page="dash-feed"] .nostrList{
    gap: 14px;
  }
  body[data-page="dash-feed"] .nostrItem{
    padding: 14px 16px;
  }
  body[data-page="dash-feed"] .nostrMeta{
    margin-bottom: 6px;
    font-size: 11px;
    opacity: .7;
  }
  body[data-page="dash-feed"] .nostrTitle{
    font-size: 15px;
    line-height: 1.36;
  }
  body[data-page="dash-feed"] .nostrBody{
    font-size: 13px;
    line-height: 1.56;
  }

  /* Hub micro-polish: keep action pill aligned on desktop cards */
  body[data-page="dashboard"] .dashHubCardTop{
    align-items: flex-start;
  }
  body[data-page="dashboard"] .dashHubCardAction{
    min-width: 64px;
  }

  body[data-page="dashboard"] .dashHub{
    gap: 26px;
  }
  body[data-page="dashboard"] .dashHubSection{
    gap: 14px;
  }
  body[data-page="dashboard"] .dashHubGrid{
    align-items: stretch;
  }
  body[data-page="dashboard"] .dashHubCard{
    min-height: 96px;
    padding: 16px 18px;
  }
  body[data-page="dashboard"] .dashHubGrid > .dashHubCard:only-child{
    grid-column: 1 / -1;
  }
  body[data-page="dashboard"] .dashHubCardMeta{
    max-width: 42ch;
    line-height: 1.45;
  }
  body[data-page="dashboard"] .dashHubGrid > .dashHubCard:only-child .dashHubCardMeta{
    max-width: 64ch;
  }

  body[data-page="dash-stats"] #dashPanelStats .dashPanelInner{
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(340px, .78fr);
    grid-template-areas:
      "toolbar toolbar"
      "stats mempoolLabel"
      "stats mempoolStatus"
      "stats mempool";
    column-gap: var(--spacing-md);
    row-gap: 10px;
    align-items: start;
  }
  body[data-page="dash-stats"] #dashPanelStats .dashPanelToolbar{
    grid-area: toolbar;
    margin-bottom: 0;
  }
  body[data-page="dash-stats"] #dashPanelStats #dashStatsMount{
    grid-area: stats;
  }
  body[data-page="dash-stats"] #dashPanelStats .dashSep{
    display: none;
  }
  body[data-page="dash-stats"] #dashPanelStats .dashInlineLabel{
    grid-area: mempoolLabel;
    margin-top: 2px;
  }
  body[data-page="dash-stats"] #dashPanelStats #dashStatus{
    grid-area: mempoolStatus;
    margin-top: 0;
  }
  body[data-page="dash-stats"] #dashPanelStats #dashMempool{
    grid-area: mempool;
    margin-top: 0;
  }
}

@media (min-width: 1280px){
  body[data-page="dash-stats"] #dashPanelStats .dashPanelInner{
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
  }
}

/* --- hotfix: dash-games minimal card (cover + icon buttons) --- */
.dashGamesGrid{
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.dashGameActions.dashGameActions--icons{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dashIconBtn{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 44px;
  padding: 10px 0;
}
.dashIconBtn svg{
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* --- dash-games icon-only UI (hotfix) --- */
.dashGamesGrid{display:grid;gap:14px;}

.dashGamePreview.isCover{
  height:auto;
  padding:0;
  aspect-ratio: 1200 / 873;
  border-radius: var(--border-radius-lg);
  overflow:hidden;
}
.dashGamePreview.isCover picture{display:block;width:100%;height:100%;}
.dashGamePreview.isCover .dashGamePreviewImg{position:static;display:block;width:100%;height:100%;object-fit:cover;}

.dashIconBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:0;
  min-height:44px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.06);
  color:inherit;
  text-decoration:none;
  -webkit-tap-highlight-color: transparent;
}
.dashIconBtn:active{transform:translateY(1px);}

.dashGameActions{
  display:flex;
  gap:10px;
  margin-top:12px;
}
.dashGameBtn{flex:1;}

/* Overlay close: keep it compact */
.dashGameOverlayClose{
  width:40px;
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:var(--border-radius-full);
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(0,0,0,0.35);
}

/* Prevent page scroll while overlay is open */
.psGameOverlayOpen{overflow:hidden !important;}

/* v2.0 Beta 12 - Markets polish pack: dashboard tuning */
html[data-ps-preset="bitcoin"] .dashPanel,
html[data-ps-preset="bitcoin"] .dashCard{
  border-radius: var(--card-radius);
  background: var(--card-bg);
  border-color: var(--card-border);
  box-shadow: var(--card-shadow-soft);
}

/* Home - Last update (live recap, minimal technical feed) */
body[data-page="home"] .lastUpdateSection{
  margin-top: var(--spacing-xs);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  padding: 10px 12px;
}
body[data-page="home"] .lastUpdateSection.is-empty{
  border-color: rgba(255,255,255,.05);
  background: rgba(255,255,255,.01);
}
html[data-theme="light"] body[data-page="home"] .lastUpdateSection{
  border-color: rgba(0,0,0,.10);
  background: rgba(0,0,0,.01);
}
html[data-theme="light"] body[data-page="home"] .lastUpdateSection.is-empty{
  border-color: rgba(0,0,0,.07);
}
body[data-page="home"] .lastUpdateTitle{
  margin: 0;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
body[data-page="home"] .lastUpdateFeed{
  margin-top: var(--spacing-sm);
  display: grid;
  gap: var(--spacing-sm);
}

/* Home - Terminal tiles (Featured) */
body[data-page="home"] #homeLastUpdateSection .termTiles{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 360px){
  body[data-page="home"] #homeLastUpdateSection .termTiles{
    grid-template-columns: 1fr;
  }
}

body[data-page="home"] #homeLastUpdateSection .termTile{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  min-width: 0;
  padding: 12px 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  text-decoration: none;
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, filter .12s ease, border-color .12s ease;
}
html[data-theme="light"] body[data-page="home"] #homeLastUpdateSection .termTile{
  border-color: rgba(0,0,0,.10);
  background: linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.01));
}
body[data-page="home"] #homeLastUpdateSection .termTile:hover{
  filter: brightness(1.02);
  border-color: rgba(255,255,255,.20);
}
html[data-theme="light"] body[data-page="home"] #homeLastUpdateSection .termTile:hover{
  border-color: rgba(0,0,0,.16);
}
body[data-page="home"] #homeLastUpdateSection .termTile:active{
  transform: translateY(1px);
}
body[data-page="home"] #homeLastUpdateSection .termTile:focus-visible{
  outline: 2px solid var(--accentGreenReadable);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce){
  body[data-page="home"] #homeLastUpdateSection .termTile{
    transition: none;
  }
  body[data-page="home"] #homeLastUpdateSection .termTile:active{
    transform: none;
  }
}

body[data-page="home"] #homeLastUpdateSection .termTile::after{
  content: "›";
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: var(--font-size-base);
  opacity: .40;
  pointer-events: none;
}

body[data-page="home"] #homeLastUpdateSection .termTileTop{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--spacing-sm);
  min-width: 0;
}

body[data-page="home"] #homeLastUpdateSection .termTileBadge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  flex: 0 0 auto;
}
html[data-theme="light"] body[data-page="home"] #homeLastUpdateSection .termTileBadge{
  border-color: rgba(0,0,0,.10);
  background: rgba(0,0,0,.02);
}

body[data-page="home"] #homeLastUpdateSection .termTileDate{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex: 0 0 auto;
  opacity: .92;
}

body[data-page="home"] #homeLastUpdateSection .termTileTitle{
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: .01em;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Category accents */
body[data-page="home"] #homeLastUpdateSection .termTile--games{ --termA: rgba(247,147,26,.95); }
body[data-page="home"] #homeLastUpdateSection .termTile--resources{ --termA: rgba(255,90,90,.90); }
body[data-page="home"] #homeLastUpdateSection .termTile--blog{ --termA: rgba(80,255,170,.92); }

body[data-page="home"] #homeLastUpdateSection .termTileBadge--games{
  border-color: rgba(247,147,26,.26);
  background: rgba(247,147,26,.10);
  color: rgba(255,215,170,.96);
}
body[data-page="home"] #homeLastUpdateSection .termTileBadge--resources{
  border-color: rgba(255,90,90,.26);
  background: rgba(255,90,90,.10);
  color: rgba(255,200,200,.96);
}
body[data-page="home"] #homeLastUpdateSection .termTileBadge--blog{
  border-color: rgba(80,255,170,.24);
  background: rgba(80,255,170,.10);
  color: rgba(200,255,230,.96);
}
html[data-theme="light"] body[data-page="home"] #homeLastUpdateSection .termTileBadge--games{
  color: rgba(120,70,10,.96);
  border-color: rgba(247,147,26,.30);
  background: rgba(247,147,26,.12);
}
html[data-theme="light"] body[data-page="home"] #homeLastUpdateSection .termTileBadge--resources{
  color: rgba(120,30,30,.96);
  border-color: rgba(255,90,90,.30);
  background: rgba(255,90,90,.12);
}
html[data-theme="light"] body[data-page="home"] #homeLastUpdateSection .termTileBadge--blog{
  color: rgba(20,90,55,.96);
  border-color: rgba(80,170,120,.34);
  background: rgba(80,170,120,.12);
}
body[data-page="home"] .lastUpdateGroup{
  display: grid;
  gap: var(--spacing-xs);
}
body[data-page="home"] .lastUpdateGroupLabel{
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .85;
}
body[data-page="home"] .lastUpdateRow{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--spacing-sm);
  text-decoration: none;
  color: var(--fg);
  min-width: 0;
}
body[data-page="home"] .lastUpdateRowTitle{
  font-size: var(--font-size-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
body[data-page="home"] .lastUpdateRowDate{
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex: 0 0 auto;
}

/* Home - Dashboard + Last update (single dropdown object) */
body[data-page="home"] .lastUpdateSection.homeDashDrop{
  margin: 12px 0 10px;
  padding: 0;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 14px;
  display: flex;
  flex-direction: column;

  --psShutterHandleH: 56px;
  --psShutterEase: cubic-bezier(0.25, 1, 0.5, 1);
  --psShutterDur: 1.25s;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection[data-ps-frame-locked="1"]{
  height: var(--psShutterFrameH) !important;
  min-height: var(--psShutterFrameH) !important;
  max-height: var(--psShutterFrameH) !important;
}
html[data-ps-preset="invaders"] body[data-page="home"] .lastUpdateSection.homeDashDrop{
  --psShutterDur: 1.45s;
  --psShutterEase: cubic-bezier(0.22, 0.92, 0.18, 1);
}
body[data-page="home"] .lastUpdateSection.homeDashDrop.is-empty{
  /* keep the empty state styling but preserve the combined container shape */
  padding: 0;
}

/* Home - Dashboard shutter (vertical saracinesca) */
body[data-page="home"] #homeLastUpdateSection[data-collapsed="1"]{
  min-height: clamp(160px, 22vh, 220px);
}

/* Home mobile harmony: larger closed shutter to reduce dead space under the fold. */
@media (max-width: 900px){
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection{
    --psShutterHandleH: 60px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection[data-collapsed="1"]{
    min-height: clamp(248px, 42vh, 420px);
  }
}
@media (max-width: 640px){
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection[data-collapsed="1"]{
    min-height: clamp(230px, 40vh, 380px);
  }
}
@media (min-width: 901px){
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection{
    --psShutterHandleH: 62px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection[data-collapsed="1"]{
    min-height: clamp(280px, 44vh, 520px);
  }
}

body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel{
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: var(--psShutterHandleH);
  z-index: 2;
  pointer-events: none;

  transform: translateY(0);
  transition: transform var(--psShutterDur) var(--psShutterEase);

  background-color: rgba(10,10,10,.96);
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(0,0,0,1) 0px,
      rgba(0,0,0,1) 2px,
      rgba(30,30,30,1) 3px,
      rgba(30,30,30,1) 20px
    );
  filter: contrast(1.05);
}
body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(255,255,255,.06) 0%,
      rgba(255,255,255,.02) 18%,
      rgba(0,0,0,0) 74%,
      rgba(0,0,0,.16) 100%
    );
  opacity: .95;
  mix-blend-mode: screen;
}
body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 4%, rgba(255,255,255,.12), rgba(255,255,255,0) 55%),
    linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.07) 48%, rgba(255,255,255,0) 100%);
  opacity: .32;
}
body[data-page="home"] #homeLastUpdateSection[data-collapsed="1"] .homeDashShutterPanel{
  pointer-events: auto;
}
body[data-page="home"] #homeLastUpdateSection[data-collapsed="0"] .homeDashShutterPanel{
  pointer-events: none;
}
html[data-theme="light"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel::before{
  mix-blend-mode: multiply;
  opacity: .55;
}
html[data-theme="light"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel::after{
  opacity: .18;
}
html[data-ps-preset="bitcoin"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel{
  background-color: rgba(34,18,0,.96);
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(18,10,0,1) 0px,
      rgba(18,10,0,1) 2px,
      rgba(78,41,0,1) 3px,
      rgba(78,41,0,1) 20px
    );
  filter: contrast(1.08) saturate(1.06);
}
html[data-ps-preset="bitcoin"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel::after{
  background:
    radial-gradient(120% 90% at 50% 4%, rgba(247,147,26,.24), rgba(247,147,26,0) 55%),
    linear-gradient(90deg, rgba(247,147,26,0) 0%, rgba(247,147,26,.18) 48%, rgba(247,147,26,0) 100%);
  opacity: .36;
}
html[data-ps-preset="bitcoin"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterTitle{
  color: rgba(255,198,138,.94);
  text-shadow: 0 0 14px rgba(247,147,26,.26), 0 10px 34px rgba(0,0,0,.56);
}
html[data-ps-preset="bitcoin"] body[data-page="home"] #homeLastUpdateSection #homeDashDropToggle.homeDashHandle{
  border-top-color: rgba(247,147,26,.36);
  background: linear-gradient(180deg, rgba(58,30,0,.62), rgba(26,14,0,.82));
}
html[data-ps-preset="ritualplus"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel{
  background-color: rgba(50,8,8,.96);
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(30,4,4,1) 0px,
      rgba(30,4,4,1) 2px,
      rgba(100,18,18,1) 3px,
      rgba(100,18,18,1) 20px
    );
  filter: contrast(1.08) saturate(1.08);
}
html[data-ps-preset="ritualplus"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel::after{
  background:
    radial-gradient(120% 90% at 50% 4%, rgba(255,96,96,.22), rgba(255,96,96,0) 55%),
    linear-gradient(90deg, rgba(255,96,96,0) 0%, rgba(255,96,96,.16) 48%, rgba(255,96,96,0) 100%);
  opacity: .34;
}
html[data-ps-preset="ritualplus"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterTitle{
  color: rgba(255,188,188,.93);
  text-shadow: 0 0 12px rgba(255,96,96,.24), 0 10px 34px rgba(0,0,0,.56);
}
html[data-ps-preset="ritualplus"] body[data-page="home"] #homeLastUpdateSection #homeDashDropToggle.homeDashHandle{
  border-top-color: rgba(255,96,96,.34);
  background: linear-gradient(180deg, rgba(86,18,18,.58), rgba(34,8,8,.82));
}
html[data-ps-preset="paper"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel{
  background-color: rgba(14,44,24,.94);
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(8,28,16,.92) 0px,
      rgba(8,28,16,.92) 2px,
      rgba(26,78,42,.86) 3px,
      rgba(26,78,42,.86) 20px
    );
  filter: contrast(1.06) saturate(1.04);
}
html[data-ps-preset="paper"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel::before{
  background:
    linear-gradient(180deg,
      rgba(120,255,170,.18) 0%,
      rgba(120,255,170,.08) 28%,
      rgba(0,0,0,0) 76%,
      rgba(24,70,38,.24) 100%
    );
  mix-blend-mode: normal;
  opacity: .78;
}
html[data-ps-preset="paper"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel::after{
  background:
    radial-gradient(120% 90% at 50% 4%, rgba(120,255,170,.24), rgba(120,255,170,0) 55%),
    linear-gradient(90deg, rgba(120,255,170,0) 0%, rgba(120,255,170,.16) 48%, rgba(120,255,170,0) 100%);
  opacity: .30;
}

body[data-page="home"] #homeLastUpdateSection[data-collapsed="0"] .homeDashShutterPanel{
  transform: translateY(-100%);
}

body[data-page="home"] #homeLastUpdateSection .homeDashShutterTitle{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: clamp(18px, 5.2vw, 34px);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(242,242,242,.92);
  opacity: .82;
  text-shadow: 0 12px 40px rgba(0,0,0,.55);
}
body[data-page="home"] #homeLastUpdateSection[data-collapsed="1"] .homeDashShutterTitle{
  text-shadow:
    0 0 12px rgba(255,255,255,.08),
    0 12px 40px rgba(0,0,0,.55);
}
html[data-theme="light"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterTitle{
  color: rgba(10,10,10,.84);
  text-shadow: none;
  opacity: .78;
}
html[data-ps-preset="paper"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterTitle{
  color: rgba(190,255,215,.94);
  text-shadow: 0 0 12px rgba(120,255,170,.24), 0 10px 32px rgba(0,0,0,.54);
  opacity: .94;
}

body[data-page="home"] #homeLastUpdateSection .homeDashDropBody{
  position: relative;
  z-index: var(--z-base);
  flex: 1 1 auto;
  visibility: visible;
  pointer-events: auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
body[data-page="home"] #homeLastUpdateSection .homeDashDropBody[aria-hidden="true"]{
  visibility: hidden;
  pointer-events: none;
}

/* Home - Dashboard shutter: revealed "tab" header when open */
body[data-page="home"] #homeLastUpdateSection .homeDashCardHead{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--border-radius-full);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}
html[data-theme="light"] body[data-page="home"] #homeLastUpdateSection .homeDashCardHead{
  border-color: rgba(0,0,0,.10);
  background:
    linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.01));
}
body[data-page="home"] #homeLastUpdateSection .homeDashCardHeadTitle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 6px 10px;
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  text-decoration: none;
  color: inherit;
  cursor: pointer;

  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .92;
}
html[data-theme="light"] body[data-page="home"] #homeLastUpdateSection .homeDashCardHeadTitle{
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.02);
}
body[data-page="home"] #homeLastUpdateSection .homeDashCardHeadTitle:active{
  transform: translateY(1px);
}
body[data-page="home"] #homeLastUpdateSection .homeDashCardHeadTitle:focus-visible{
  outline: 2px solid var(--accentGreenReadable);
  outline-offset: 2px;
}
body[data-page="home"] #homeLastUpdateSection .homeDashCardHeadClose{
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--border-radius-full);

  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: .92;
  flex: 0 0 auto;
}
body[data-page="home"] #homeLastUpdateSection .homeDashCardHeadClose:active{
  transform: translateY(1px);
}
body[data-page="home"] #homeLastUpdateSection .homeDashCardHeadClose:focus-visible{
  outline: 2px solid var(--accentGreenReadable);
  outline-offset: 2px;
}

/* Reveal effect synced with shutter */
body[data-page="home"] #homeLastUpdateSection[data-collapsed="1"] .homeDashCardHead{
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--psShutterDur) var(--psShutterEase), transform var(--psShutterDur) var(--psShutterEase);
}
body[data-page="home"] #homeLastUpdateSection[data-collapsed="0"] .homeDashCardHead{
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--psShutterDur) var(--psShutterEase), transform var(--psShutterDur) var(--psShutterEase);
}

/* Unified control: bottom handle is always visible and owns OPEN/CLOSE. */
body[data-page="home"] #homeLastUpdateSection[data-collapsed="0"] #homeDashDropToggle.homeDashHandle{
  display: flex;
}

body[data-page="home"] #homeLastUpdateSection .homeDashDropBodyLink{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
  padding: 0 0 8px;
}
body[data-page="home"] #homeLastUpdateSection .homeDashDropBodyTitle{
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
body[data-page="home"] #homeLastUpdateSection .homeDashDropBodyState{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(80,255,150,.34);
  background: rgba(80,255,150,.12);
  color: rgba(170,255,205,.96);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  flex: 0 0 auto;
}
html[data-theme="light"] body[data-page="home"] #homeLastUpdateSection .homeDashDropBodyState{
  color: rgba(35,122,71,.95);
  border-color: rgba(47,148,88,.34);
  background: rgba(47,148,88,.11);
}

body[data-page="home"] #homeLastUpdateSection #homeDashDropToggle.homeDashHandle{
  height: var(--psShutterHandleH);
  min-height: var(--psShutterHandleH);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  margin-top: auto;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.10);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  color: var(--fg);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 3;
}
html[data-theme="light"] body[data-page="home"] #homeLastUpdateSection #homeDashDropToggle.homeDashHandle{
  border-top-color: rgba(0,0,0,.10);
  background: linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.01));
}
html[data-ps-preset="paper"] body[data-page="home"] #homeLastUpdateSection #homeDashDropToggle.homeDashHandle{
  border-top-color: rgba(120,255,170,.34);
  background: linear-gradient(180deg, rgba(22,70,40,.58), rgba(10,34,20,.84));
  color: rgba(190,255,215,.94);
}

body[data-page="home"] #homeLastUpdateSection .homeDashHandleLabel{
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .92;
}
body[data-page="home"] #homeLastUpdateSection .homeDashHandleAction{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: .92;
}
body[data-page="home"] #homeLastUpdateSection[data-collapsed="1"] .homeDashHandleAction--open{ display: inline; }
body[data-page="home"] #homeLastUpdateSection[data-collapsed="1"] .homeDashHandleAction--close{ display: none; }
body[data-page="home"] #homeLastUpdateSection[data-collapsed="0"] .homeDashHandleAction--open{ display: none; }
body[data-page="home"] #homeLastUpdateSection[data-collapsed="0"] .homeDashHandleAction--close{ display: inline; }

/* Handle layout: closed shows only OPEN on the right; open shows DASHBOARD + CLOSE. */
body[data-page="home"] #homeLastUpdateSection[data-collapsed="1"] #homeDashDropToggle.homeDashHandle{ justify-content: flex-end; }
body[data-page="home"] #homeLastUpdateSection[data-collapsed="1"] .homeDashHandleLabel{ display: none; }
body[data-page="home"] #homeLastUpdateSection[data-collapsed="0"] #homeDashDropToggle.homeDashHandle{ justify-content: flex-end; }
body[data-page="home"] #homeLastUpdateSection[data-collapsed="0"] .homeDashHandleLabel{ display: none; }

body[data-page="home"] #homeLastUpdateSection #homeDashDropToggle.homeDashHandle:active{
  transform: translateY(1px);
}
body[data-page="home"] #homeLastUpdateSection #homeDashDropToggle.homeDashHandle:focus-visible{
  outline: 2px solid var(--accentGreenReadable);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel{
    transition: none;
  }
  body[data-page="home"] #homeLastUpdateSection .homeDashCardHead{
    transition: none;
    transform: none;
  }
  body[data-page="home"] #homeLastUpdateSection .homeDashCardHeadClose:active{
    transform: none;
  }
}
body[data-page="home"] .homeDashDropHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 14px;
}
body[data-page="home"] .homeDashDropLink{
  flex: 1 1 auto;
  min-width: 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  text-decoration:none;
  color: var(--fg);
}
body[data-page="home"] .homeDashDropTitle{
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
body[data-page="home"] .homeDashDropState{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:var(--spacing-xs) var(--spacing-sm);
  border-radius:var(--border-radius-full);
  border:1px solid rgba(80,255,150,.34);
  background: rgba(80,255,150,.12);
  color: rgba(170,255,205,.96);
  font-size: 9px;
  font-weight:700;
  letter-spacing:.1em;
  text-transform: uppercase;
  flex: 0 0 auto;
}
body[data-page="home"] .homeDashDropToggle{
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
body[data-page="home"] .homeDashDropToggle:active{ transform: translateY(1px); }

body[data-page="home"] .homeDashDropBody{
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 10px 12px;
}
html[data-theme="light"] body[data-page="home"] .homeDashDropBody{
  border-top-color: rgba(0,0,0,.08);
}
body[data-page="home"] .lastUpdateSection.homeDashDrop[data-collapsed="1"] .homeDashDropBody{
  display:block;
}
body[data-page="home"] .lastUpdateSection.homeDashDrop[data-collapsed="1"] .homeDashDropToggle{
  transform: rotate(-90deg);
}
html[data-theme="light"] body[data-page="home"] .homeDashDropState{
  color: rgba(35,122,71,.95);
  border-color: rgba(47,148,88,.34);
  background: rgba(47,148,88,.11);
}
html[data-theme="light"] body[data-page="home"] .homeDashDropToggle{
  border-color: rgba(0,0,0,.14);
  background: rgba(0,0,0,.02);
}

/* Dashboard desktop control board (mobile-safe: opt-in only). */
.dashDesktopBoard{
  display: none;
}

@media (min-width: 900px){
  body[data-page="dashboard"].psDashDesktopBoard .dashHeader{
    margin-bottom: 4px;
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopBoard{
    display: block;
    margin-top: 6px;
  }
  body[data-page="dashboard"].psDashDesktopBoard #dashHub{
    display: none !important;
  }

  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopHeroWrap{
    margin-bottom: 14px;
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopHero{
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.11);
    background:
      linear-gradient(115deg, rgba(255,145,35,.18), rgba(75,212,255,.16) 50%, rgba(80,255,160,.15));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
    padding: 16px 18px;
  }
  html[data-theme="light"] body[data-page="dashboard"].psDashDesktopBoard .dashDesktopHero{
    border-color: rgba(0,0,0,.12);
    background: linear-gradient(120deg, rgba(247,160,58,.18), rgba(86,167,236,.16) 52%, rgba(72,185,120,.16));
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.03);
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopHeroMeta{
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .78;
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopHeroTitle{
    margin-top: 8px;
    font-size: clamp(23px, 2vw, 30px);
    line-height: 1.16;
    font-weight: 760;
    letter-spacing: .01em;
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopHeroSub{
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.45;
    max-width: 76ch;
    opacity: .86;
  }

  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopGrid{
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopPanel{
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.02);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
    padding: 12px;
    min-height: 100%;
  }
  html[data-theme="light"] body[data-page="dashboard"].psDashDesktopBoard .dashDesktopPanel{
    border-color: rgba(0,0,0,.10);
    background: rgba(0,0,0,.015);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.03);
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopPanelTitle{
    margin: 0 0 10px;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .76;
  }

  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopLaunchGrid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopLaunchCard{
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.09);
    background: rgba(255,255,255,.03);
    padding: 11px 12px;
  }
  html[data-theme="light"] body[data-page="dashboard"].psDashDesktopBoard .dashDesktopLaunchCard{
    border-color: rgba(0,0,0,.10);
    background: rgba(0,0,0,.02);
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopLaunchTop{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopLaunchMeta{
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .66;
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopLaunchTitle{
    margin-top: 7px;
    font-size: 16px;
    line-height: 1.24;
    font-weight: 680;
  }

  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopState{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-full);
    padding: 3px 8px;
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,.2);
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopState--live{
    color: rgba(170,255,205,.96);
    border-color: rgba(80,255,150,.35);
    background: rgba(80,255,150,.12);
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopState--proxy{
    color: rgba(255,230,170,.95);
    border-color: rgba(255,205,110,.35);
    background: rgba(255,186,90,.14);
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopState--wip{
    color: rgba(220,224,235,.9);
    border-color: rgba(188,198,220,.28);
    background: rgba(170,182,208,.1);
  }

  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopList{
    display: grid;
    gap: 6px;
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopLine{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 9px 10px;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,.075);
    background: rgba(255,255,255,.022);
  }
  html[data-theme="light"] body[data-page="dashboard"].psDashDesktopBoard .dashDesktopLine{
    border-color: rgba(0,0,0,.10);
    background: rgba(0,0,0,.016);
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopLineTitle{
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopLineMeta{
    flex: 0 0 auto;
    font-size: 11px;
    opacity: .72;
  }
  body[data-page="dashboard"].psDashDesktopBoard .dashDesktopEmpty{
    font-size: 12px;
    opacity: .72;
    padding: 8px 2px;
  }

  @media (max-width: 1210px){
    body[data-page="dashboard"].psDashDesktopBoard .dashDesktopGrid{
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    body[data-page="dashboard"].psDashDesktopBoard .dashDesktopPanel--launch{
      grid-column: 1 / -1;
    }
  }
}

/* Dashboard Hub v2 - live control room (mobile + desktop) */
body[data-page="dashboard"].psDashHubLive .dashHubV2Mount{
  display: block;
  margin-top: 12px;
}

body[data-page="dashboard"].psDashHubLive #dashHub{
  display: none !important;
}

.dashHubV2{
  display: grid;
  gap: 12px;
}

.dashHubV2Head{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--psDashCardBorder);
  background: var(--psDashCardBg);
}

.dashHubV2Title{
  margin: 0;
  font-size: var(--font-size-lg, 20px);
  line-height: var(--line-height-tight, 1.2);
  letter-spacing: var(--letter-spacing-tight, -0.01em);
  font-weight: var(--font-weight-bold, 700);
}

.dashHubV2Sub{
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: var(--font-weight-normal, 400);
  color: var(--psDashCardSub);
}

.dashHubV2Toolbar{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dashHubV2Global{
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}

html[data-theme="light"] .dashHubV2Global{
  border-color: rgba(0,0,0,.2);
  background: rgba(0,0,0,.04);
}

.dashHubV2Global[data-state="live"]{
  border-color: rgba(80,255,150,.34);
  background: rgba(80,255,150,.12);
  color: rgba(170,255,205,.96);
}

.dashHubV2Global[data-state="cache"]{
  border-color: rgba(255,205,110,.38);
  background: rgba(255,186,90,.16);
  color: rgba(255,225,160,.96);
}

.dashHubV2Global[data-state="degraded"]{
  border-color: rgba(255,120,120,.38);
  background: rgba(255,120,120,.14);
  color: rgba(255,210,210,.96);
}

.dashHubV2Grid{
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  grid-template-areas:
    "stats"
    "markets"
    "alerts"
    "feed";
  align-items: start;
}
.dashHubV2Card--stats{ grid-area: stats; }
.dashHubV2Card--markets{ grid-area: markets; }
.dashHubV2Card--alerts{ grid-area: alerts; }
.dashHubV2Card--feed{ grid-area: feed; }

.dashHubV2Card{
  min-width: 0;
  border-radius: 12px;
  border: 1px solid var(--psDashCardBorder);
  background: var(--psDashCardBg);
  box-shadow: 0 0 0 1px var(--psDashCardInset) inset;
  padding: 12px;
  display: grid;
  align-content: start;
  grid-template-rows: auto auto minmax(0, auto) auto;
  gap: 10px;
}

/* Dashboard rim migration: animated rim per widget (instead of outer frame). */
body[data-page="dashboard"] .dashHubV2Card{
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --psWidgetRimW: 1.72px;
}

/* Widget-specific rim palettes (BTC/RSS/Substack/Nostr). */
body[data-page="dashboard"] .dashHubV2Card--stats{
  --psRimCold: rgba(247,147,26,.20);
  --psRimHot1: rgba(247,147,26,.98);
  --psRimHot2: rgba(255,206,120,.92);
  --psRimHot3: rgba(247,147,26,.76);
  --psRimGlow1: rgba(247,147,26,.18);
  --psRimGlow2: rgba(247,147,26,0);
  --psRimBorder: rgba(247,147,26,.24);
}
body[data-page="dashboard"] .dashHubV2Card--rss{
  --psRimCold: rgba(76,186,255,.20);
  --psRimHot1: rgba(76,186,255,.96);
  --psRimHot2: rgba(160,223,255,.90);
  --psRimHot3: rgba(76,186,255,.74);
  --psRimGlow1: rgba(76,186,255,.18);
  --psRimGlow2: rgba(76,186,255,0);
  --psRimBorder: rgba(76,186,255,.24);
}
body[data-page="dashboard"] .dashHubV2Card--substack{
  --psRimCold: rgba(255,126,166,.20);
  --psRimHot1: rgba(255,126,166,.96);
  --psRimHot2: rgba(255,194,214,.90);
  --psRimHot3: rgba(255,126,166,.74);
  --psRimGlow1: rgba(255,126,166,.18);
  --psRimGlow2: rgba(255,126,166,0);
  --psRimBorder: rgba(255,126,166,.24);
}
body[data-page="dashboard"] .dashHubV2Card--nostr{
  --psRimCold: rgba(96,230,158,.20);
  --psRimHot1: rgba(96,230,158,.96);
  --psRimHot2: rgba(177,247,207,.90);
  --psRimHot3: rgba(96,230,158,.74);
  --psRimGlow1: rgba(96,230,158,.18);
  --psRimGlow2: rgba(96,230,158,0);
  --psRimBorder: rgba(96,230,158,.24);
}

html[data-theme="light"] body[data-page="dashboard"] .dashHubV2Card--stats{
  --psRimCold: rgba(198,112,20,.18);
  --psRimHot1: rgba(214,122,20,.94);
  --psRimHot2: rgba(228,166,84,.88);
  --psRimHot3: rgba(198,112,20,.72);
  --psRimGlow1: rgba(198,112,20,.14);
  --psRimBorder: rgba(198,112,20,.26);
}
html[data-theme="light"] body[data-page="dashboard"] .dashHubV2Card--rss{
  --psRimCold: rgba(34,128,198,.18);
  --psRimHot1: rgba(34,142,214,.92);
  --psRimHot2: rgba(106,179,226,.86);
  --psRimHot3: rgba(34,128,198,.72);
  --psRimGlow1: rgba(34,128,198,.14);
  --psRimBorder: rgba(34,128,198,.24);
}
html[data-theme="light"] body[data-page="dashboard"] .dashHubV2Card--substack{
  --psRimCold: rgba(198,88,126,.18);
  --psRimHot1: rgba(214,94,136,.92);
  --psRimHot2: rgba(228,152,180,.86);
  --psRimHot3: rgba(198,88,126,.72);
  --psRimGlow1: rgba(198,88,126,.14);
  --psRimBorder: rgba(198,88,126,.24);
}
html[data-theme="light"] body[data-page="dashboard"] .dashHubV2Card--nostr{
  --psRimCold: rgba(40,146,92,.18);
  --psRimHot1: rgba(42,162,102,.92);
  --psRimHot2: rgba(114,198,151,.86);
  --psRimHot3: rgba(40,146,92,.72);
  --psRimGlow1: rgba(40,146,92,.14);
  --psRimBorder: rgba(40,146,92,.24);
}

body[data-page="dashboard"] .dashHubV2Card::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  padding: var(--psWidgetRimW, 2px);
  background: conic-gradient(
    from var(--psRimA, 0deg),
    var(--psRimCold, rgba(255,140,0,.20)) 0 84%,
    var(--psRimHot1, rgba(255,140,0,.96)) 89%,
    var(--psRimHot2, rgba(255,200,90,.90)) 91%,
    var(--psRimHot3, rgba(255,140,0,.75)) 93%,
    var(--psRimCold, rgba(255,140,0,.20)) 97%,
    var(--psRimCold, rgba(255,140,0,.20)) 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .90;
  filter:
    blur(5px)
    drop-shadow(0 0 8px var(--psRimGlow1, rgba(255,140,0,.18)))
    drop-shadow(0 0 8px var(--psRimGlow2, rgba(255,140,0,0)));
}
body[data-page="dashboard"] .dashHubV2Card > *{
  position: relative;
  z-index: 1;
}
@media (prefers-reduced-motion: no-preference){
  body[data-page="dashboard"] .dashHubV2Card::before{
    animation: psRimAngle 11.2s linear infinite;
  }
}
@media (prefers-reduced-motion: reduce){
  body[data-page="dashboard"] .dashHubV2Card::before{
    animation: none !important;
  }
}

.dashHubV2CardHead{
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashHubV2CardTitle{
  font-size: 18px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: .01em;
  flex: 1;
  min-width: 0;
}
.dashHubV2CardTitle--link{
  color: inherit;
  text-decoration: none;
  transition: opacity .15s ease;
}
.dashHubV2CardTitle--link:hover{
  opacity: .7;
}
.dashHubV2CardHead .dashHubV2Meta{
  font-size: 11px;
  color: var(--psDashCardSub, rgba(255,255,255,.45));
  flex-shrink: 0;
}
.dashHubV2RefreshBtn{
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
  transition: background .15s ease, transform .2s ease;
  padding: 0;
  line-height: 1;
}
.dashHubV2RefreshBtn:hover{
  background: rgba(255,255,255,.08);
}
.dashHubV2RefreshBtn.isBusy{
  opacity: .6;
  pointer-events: none;
  animation: psRefreshSpin .8s linear infinite;
}
@keyframes psRefreshSpin{
  to{ transform: rotate(360deg); }
}
html[data-theme="light"] .dashHubV2RefreshBtn{
  border-color: rgba(0,0,0,.14);
}
html[data-theme="light"] .dashHubV2RefreshBtn:hover{
  background: rgba(0,0,0,.06);
}
html[data-theme="light"] .dashHubV2CardHead .dashHubV2Meta{
  color: var(--psDashCardSub, rgba(0,0,0,.45));
}

.dashHubV2State{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.05);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  flex: 0 0 auto;
}

.dashHubV2State[data-state="live"]{
  border-color: rgba(80,255,150,.34);
  background: rgba(80,255,150,.12);
  color: rgba(170,255,205,.96);
}

.dashHubV2State[data-state="cache"]{
  border-color: rgba(255,205,110,.38);
  background: rgba(255,186,90,.16);
  color: rgba(255,225,160,.96);
}

.dashHubV2State[data-state="degraded"]{
  border-color: rgba(255,120,120,.38);
  background: rgba(255,120,120,.14);
  color: rgba(255,210,210,.96);
}

.dashHubV2State[data-state="loading"]{
  border-color: rgba(160,170,190,.34);
  background: rgba(160,170,190,.14);
  color: rgba(214,219,230,.9);
}

.dashHubV2Meta{
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--psDashCardSub);
}

.dashHubV2Body{
  min-height: 0;
  align-self: start;
}

.dashHubV2Empty{
  min-height: 96px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--psDashCardSub);
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

html[data-theme="light"] .dashHubV2Empty{
  border-color: rgba(0,0,0,.18);
}

/* Footer hidden: controls moved to header row */
.dashHubV2Foot{
  display: none;
}

.dashHubV2Btn,
.dashHubV2Link{
  min-height: 40px;
  padding: 8px 11px;
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255,255,255,.17);
  background: rgba(255,255,255,.05);
  color: var(--fg);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dashHubV2Btn{ cursor: pointer; }

.dashHubV2Btn.isBusy{
  opacity: .72;
  pointer-events: none;
}

html[data-theme="light"] .dashHubV2Btn,
html[data-theme="light"] .dashHubV2Link{
  border-color: rgba(0,0,0,.2);
  background: rgba(0,0,0,.04);
}

.hubStatsRows{
  display: grid;
  gap: 10px;
}

.hubStatsMain{
  display: grid;
  gap: 4px;
}

.hubStatsLabel{
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--psDashCardSub);
}

.hubStatsPrice{
  font-size: clamp(19px, 3.4vw, 26px);
  font-weight: 760;
  line-height: 1.1;
}

.hubStatsDelta{
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.hubStatsDelta.isUp{ color: rgba(120,235,160,.98); }
.hubStatsDelta.isDown{ color: rgba(255,130,130,.98); }

.hubStatsFees{
  display: grid;
  gap: 6px;
}

.hubStatsFee{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--psDashCardSub);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px;
  padding: 7px 8px;
}

.hubStatsFee b{
  color: var(--fg);
  font-size: 13px;
}

html[data-theme="light"] .hubStatsFee{
  border-color: rgba(0,0,0,.11);
}

.hubStatsMini{
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hubStatsMiniItem{
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px;
  padding: 7px 8px;
  display: grid;
  gap: 4px;
}

.hubStatsMiniItem span{
  font-size: 11px;
  color: var(--psDashCardSub);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hubStatsMiniItem b{
  font-size: 12px;
  line-height: 1.35;
}

.hubStatsMiniItem--wide{
  grid-column: 1 / -1;
}

html[data-theme="light"] .hubStatsMiniItem{
  border-color: rgba(0,0,0,.11);
}

.hubRssList{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.hubRssItem a{
  display: grid;
  gap: 3px;
  text-decoration: none;
  color: inherit;
  padding: 8px 9px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.02);
}

html[data-theme="light"] .hubRssItem a{
  border-color: rgba(0,0,0,.1);
  background: rgba(0,0,0,.015);
}

.hubRssTitle{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}

.hubRssMeta{
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--psDashCardSub);
}

/* Substack identity in hub: subtle but recognizable style for scalable duplication. */
body[data-page="dashboard"].psDashHubLive .dashHubV2Card--substack .hubRssItem a{
  border-color: rgba(255,188,108,.24);
  background: linear-gradient(180deg, rgba(255,188,108,.08), rgba(255,188,108,.02));
}
html[data-theme="light"] body[data-page="dashboard"].psDashHubLive .dashHubV2Card--substack .hubRssItem a{
  border-color: rgba(176,124,56,.28);
  background: linear-gradient(180deg, rgba(176,124,56,.10), rgba(176,124,56,.03));
}
body[data-page="dashboard"].psDashHubLive .dashHubV2Card--substack .hubRssTitle{
  font-weight: 600;
}
body[data-page="dashboard"].psDashHubLive .dashHubV2Card--substack .dashHubV2Meta{
  color: rgba(220,226,240,.88);
}
body[data-page="dashboard"].psDashHubLive .dashHubV2Card--substack .hubRssMeta{
  color: rgba(206,214,232,.90);
  font-weight: 500;
}
html[data-theme="light"] body[data-page="dashboard"].psDashHubLive .dashHubV2Card--substack .dashHubV2Meta{
  color: rgba(48,54,69,.82);
}
html[data-theme="light"] body[data-page="dashboard"].psDashHubLive .dashHubV2Card--substack .hubRssMeta{
  color: rgba(59,64,77,.86);
}

/* Substack Preset Base: shared panel rim + identity hooks for future cloned pages. */
body[data-page="dash-substack"] #dashPanelSubstack.dashPanelBody{
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --psWidgetRimW: 1.86px;
}
body[data-page="dash-substack"] #dashPanelSubstack.dashPanelBody::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  padding: var(--psWidgetRimW, 2px);
  background: conic-gradient(
    from var(--psRimA, 0deg),
    var(--psRimCold, rgba(255,140,0,.22)) 0 82%,
    var(--psRimHot1, rgba(255,140,0,.98)) 88%,
    var(--psRimHot2, rgba(255,200,90,.92)) 90%,
    var(--psRimHot3, rgba(255,140,0,.78)) 92%,
    var(--psRimCold, rgba(255,140,0,.22)) 96%,
    var(--psRimCold, rgba(255,140,0,.22)) 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .92;
  filter:
    blur(6px)
    drop-shadow(0 0 10px var(--psRimGlow1, rgba(255,140,0,.18)))
    drop-shadow(0 0 10px var(--psRimGlow2, rgba(255,140,0,0)));
}
body[data-page="dash-substack"] #dashPanelSubstack.dashPanelBody > *{
  position: relative;
  z-index: 1;
}
@media (prefers-reduced-motion: no-preference){
  body[data-page="dash-substack"] #dashPanelSubstack.dashPanelBody::before{
    animation: psRimAngle 10.8s linear infinite;
  }
}
@media (prefers-reduced-motion: reduce){
  body[data-page="dash-substack"] #dashPanelSubstack.dashPanelBody::before{
    animation: none !important;
  }
}

.dashHubV2Body--nostr{
  display: grid;
  gap: 8px;
  min-height: 0;
  max-height: min(47vh, 440px);
  overflow: auto;
  padding-right: 4px;
}

.hubNostrStatus{
  font-size: 11px;
  color: var(--psDashCardSub);
}

.hubNostrList{
  display: grid;
  gap: 7px;
}

.hubNostrList .nostrItem{
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.02);
  padding: 8px 9px;
}

html[data-theme="light"] .hubNostrList .nostrItem{
  border-color: rgba(0,0,0,.11);
  background: rgba(0,0,0,.015);
}

/* ---- Feed widget (unified) ---- */
.hubFeedChips{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.hubFeedChip{
  padding: 5px 12px;
  border-radius: var(--border-radius-full, 999px);
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.05);
  color: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.hubFeedChip:hover{
  background: rgba(255,255,255,.10);
}
.hubFeedChip.isActive{
  border-color: rgba(247,147,26,.72);
  background: rgba(247,147,26,.18);
  color: rgba(255,225,160,.98);
}
html[data-theme="light"] .hubFeedChip{
  border-color: rgba(0,0,0,.16);
  background: rgba(0,0,0,.04);
}
html[data-theme="light"] .hubFeedChip:hover{
  background: rgba(0,0,0,.08);
}
html[data-theme="light"] .hubFeedChip.isActive{
  border-color: rgba(180,100,20,.66);
  background: rgba(214,140,40,.16);
  color: rgba(120,60,0,.96);
}

.hubFeedBadge{
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-right: 4px;
}
.hubFeedBadge--rss{
  background: rgba(76,186,255,.18);
  color: rgba(130,210,255,.96);
  border: 1px solid rgba(76,186,255,.32);
}
.hubFeedBadge--substack{
  background: rgba(255,126,166,.18);
  color: rgba(255,180,205,.96);
  border: 1px solid rgba(255,126,166,.32);
}
.hubFeedBadge--nostr{
  background: rgba(96,230,158,.18);
  color: rgba(160,245,195,.96);
  border: 1px solid rgba(96,230,158,.32);
}
html[data-theme="light"] .hubFeedBadge--rss{
  background: rgba(34,128,198,.14);
  color: rgba(24,90,148,.96);
  border-color: rgba(34,128,198,.32);
}
html[data-theme="light"] .hubFeedBadge--substack{
  background: rgba(198,88,126,.14);
  color: rgba(148,52,86,.96);
  border-color: rgba(198,88,126,.32);
}
html[data-theme="light"] .hubFeedBadge--nostr{
  background: rgba(40,146,92,.14);
  color: rgba(24,96,56,.96);
  border-color: rgba(40,146,92,.32);
}
.hubFeedSrcName{
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: none;
  opacity: .88;
}

/* Feed card rim palette */
body[data-page="dashboard"] .dashHubV2Card--feed{
  --psRimCold: rgba(180,160,220,.20);
  --psRimHot1: rgba(180,160,220,.92);
  --psRimHot2: rgba(220,210,250,.86);
  --psRimHot3: rgba(180,160,220,.72);
  --psRimGlow1: rgba(180,160,220,.16);
  --psRimGlow2: rgba(180,160,220,0);
  --psRimBorder: rgba(180,160,220,.24);
}
html[data-theme="light"] body[data-page="dashboard"] .dashHubV2Card--feed{
  --psRimCold: rgba(120,100,160,.18);
  --psRimHot1: rgba(130,108,170,.90);
  --psRimHot2: rgba(170,152,206,.84);
  --psRimHot3: rgba(120,100,160,.70);
  --psRimGlow1: rgba(120,100,160,.14);
  --psRimBorder: rgba(120,100,160,.24);
}

@media (min-width: 900px){
  body[data-page="dashboard"].psDashHubLive .dashHubV2Mount{
    margin-top: 8px;
  }

  .dashHubV2Grid{
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "stats   markets"
      "alerts  markets"
      "feed    feed";
    align-items: stretch;
  }
  .dashHubV2Card{
    height: 100%;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 8px;
  }
  .dashHubV2Card--markets{
    height: 100%;
    overflow-y: auto;
  }
  .dashHubV2Card--stats .dashHubV2Body{
    display: block;
    min-height: 0;
  }

  body[data-page="dashboard"].psDashHubLive .dashHubV2Head{
    padding: 10px 12px;
  }

  body[data-page="dashboard"].psDashHubLive .dashHubV2{
    gap: 10px;
  }
}

/* Hub v2 hardening: shield from global [class*="Card"] skin rules (bitcoin preset). */
html[data-ps-preset="bitcoin"] body[data-page="dashboard"].psDashHubLive .dashHubV2Card [class*="Card"],
html[data-ps-preset="bitcoin"] body[data-page="dashboard"].psDashHubLive .dashHubV2Card [class*="card"]{
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Keep the root hub cards as designed after the hardening above. */
html[data-ps-preset="bitcoin"] body[data-page="dashboard"].psDashHubLive .dashHubV2Card{
  border-radius: 12px;
  border: 1px solid var(--psDashCardBorder);
  background: var(--psDashCardBg);
  box-shadow: 0 0 0 1px var(--psDashCardInset) inset;
}

/* Hub Nostr readability: avoid wall-of-text inside the dashboard card. */
body[data-page="dashboard"].psDashHubLive .hubNostrList .nostrBody.nostrClamp{
  -webkit-line-clamp: 6;
}

body[data-page="dashboard"].psDashHubLive .dashHubV2Body--nostr::-webkit-scrollbar{
  width: 8px;
}
body[data-page="dashboard"].psDashHubLive .dashHubV2Body--nostr::-webkit-scrollbar-thumb{
  background: rgba(247,147,26,.66);
  border-radius: 8px;
}
body[data-page="dashboard"].psDashHubLive .dashHubV2Body--nostr::-webkit-scrollbar-track{
  background: rgba(255,255,255,.06);
}

/* Accessibility pass 2 — readability tune for dense dashboard/feed areas */
body[data-page="dashboard"] .dashHubTitle,
body[data-page="bitcoin-stats"] .dashHubTitle{
  font-size: 11px;
  opacity: .78;
}

body[data-page="dashboard"] .dashHubCardMeta,
body[data-page="bitcoin-stats"] .dashHubCardMeta{
  color: var(--color-text-secondary, var(--muted));
}

body[data-page="dashboard"] .dashHubCardAction,
body[data-page="bitcoin-stats"] .dashHubCardAction{
  font-size: 11px;
}

.rssHint,
.rssCurrent{
  font-size: 13px;
  line-height: 1.4;
}

.rssSrc,
.rssSource,
.rssDate{
  font-size: 11px;
  color: var(--color-text-tertiary, rgba(242,242,242,.66));
}

body[data-page="dash-substack"] .rssSrc,
body[data-page="dash-substack"] .rssSource{
  font-size: 10px;
}

.dashBlockMeta{
  font-size: 13px;
  color: var(--color-text-tertiary, rgba(242,242,242,.66));
}

.dashStat kbd{
  font-size: 11px;
  color: var(--color-text-tertiary, rgba(242,242,242,.66));
}

.nostrMeta{
  font-size: 12px;
  opacity: .72;
}

.dashHubV2Meta{
  font-size: 12px;
}

.hubRssMeta{
  font-size: 12px;
}

.hubStatsLabel,
.hubStatsMiniItem span{
  font-size: 11px;
}

/* Home updates mode: visual hierarchy + readability polish (multilingual-safe). */
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection{
  border-color: rgba(255,255,255,.14);
  background:
    radial-gradient(120% 130% at 10% -10%, rgba(80,255,170,.08), transparent 60%),
    radial-gradient(110% 110% at 92% 0%, rgba(247,147,26,.08), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection{
  border-color: rgba(0,0,0,.14);
  background:
    radial-gradient(120% 130% at 10% -10%, rgba(64,148,103,.08), transparent 62%),
    radial-gradient(110% 110% at 92% 0%, rgba(196,128,62,.08), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.025), rgba(0,0,0,.008));
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .homeDashDropBody{
  padding: 8px 10px 12px;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .homeDashCardHead{
  margin: 0 0 12px;
  border-color: rgba(255,255,255,.14);
  background:
    radial-gradient(110% 120% at 8% -20%, rgba(80,255,170,.10), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
}
/* Home Terminal Overview: avoid redundant "Dashboard" chip in section head. */
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .homeDashCardHead{
  justify-content: flex-end;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .homeDashCardHeadTitle{
  display: none;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .homeDashCardHead{
  display: none !important;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .lastUpdateTitle{
  margin: 0 2px 10px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .9;
  color: rgba(242,242,242,.86);
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection #homeLastUpdateFeed{
  gap: 12px;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTiles{
  gap: 12px;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTile{
  min-height: 94px;
  padding: 13px 14px 12px;
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 10px 24px rgba(0,0,0,.18), 0 0 0 1px rgba(255,255,255,.025) inset;
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTile{
  border-color: rgba(0,0,0,.12);
  box-shadow: 0 8px 18px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.02) inset;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTileTop{
  align-items: center;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTileTitle{
  line-height: 1.3;
  font-size: 14px;
  letter-spacing: .008em;
  color: rgba(246,246,246,.96);
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTileDate{
  font-size: 11px;
  letter-spacing: .04em;
  color: rgba(215,220,228,.88);
  opacity: .96;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .homeDashCardHeadClose{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .homeDashCardHead{
  border-color: rgba(0,0,0,.12);
  background:
    radial-gradient(110% 120% at 8% -20%, rgba(64,148,103,.08), transparent 58%),
    linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.01));
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .lastUpdateTitle{
  color: rgba(16,22,28,.76);
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTileTitle{
  color: rgba(12,18,24,.88);
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTileDate{
  color: rgba(40,56,72,.72);
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .homeDashCardHeadClose{
  border-color: rgba(0,0,0,.14);
  background: rgba(0,0,0,.02);
}
html[data-ps-preset="paper"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .lastUpdateTitle{
  color: rgba(44,38,31,.78);
}
html[data-ps-preset="paper"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTileTitle{
  color: rgba(32,28,24,.90);
}
html[data-ps-preset="paper"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTileDate{
  color: rgba(58,52,45,.72);
}

@media (min-width: 1280px){
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection #homeLastUpdateFeed{
    gap: 10px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTiles{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTile{
    min-height: 88px;
  }
}

@media (max-width: 640px){
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .homeDashDropBody{
    padding: 6px 7px 9px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .homeDashCardHead{
    margin-bottom: 9px;
    padding: 8px 9px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .lastUpdateTitle{
    margin: 0 2px 8px;
    font-size: 10px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTiles{
    grid-template-columns: 1fr;
    gap: 8px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTile{
    min-height: 78px;
    padding: 10px 11px 10px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTileTop{
    gap: 7px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTileBadge{
    font-size: 8px;
    letter-spacing: .11em;
    padding: 5px 7px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTileDate{
    font-size: 10px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .termTileTitle{
    font-size: 13px;
  }
}

/* Home Terminal Overview v2 (Resources + Blog top row, Dashboard full row) */
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalOverview{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSection{
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  overflow: hidden;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSection--dashboard[data-signal="cache"],
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSection--dashboard[data-signal="live"]{
  border-color: rgba(80,255,170,.28);
  box-shadow: 0 0 0 1px rgba(80,255,170,.10) inset;
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSection{
  border-color: rgba(0,0,0,.14);
  background: linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.01));
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSection--dashboard[data-signal="cache"],
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSection--dashboard[data-signal="live"]{
  border-color: rgba(39,129,82,.36);
  box-shadow: 0 0 0 1px rgba(39,129,82,.08) inset;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionHead{
  width: 100%;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionHeadMain{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionHeadActions{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionHead{
  border-bottom-color: rgba(0,0,0,.10);
  background: rgba(0,0,0,.01);
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionTitle{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  opacity: .94;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionSignal{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 17px;
  padding: 2px 6px;
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.05);
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
  opacity: .94;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionSignal::before{
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionSignal--live{
  border-color: rgba(80,255,170,.38);
  background: rgba(80,255,170,.14);
  color: rgba(188,255,224,.98);
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionSignal--cache{
  border-color: rgba(255,204,112,.40);
  background: rgba(255,204,112,.14);
  color: rgba(255,236,176,.98);
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionSignal--none{
  display: none;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionState{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .82;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionChevron{
  width: 8px;
  height: 8px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  opacity: .76;
  margin-top: -2px;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSection[data-open="1"] .homeTerminalSectionChevron{
  transform: rotate(-135deg);
  margin-top: 2px;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionBody{
  padding: 9px;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionList{
  display: grid;
  gap: 8px;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMention{
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 10px 11px;
  text-decoration: none;
  color: var(--fg);
  background: rgba(255,255,255,.03);
  display: grid;
  gap: 5px;
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMention{
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.02);
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionTop{
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionBadge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 2px 7px;
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.05);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionTitle{
  font-size: 14px;
  line-height: 1.36;
  font-weight: 700;
  color: rgba(245,245,245,.95);
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMention--kind-rss-latest .homeTerminalMentionTitle,
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMention--kind-substack-latest .homeTerminalMentionTitle,
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMention--kind-nostr-latest .homeTerminalMentionTitle{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionTitle{
  color: rgba(15,20,26,.9);
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMeta{
  font-size: 12px;
  line-height: 1.4;
  color: rgba(214,221,230,.86);
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricRow{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricRow .homeTerminalMentionTitle{
  margin: 0;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricPrimary{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 20px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(248,248,248,.98);
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricSecondary{
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  letter-spacing: .03em;
  color: rgba(224,231,238,.86);
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricStatus{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 17px;
  padding: 1px 7px;
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  font-size: 8px;
  letter-spacing: .11em;
  text-transform: uppercase;
  white-space: nowrap;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricStatus::before{
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricStatus--live{
  border-color: rgba(80,255,170,.40);
  background: rgba(80,255,170,.14);
  color: rgba(188,255,224,.98);
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricStatus--cache{
  border-color: rgba(255,204,112,.42);
  background: rgba(255,204,112,.14);
  color: rgba(255,236,176,.98);
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricStatus--none{
  display: none;
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMeta{
  color: rgba(41,53,66,.68);
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricPrimary{
  color: rgba(10,18,24,.92);
}
html[data-theme="light"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricSecondary{
  color: rgba(36,50,63,.78);
}
body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMention.isLocked{
  border-style: dashed;
  opacity: .92;
}

@media (min-width: 901px){
  body[data-page="home"][data-home-mode="updates"] .homeStack{
    padding-top: 8px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection{
    scroll-margin-top: 96px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalOverview.homeTerminalOverview--v2{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalOverview.homeTerminalOverview--v2 .homeTerminalSection--dashboard{
    grid-column: 1 / -1;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalOverview.homeTerminalOverview--v2 .homeTerminalSection--dashboard .homeTerminalMentionList{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalOverview.homeTerminalOverview--v2 .homeTerminalSection--dashboard .homeTerminalMention{
    min-height: 122px;
    padding-top: 11px;
    padding-bottom: 11px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalOverview.homeTerminalOverview--v2 .homeTerminalSection--dashboard .homeTerminalMention--kind-btc-price{
    padding-top: 10px;
    padding-bottom: 10px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSection{
    min-height: 100%;
  }
}

@keyframes psHomeLivePulse{
  0%{ box-shadow: 0 0 0 0 rgba(80,255,170,.42); opacity: .95; }
  70%{ box-shadow: 0 0 0 6px rgba(80,255,170,0); opacity: 1; }
  100%{ box-shadow: 0 0 0 0 rgba(80,255,170,0); opacity: .95; }
}
@keyframes psHomeCachePulse{
  0%{ box-shadow: 0 0 0 0 rgba(255,204,112,.32); opacity: .9; }
  70%{ box-shadow: 0 0 0 5px rgba(255,204,112,0); opacity: .96; }
  100%{ box-shadow: 0 0 0 0 rgba(255,204,112,0); opacity: .9; }
}
@keyframes psShutterSweep{
  0%{ transform: translateX(-16%); }
  100%{ transform: translateX(16%); }
}
@media (prefers-reduced-motion: no-preference){
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionSignal--live::before,
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricStatus--live::before{
    animation: psHomeLivePulse 2.1s ease-out infinite;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionSignal--cache::before,
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricStatus--cache::before{
    animation: psHomeCachePulse 2.6s ease-out infinite;
  }
  body[data-page="home"] #homeLastUpdateSection[data-collapsed="1"] .homeDashShutterPanel::after{
    animation: psShutterSweep 7.6s ease-in-out infinite alternate;
  }
}
@media (prefers-reduced-motion: reduce){
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionSignal::before,
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricStatus::before,
  body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel::after{
    animation: none !important;
    box-shadow: none !important;
  }
}
@media (max-width: 640px){
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalOverview{
    gap: 8px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionHead{
    min-height: 40px;
    padding: 8px 9px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionTitle{
    font-size: 11px;
    letter-spacing: .09em;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionState{
    font-size: 9px;
    letter-spacing: .13em;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionBody{
    padding: 7px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionList{
    gap: 6px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMention{
    padding: 8px 9px;
    gap: 3px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionBadge{
    min-height: 16px;
    font-size: 7px;
    padding: 2px 6px;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionTitle{
    font-size: 13px;
    line-height: 1.25;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMeta{
    font-size: 11px;
    line-height: 1.34;
  }
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMention--kind-rss-latest .homeTerminalMentionTitle,
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMention--kind-substack-latest .homeTerminalMentionTitle,
  body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMention--kind-nostr-latest .homeTerminalMentionTitle{
    -webkit-line-clamp: 2;
  }
}

/* v2.1 PATCH - Dashboard family coherence (sobria, non-home)
   Harmonize dashboard landing + dedicated dash-* pages with Home grammar.
*/
body[data-page="dashboard"] .dashPageHeader,
body[data-page^="dash-"] .dashPageHeader{
  margin-top: 4px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(130% 140% at 0% -8%, rgba(247,147,26,.11), transparent 66%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  box-shadow: 0 0 0 1px rgba(255,255,255,.03) inset;
}

html[data-theme="light"] body[data-page="dashboard"] .dashPageHeader,
html[data-theme="light"] body[data-page^="dash-"] .dashPageHeader{
  border-color: rgba(0,0,0,.14);
  background:
    radial-gradient(130% 140% at 0% -8%, rgba(247,147,26,.09), transparent 66%),
    linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,255,255,.78));
  box-shadow: 0 0 0 1px rgba(0,0,0,.03) inset;
}

body[data-page="dashboard"] .dashTitle,
body[data-page^="dash-"] .dashTitle{
  font-size: clamp(18px, 2.1vw, 24px);
  letter-spacing: .015em;
}

body[data-page="dashboard"] .dashSubtitle,
body[data-page^="dash-"] .dashSubtitle{
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.4;
  opacity: .84;
}

body[data-page^="dash-"] .dashPanelBody{
  border-color: rgba(255,255,255,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)),
    rgba(0,0,0,.24);
  box-shadow: 0 12px 26px rgba(0,0,0,.30), 0 0 0 1px rgba(255,255,255,.03) inset;
}

html[data-theme="light"] body[data-page^="dash-"] .dashPanelBody{
  border-color: rgba(0,0,0,.13);
  background:
    linear-gradient(180deg, rgba(255,255,255,.93), rgba(255,255,255,.84)),
    rgba(255,255,255,.88);
  box-shadow: 0 10px 22px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.02) inset;
}

body[data-page="dashboard"] .dashRefreshBtn,
body[data-page^="dash-"] .dashRefreshBtn{
  min-height: 36px;
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
}

body[data-page="dashboard"] .dashRefreshBtn:hover,
body[data-page^="dash-"] .dashRefreshBtn:hover{
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.11);
}

html[data-theme="light"] body[data-page="dashboard"] .dashRefreshBtn,
html[data-theme="light"] body[data-page^="dash-"] .dashRefreshBtn{
  border-color: rgba(0,0,0,.18);
  background: rgba(0,0,0,.04);
  color: rgba(0,0,0,.84);
}

html[data-theme="light"] body[data-page="dashboard"] .dashRefreshBtn:hover,
html[data-theme="light"] body[data-page^="dash-"] .dashRefreshBtn:hover{
  border-color: rgba(0,0,0,.30);
  background: rgba(0,0,0,.08);
}

body[data-page="dash-rss"] .rssList,
body[data-page="dash-substack"] .rssList,
body[data-page="dash-nostr"] .nostrList,
body[data-page="dash-feed"] .rssList,
body[data-page="dash-feed"] .nostrList{
  margin-top: 10px;
}

body[data-page="dash-rss"] .rssHint,
body[data-page="dash-substack"] .rssHint,
body[data-page="dash-nostr"] .nostrStatus,
body[data-page="dash-feed"] .rssHint,
body[data-page="dash-feed"] .nostrStatus{
  font-size: 12px;
  line-height: 1.4;
}

body[data-page="dash-stats"] #dashPanelStats .dashSub,
body[data-page="dash-stats"] #dashPanelStats .dashInlineLabel{
  font-size: 12px;
}

@media (max-width: 640px){
  body[data-page="dashboard"] .dashPageHeader,
  body[data-page^="dash-"] .dashPageHeader{
    padding: 9px 10px;
    margin-bottom: 10px;
  }

  body[data-page="dashboard"] .dashSubtitle,
  body[data-page^="dash-"] .dashSubtitle{
    font-size: 11px;
  }
}

/* --------------------------------------------------------------------------
   Invaders v2 — dashboard/home terminal magenta normalization
   Eliminates residual green hardcodes for preset=invaders.
   -------------------------------------------------------------------------- */
html[data-ps-preset="invaders"] body[data-page="home"] #homeLastUpdateSection .termTile--blog{
  --termA: rgba(255,79,207,.92);
}

html[data-ps-preset="invaders"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel{
  background-color: rgba(27,22,78,.96);
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(18,14,54,1) 0px,
      rgba(18,14,54,1) 2px,
      rgba(48,34,112,1) 3px,
      rgba(48,34,112,1) 20px
    );
}
html[data-ps-preset="invaders"] body[data-page="home"] #homeLastUpdateSection .homeDashShutterPanel::after{
  background:
    radial-gradient(120% 90% at 50% 4%, rgba(170,81,243,.22), rgba(170,81,243,0) 55%),
    linear-gradient(90deg, rgba(170,81,243,0) 0%, rgba(170,81,243,.16) 48%, rgba(170,81,243,0) 100%);
  opacity: .36;
}
html[data-ps-preset="invaders"] body[data-page="home"] #homeLastUpdateSection #homeDashDropToggle.homeDashHandle{
  border-top-color: rgba(170,81,243,.34);
  background: linear-gradient(180deg, rgba(27,22,78,.62), rgba(13,10,38,.78));
}

/* Black parity strict + game tones requested by design:
   - battery hidden row core: #1B164E
   - terminal overview halo: #AA51F3 */
html[data-ps-preset="invaders"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection{
  border-color: rgba(170,81,243,.34);
  background: linear-gradient(180deg, rgba(7,10,24,.92), rgba(7,10,24,.84));
}

html[data-ps-preset="invaders"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateSection .homeDashCardHead{
  border-color: rgba(170,81,243,.28);
  background: linear-gradient(180deg, rgba(27,22,78,.40), rgba(7,10,24,.22));
}

html[data-ps-preset="invaders"] body[data-page="home"] #homeLastUpdateSection .dashBar > span{
  background: #1B164E;
}

html[data-ps-preset="invaders"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSection--dashboard[data-signal="cache"],
html[data-ps-preset="invaders"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSection--dashboard[data-signal="live"]{
  border-color: rgba(170,81,243,.72);
  box-shadow:
    0 0 0 1px rgba(170,81,243,.36) inset,
    0 0 20px rgba(170,81,243,.18);
}

html[data-ps-preset="invaders"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionSignal--live,
html[data-ps-preset="invaders"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricStatus--live{
  border-color: rgba(255,79,207,.40);
  background: rgba(255,79,207,.15);
  color: rgba(255,196,236,.98);
}

html[data-ps-preset="invaders"] body[data-page="dashboard"] .dashHubCard[data-dash-state="live"] .dashHubState,
html[data-ps-preset="invaders"] body[data-page="dashboard"].psDashDesktopBoard .dashDesktopState--live,
html[data-ps-preset="invaders"] body[data-page="dashboard"] .dashHubV2Global[data-state="live"],
html[data-ps-preset="invaders"] body[data-page="dashboard"] .dashHubV2State[data-state="live"]{
  border-color: rgba(255,79,207,.40);
  color: rgba(255,196,236,.98);
  background: rgba(255,79,207,.14);
}

html[data-theme="light"][data-ps-preset="invaders"] body[data-page="dashboard"] .dashHubCard[data-dash-state="live"] .dashHubState,
html[data-theme="light"][data-ps-preset="invaders"] body[data-page="dashboard"].psDashDesktopBoard .dashDesktopState--live,
html[data-theme="light"][data-ps-preset="invaders"] body[data-page="dashboard"] .dashHubV2Global[data-state="live"],
html[data-theme="light"][data-ps-preset="invaders"] body[data-page="dashboard"] .dashHubV2State[data-state="live"]{
  color: rgba(122,18,80,.98);
  border-color: rgba(198,54,136,.74);
  background: rgba(246,162,214,.62);
}

html[data-ps-preset="invaders"] body[data-page="dashboard"] .dashHubV2Card--nostr{
  --psRimCold: rgba(255,79,207,.22);
  --psRimHot1: rgba(255,79,207,.96);
  --psRimHot2: rgba(126,242,255,.86);
  --psRimHot3: rgba(255,79,207,.72);
  --psRimGlow1: rgba(255,79,207,.20);
  --psRimGlow2: rgba(126,242,255,.08);
  --psRimBorder: rgba(255,79,207,.26);
}
html[data-ps-preset="invaders"] body[data-page="dashboard"] .dashHubV2Card--feed{
  --psRimCold: rgba(126,242,255,.22);
  --psRimHot1: rgba(126,242,255,.94);
  --psRimHot2: rgba(255,79,207,.84);
  --psRimHot3: rgba(126,242,255,.70);
  --psRimGlow1: rgba(126,242,255,.18);
  --psRimGlow2: rgba(255,79,207,.06);
  --psRimBorder: rgba(126,242,255,.24);
}

@keyframes psHomeLivePulseInvaders{
  0%{ box-shadow: 0 0 0 0 rgba(255,79,207,.42); opacity: .95; }
  70%{ box-shadow: 0 0 0 6px rgba(255,79,207,0); opacity: 1; }
  100%{ box-shadow: 0 0 0 0 rgba(255,79,207,0); opacity: .95; }
}

@media (prefers-reduced-motion: no-preference){
  html[data-ps-preset="invaders"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalSectionSignal--live::before,
  html[data-ps-preset="invaders"] body[data-page="home"][data-home-mode="updates"] #homeLastUpdateFeed .homeTerminalMentionMetricStatus--live::before{
    animation-name: psHomeLivePulseInvaders;
  }
}
