* {
  box-sizing: border-box
}

:root {
  color-scheme: light;
  --motion-fast: 160ms;
  --motion-base: 220ms;
  --shadow-soft: 0 8px 26px rgba(31, 52, 39, .055);
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent
}

button {
  transition: color var(--motion-fast) ease, background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) ease
}

button:active:not(:disabled) {
  transform: translateY(1px) scale(.99)
}

button:disabled {
  cursor: not-allowed;
  opacity: .55
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-primary) 42%, transparent);
  outline-offset: 3px
}

input,
textarea {
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease
}

input:focus,
textarea:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 10%, transparent)
}

::selection {
  background: #cde5d8;
  color: #202923
}

.feature-disabled {
  display: none !important
}

body[data-mood="ocean"] {
  --color-bg: #f1f6f8;
  --color-primary: #286d82;
  --color-primary-contrast: #fff;
  --color-text: #20343b;
  --color-muted: #526469; /* was #72858b: 3.5:1 on the ocean paper */
  --color-line: #dfe9eb;
  --color-accent: #e7f1f4
}

body[data-mood="clay"] {
  --color-bg: #faf5ef;
  --color-primary: #a85e3c;
  --color-primary-contrast: #fff;
  --color-text: #382a24;
  --color-muted: #6d5a50; /* was #917e73: 3.4:1 on the clay paper */
  --color-line: #eee3d9;
  --color-accent: #f7eae0
}

body[data-mood="night"] {
  color-scheme: dark;
  --color-bg: #202925;
  --color-surface: #2a342f;
  --color-primary: #78b59b;
  --color-primary-contrast: #15231c;
  --color-text: #e7eee9;
  --color-muted: #a1afa6;
  --color-line: #3b4840;
  --color-accent: #344b3e;
  background: #202925;
  color: #e7eee9
}

body[data-mood="ocean"] [class~="bg-[#176b55]"],
body[data-mood="ocean"] [class~="bg-[#206b51]"] {
  background-color: #286d82 !important
}

body[data-mood="clay"] [class~="bg-[#176b55]"],
body[data-mood="clay"] [class~="bg-[#206b51]"] {
  background-color: #a85e3c !important
}

body[data-mood="night"] aside,
body[data-mood="night"] header,
body[data-mood="night"] .mobile-dock {
  background-color: #252f2a !important;
  border-color: #3b4840 !important
}

body[data-mood="night"] #todayView section,
body[data-mood="night"] #alternateView>section,
body[data-mood="night"] #alternateView>div>section,
body[data-mood="night"] .bg-white {
  background-color: #2a342f !important;
  border-color: #3b4840 !important;
  color: #e7eee9
}

body[data-mood="night"] input,
body[data-mood="night"] textarea {
  background-color: #202925 !important;
  color: #e7eee9 !important;
  border-color: #46544b !important
}

body[data-mood="night"] .sidebar-link.active,
body[data-mood="night"] .mobile-dock .sidebar-link.active {
  color: #b5e1ca;
  background: #344b3e
}

body[data-mood="night"] .sidebar-link:hover {
  background: #303b35
}

.grain {
  background-image: radial-gradient(#24392c0c .65px, transparent .65px);
  background-size: 5px 5px
}

.sidebar-link.active {
  color: var(--color-primary);
  background: var(--color-accent);
  font-weight: 600
}

.sidebar-link:hover {
  background: color-mix(in srgb, var(--color-accent) 58%, transparent)
}

.decision-row:hover {
  background: color-mix(in srgb, var(--color-accent) 28%, white)
}

/* Compact, calm workspace with gentle lift and clear interactive states. */
#workspace {
  padding-top: 1.35rem !important;
  padding-bottom: 2rem !important
}

#todayView>div:first-child {
  margin-bottom: 1rem !important
}

#todayView>div:first-child h1 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -.06em
}

#todayView>div:first-child p {
  margin-top: .35rem
}

#todayView>div:nth-child(2) {
  gap: .6rem;
  margin-bottom: 1rem !important
}

#todayView>div:nth-child(2)>div {
  padding: .75rem 1rem;
  border-radius: 12px
}

#todayView>div:nth-child(2)>div>div:nth-child(2) {
  margin-top: .3rem
}

#todayView>div:nth-child(3) {
  gap: .9rem
}

#todayView>div:nth-child(3)>div,
#todayView>div:nth-child(3)>aside {
  gap: .85rem !important
}

#todayView section.rounded-\[15px\]>div:first-child {
  padding: .8rem 1rem
}

#todayView #decisionList {
  max-height: 295px;
  overflow-y: auto;
  scrollbar-width: thin
}

#todayView .decision-row {
  padding: .75rem 1rem
}

#todayView #taskList {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin
}

#todayView #taskList label {
  padding-top: .65rem;
  padding-bottom: .65rem
}

#todayView aside section {
  padding: 1rem !important;
  border-radius: 13px
}

#todayView aside section p {
  margin-top: .45rem;
  margin-bottom: .6rem
}

#todayView aside section h2 {
  margin-top: .75rem
}

#alternateView {
  min-height: calc(100vh - 150px)
}

#ledgerRows,
#inboxRows {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  scrollbar-width: thin
}

#storyAttachmentGrid {
  max-height: calc(100vh - 370px);
  overflow-y: auto;
  scrollbar-width: thin
}

#todayView>div:nth-child(2)>div,
#todayView section,
.ledger-item,
.search-hit {
  transition: box-shadow var(--motion-base) ease, border-color var(--motion-base) ease, transform var(--motion-base) ease
}

#todayView>div:nth-child(2)>div {
  box-shadow: 0 1px 2px rgba(31, 52, 39, .025)
}

#todayView>div:nth-child(2)>div:hover,
.ledger-item:hover,
.search-hit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft)
}

#todayView section.rounded-\[15px\] {
  box-shadow: 0 1px 2px rgba(31, 52, 39, .025)
}

#todayView section.rounded-\[15px\]:hover {
  border-color: color-mix(in srgb, var(--color-primary) 17%, var(--color-line));
  box-shadow: var(--shadow-soft)
}

.fade-in,
.view-enter {
  animation: fade-in 280ms cubic-bezier(.2, .7, .2, 1) both
}

.view-enter>* {
  animation: rise-in 330ms cubic-bezier(.2, .7, .2, 1) both
}

.view-enter>*:nth-child(2) {
  animation-delay: 35ms
}

.view-enter>*:nth-child(3) {
  animation-delay: 70ms
}

.modal-backdrop {
  background: rgba(19, 32, 24, .42);
  backdrop-filter: blur(5px);
  animation: backdrop-in 180ms ease-out both
}

#modalPanel {
  max-height: min(88dvh, 900px);
  overflow: auto;
  overscroll-behavior: contain;
  animation: panel-in 220ms cubic-bezier(.2, .75, .25, 1) both
}

.toast {
  animation: toast-in 240ms cubic-bezier(.2, .75, .25, 1) both
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(5px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes panel-in {
  from {
    opacity: .7;
    transform: translateY(8px) scale(.985)
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1)
  }
}

@keyframes backdrop-in {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px)
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0)
  }
}

.mobile-dock {
  display: none
}

@media (max-width: 1023px) {
  #workspace {
    padding-bottom: 5.5rem !important
  }

  .mobile-dock {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    padding: .45rem .5rem max(.45rem, env(safe-area-inset-bottom));
    border-top: 1px solid var(--color-line);
    background: color-mix(in srgb, var(--color-bg) 90%, white);
    backdrop-filter: blur(14px)
  }

  .mobile-dock .sidebar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    padding: .25rem .15rem;
    color: var(--color-muted);
    border: 0;
    border-radius: 10px;
    background: transparent
  }

  .mobile-dock .sidebar-link.active {
    color: var(--color-primary);
    background: var(--color-accent)
  }

  .mobile-dock .sidebar-link>span {
    font-size: 1.15rem;
    line-height: 1.2
  }

  .mobile-dock small {
    font-size: 9px;
    font-weight: 600
  }
}

@media (max-width: 639px) {
  #workspace {
    padding-top: 1rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important
  }

  #todayView>div:nth-child(2)>div {
    padding: .65rem .7rem
  }

  #todayView>div:nth-child(2)>div>div:nth-child(2) {
    font-size: 1.2rem
  }

  #todayView>div:nth-child(2)>div>div:last-child {
    font-size: 9px
  }

  #todayView>div:nth-child(3)>div>section>div:first-child {
    padding: .75rem .85rem
  }

  #todayView .decision-row {
    padding: .7rem .85rem
  }

  #todayView .decision-row p {
    display: none
  }

  #ledgerRows,
  #inboxRows {
    max-height: calc(100vh - 225px)
  }

  #modal {
    padding: .65rem
  }

  #modalPanel {
    max-height: 92dvh
  }
}

/* Selectable desktop-inspired themes; effects stay lightweight and honor reduced motion. */
.theme-grid { align-items: stretch; }
.theme-option {
  position: relative; display: flex; align-items: center; gap: .75rem; min-height: 76px;
  padding: .65rem; border: 1px solid var(--color-line); border-radius: 13px; background: var(--color-surface, #fff);
  color: var(--color-text); text-align: left; transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.theme-option:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-line)); }
.theme-option[aria-pressed="true"] { border-color: var(--color-primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 20%, transparent); }
.theme-copy { display: grid; gap: 3px; min-width: 0; }
.theme-copy strong { font-size: 11px; font-weight: 700; }
.theme-copy small { color: var(--color-muted); font-size: 9px; }
.theme-check { display: none; margin-left: auto; color: var(--color-primary); font-size: 12px; font-weight: 800; }
.theme-option[aria-pressed="true"] .theme-check { display: block; }
.theme-swatch { width: 46px; height: 46px; flex: 0 0 46px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 5px; overflow: hidden; border-radius: 10px; background: #e8eee9; }
.theme-swatch i { display: block; border-radius: 4px; background: #fff; box-shadow: 0 1px 3px #0002; }
.theme-swatch i:first-child { grid-row: span 2; }
.theme-swatch-garden i:first-child { background: #176b55; }
.theme-swatch-ocean { background: #e5f0f4; }.theme-swatch-ocean i:first-child { background: #286d82; }
.theme-swatch-clay { background: #f6e9dc; }.theme-swatch-clay i:first-child { background: #a85e3c; }
.theme-swatch-night { background: #202925; }.theme-swatch-night i { background: #35453c; }.theme-swatch-night i:first-child { background: #78b59b; }
.theme-swatch-win11 { background: linear-gradient(140deg,#dcecff,#f6f8fc); }.theme-swatch-win11 i { background: #fff9; backdrop-filter: blur(4px); }.theme-swatch-win11 i:first-child { background: #0878d4; }
.theme-swatch-win10 { background: #e8f1fa; }.theme-swatch-win10 i { border-radius: 1px; background: #b6d9f7; }.theme-swatch-win10 i:first-child { background: #0078d4; }
.theme-swatch-aero { background: linear-gradient(140deg,#b8e9ff,#e9fbff 50%,#7dc3ed); }.theme-swatch-aero i { background: #ffffffbb; }.theme-swatch-aero i:first-child { background: #38a8e8cc; }
.theme-swatch-xp { background: linear-gradient(#61b2f5,#d4e9ff); }.theme-swatch-xp i { border-radius: 3px; background: #fff; }.theme-swatch-xp i:first-child { background: #1768bf; }
.theme-swatch-nokia { background: #f0f3f2; }.theme-swatch-nokia i { border-radius: 2px; background: #1eaaa3; }.theme-swatch-nokia i:first-child { background: #ef4a55; }
.theme-swatch-galaxy { background: linear-gradient(145deg,#090e21,#38245d); }.theme-swatch-galaxy i { background: #ffffff1c; }.theme-swatch-galaxy i:first-child { background: #9d74ff; }

body[data-mood="win11"] { --color-bg:#f3f6fb; --color-surface:#ffffffd9; --color-primary:#0878d4; --color-primary-contrast:#fff; --color-text:#1b2635; --color-muted:#66758a; --color-line:#dce4ef; --color-accent:#e4f1fd; background:radial-gradient(ellipse at 80% 0%,#e4f1ff,transparent 44%),#f3f6fb; }
body[data-mood="win11"] aside, body[data-mood="win11"] header, body[data-mood="win11"] .mobile-dock { background-color:#f8fbffcc!important; backdrop-filter:blur(24px); }
body[data-mood="win11"] #todayView section, body[data-mood="win11"] #alternateView>section, body[data-mood="win11"] #alternateView>div>section, body[data-mood="win11"] .bg-white { background-color:#ffffffd9!important; border-color:#dce5f0!important; backdrop-filter:blur(12px); }
body[data-mood="win11"] #todayView section, body[data-mood="win11"] .theme-option { border-radius:18px; box-shadow:0 8px 28px #35628a0d; }
body[data-mood="win11"] [class~="bg-[#176b55]"], body[data-mood="win11"] [class~="bg-[#206b51]"] { background-color:#0878d4!important; }
body[data-mood="win11"] .sidebar-link.active { border-radius:10px; }

body[data-mood="win10"] { --color-bg:#edf3f8; --color-surface:#fff; --color-primary:#0078d4; --color-primary-contrast:#fff; --color-text:#172b3c; --color-muted:#607487; --color-line:#d4e0eb; --color-accent:#dceeff; background:linear-gradient(135deg,#f7faff,#eaf2f8); }
body[data-mood="win10"] aside, body[data-mood="win10"] header, body[data-mood="win10"] .mobile-dock { background-color:#eaf2f8!important; border-color:#c9d9e7!important; }
body[data-mood="win10"] #todayView section, body[data-mood="win10"] #alternateView>section, body[data-mood="win10"] #alternateView>div>section, body[data-mood="win10"] .bg-white { background-color:#fff!important; border-color:#d7e3ed!important; border-radius:4px!important; box-shadow:0 2px 6px #17476b12; }
body[data-mood="win10"] [class~="bg-[#176b55]"], body[data-mood="win10"] [class~="bg-[#206b51]"] { background-color:#0078d4!important; }
body[data-mood="win10"] .sidebar-link.active { border-radius:2px; box-shadow:inset 3px 0 #0078d4; }

body[data-mood="aero"] { --color-bg:#d9eef8; --color-surface:#f5fcffdd; --color-primary:#167fb5; --color-primary-contrast:#fff; --color-text:#17374a; --color-muted:#547486; --color-line:#a9d3e8; --color-accent:#cceafa; background:radial-gradient(ellipse at 15% 0%,#fff 0,transparent 36%),linear-gradient(145deg,#d8f1fb,#acd9f0 55%,#dff5ff); }
body[data-mood="aero"] aside, body[data-mood="aero"] header, body[data-mood="aero"] .mobile-dock { background:linear-gradient(120deg,#f8fdffdd,#b5def2bb)!important; backdrop-filter:blur(18px); border-color:#9ccbe1!important; }
body[data-mood="aero"] #todayView section, body[data-mood="aero"] #alternateView>section, body[data-mood="aero"] #alternateView>div>section, body[data-mood="aero"] .bg-white { background:linear-gradient(145deg,#ffffffed,#e8f7ffdf)!important; border-color:#add5e8!important; box-shadow:0 8px 24px #24618318,inset 0 1px #fff; }
body[data-mood="aero"] #todayView section.rounded-\[15px\] { border-radius:17px; }
body[data-mood="aero"] [class~="bg-[#176b55]"], body[data-mood="aero"] [class~="bg-[#206b51]"] { background:linear-gradient(#49b5e8,#1378b6)!important; }
body[data-mood="aero"] #workspace { animation:aero-shimmer 12s ease-in-out infinite alternate; }
@keyframes aero-shimmer { from { filter:saturate(.96); } to { filter:saturate(1.08); } }

body[data-mood="xp"] { --color-bg:#eaf3fd; --color-surface:#fff; --color-primary:#1768bf; --color-primary-contrast:#fff; --color-text:#193657; --color-muted:#5d7693; --color-line:#c6d8ee; --color-accent:#dcecff; background:linear-gradient(135deg,#edf6ff,#d7e9ff); }
body[data-mood="xp"] aside, body[data-mood="xp"] header, body[data-mood="xp"] .mobile-dock { background:linear-gradient(180deg,#cce8ff,#f5fbff)!important; border-color:#9abfe2!important; }
body[data-mood="xp"] aside { border-right:2px solid #98b8dc!important; }
body[data-mood="xp"] #todayView section, body[data-mood="xp"] #alternateView>section, body[data-mood="xp"] #alternateView>div>section, body[data-mood="xp"] .bg-white { background:linear-gradient(180deg,#fff,#f5f9ff)!important; border-color:#b9cfe8!important; border-radius:10px!important; box-shadow:0 2px 6px #244b7615,inset 0 1px #fff; }
body[data-mood="xp"] [class~="bg-[#176b55]"], body[data-mood="xp"] [class~="bg-[#206b51]"] { background:linear-gradient(180deg,#3a9cf3,#0759ae)!important; }
body[data-mood="xp"] .sidebar-link.active { background:linear-gradient(90deg,#d7ecff,#eff8ff); color:#0759ae; }

body[data-mood="nokia"] { --color-bg:#f1f4f2; --color-surface:#fff; --color-primary:#e84a58; --color-primary-contrast:#fff; --color-text:#252c30; --color-muted:#707b80; --color-line:#dce2e0; --color-accent:#e0f3f0; background:linear-gradient(135deg,#f8f9f8,#e8efec); }
body[data-mood="nokia"] aside, body[data-mood="nokia"] header, body[data-mood="nokia"] .mobile-dock { background-color:#f8f9f8!important; border-color:#dbe2df!important; }
body[data-mood="nokia"] #todayView section, body[data-mood="nokia"] #alternateView>section, body[data-mood="nokia"] #alternateView>div>section, body[data-mood="nokia"] .bg-white { background-color:#fff!important; border-color:#e2e8e5!important; border-radius:3px!important; }
body[data-mood="nokia"] [class~="bg-[#176b55]"], body[data-mood="nokia"] [class~="bg-[#206b51]"] { background-color:#e84a58!important; }
body[data-mood="nokia"] .sidebar-link.active { background:#dff3f0; color:#087d76; }
body[data-mood="nokia"] #todayView>div:nth-child(2)>div:nth-child(1) { border-left:4px solid #e84a58; }
body[data-mood="nokia"] #todayView>div:nth-child(2)>div:nth-child(2) { border-left:4px solid #16a59b; }
body[data-mood="nokia"] #todayView>div:nth-child(2)>div:nth-child(3) { border-left:4px solid #f2b544; }
body[data-mood="nokia"] #todayView>div:nth-child(2)>div:nth-child(4) { border-left:4px solid #5377dc; }

body[data-mood="galaxy"] { color-scheme:dark; --color-bg:#0c1020; --color-surface:#171b31; --color-primary:#ac8cff; --color-primary-contrast:#171127; --color-text:#f1edff; --color-muted:#aaa3c5; --color-line:#2a2d4a; --color-accent:#252240; background:radial-gradient(ellipse at 85% 5%,#412d705c,transparent 38%),radial-gradient(ellipse at 15% 75%,#142e584f,transparent 40%),#0c1020; color:#f1edff; }
body[data-mood="galaxy"] aside, body[data-mood="galaxy"] header, body[data-mood="galaxy"] .mobile-dock { background-color:#12162bea!important; border-color:#2a2d4a!important; backdrop-filter:blur(18px); }
body[data-mood="galaxy"] #todayView section, body[data-mood="galaxy"] #alternateView>section, body[data-mood="galaxy"] #alternateView>div>section, body[data-mood="galaxy"] .bg-white { background:linear-gradient(145deg,#1b2039,#15192d)!important; border-color:#303453!important; color:#f1edff!important; box-shadow:0 8px 26px #06081470; }
body[data-mood="galaxy"] input, body[data-mood="galaxy"] textarea { background-color:#11162a!important; color:#f1edff!important; border-color:#383b59!important; }
body[data-mood="galaxy"] [class~="bg-[#176b55]"], body[data-mood="galaxy"] [class~="bg-[#206b51]"] { background:linear-gradient(135deg,#b294ff,#7857d8)!important; color:#171127!important; }
body[data-mood="galaxy"] .sidebar-link.active { background:#292344; color:#d3c2ff; }
body[data-mood="galaxy"] .sidebar-link:hover { background:#20243b; }
body[data-mood="galaxy"] .grain { background-image:radial-gradient(#c3a7ff18 .7px,transparent .7px); }
body[data-mood="galaxy"] .theme-option { color:#f1edff; }
body[data-mood="galaxy"] .text-\[\#87918a\], body[data-mood="galaxy"] .text-\[\#818b83\], body[data-mood="galaxy"] .text-\[\#89938b\], body[data-mood="galaxy"] .text-\[\#929b94\] { color:#aaa3c5!important; }

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important
  }
}

@media (hover: none) {

  #todayView>div:nth-child(2)>div:hover,
  .ledger-item:hover,
  .search-hit:hover,
  #todayView section.rounded-\[15px\]:hover {
    transform: none;
    box-shadow: none
  }
}

/* Theme swatches inherit a distinct, accurate palette from the picker data. */
.theme-swatch { background:var(--swatch-base,#e8eee9); }
.theme-swatch i:first-child { background:var(--swatch-primary,#176b55); }
.theme-swatch i:nth-child(2) { background:var(--swatch-secondary,#d8eadf); }
.theme-swatch i:nth-child(3) { background:var(--swatch-base,#f4f8f3); }
.theme-option:focus-visible { outline:3px solid color-mix(in srgb,var(--color-primary) 60%,white); outline-offset:3px; }

/* Thirty additional, full-workspace palettes. */
body[data-mood="anime"] { --color-bg:#fff1f7; --color-surface:#fffafd; --color-primary:#c83d82; --color-primary-contrast:#fff; --color-text:#44263a; --color-muted:#8d687e; --color-line:#f0d7e4; --color-accent:#fbe2ee; background:radial-gradient(ellipse at 85% 5%,#ffdcec,transparent 38%),linear-gradient(135deg,#fff5f9,#f9eff8); }
body[data-mood="gamer"] { color-scheme:dark; --color-bg:#111827; --color-surface:#1b2638; --color-primary:#a7ff4f; --color-primary-contrast:#14210a; --color-text:#eff6ff; --color-muted:#a6b3c5; --color-line:#344359; --color-accent:#243b35; background:radial-gradient(ellipse at 85% 0%,#204d484f,transparent 35%),radial-gradient(ellipse at 10% 80%,#38285b55,transparent 35%),#111827; }
body[data-mood="tech"] { --color-bg:#edf8ff; --color-surface:#fbfdff; --color-primary:#087fce; --color-primary-contrast:#fff; --color-text:#183348; --color-muted:#668196; --color-line:#d0e5f2; --color-accent:#dff2fc; background:linear-gradient(135deg,#f6fbff,#e8f6fc); }
body[data-mood="professional"] { --color-bg:#f3f6f9; --color-surface:#fff; --color-primary:#244d72; --color-primary-contrast:#fff; --color-text:#243343; --color-muted:#718091; --color-line:#dce4eb; --color-accent:#e4edf5; background:linear-gradient(145deg,#f9fbfd,#eef3f7); }
body[data-mood="doctor"] { --color-bg:#effaf9; --color-surface:#fff; --color-primary:#078c87; --color-primary-contrast:#fff; --color-text:#20413f; --color-muted:#6d8b88; --color-line:#d3ebe8; --color-accent:#dcf3ef; background:linear-gradient(140deg,#f8fdfc,#e8f7f5); }
body[data-mood="teacher"] { --color-bg:#fff8e9; --color-surface:#fffdf7; --color-primary:#a7601e; --color-primary-contrast:#fff; --color-text:#493820; --color-muted:#918064; --color-line:#eee2c9; --color-accent:#fbefcf; background:linear-gradient(145deg,#fffdf5,#fcf3df); }
body[data-mood="abstract"] { --color-bg:#f6f1ff; --color-surface:#fffaff; --color-primary:#7546ca; --color-primary-contrast:#fff; --color-text:#382b51; --color-muted:#82729b; --color-line:#e6dcf4; --color-accent:#ede4fc; background:radial-gradient(ellipse at 10% 0%,#f0d9ff,transparent 40%),radial-gradient(ellipse at 90% 85%,#dce5ff,transparent 38%),#f8f4ff; }
body[data-mood="iconic"] { --color-bg:#fff3f4; --color-surface:#fff; --color-primary:#c9364d; --color-primary-contrast:#fff; --color-text:#3c2529; --color-muted:#8c6c71; --color-line:#f1d7da; --color-accent:#fde4e6; background:linear-gradient(135deg,#fffafa,#ffeff0); }
body[data-mood="nature"] { --color-bg:#f3f7e9; --color-surface:#fcfff8; --color-primary:#547c39; --color-primary-contrast:#fff; --color-text:#303e28; --color-muted:#78866a; --color-line:#dfe8d3; --color-accent:#e7f0da; background:radial-gradient(ellipse at 15% 5%,#e2edcd,transparent 40%),#f5f8ed; }
body[data-mood="waterfall"] { --color-bg:#eef9fb; --color-surface:#fbfeff; --color-primary:#267e9c; --color-primary-contrast:#fff; --color-text:#203b45; --color-muted:#6d8992; --color-line:#d4e9ee; --color-accent:#dff1f5; background:linear-gradient(160deg,#f7fdff,#e6f5f8 48%,#f5fbfb); }
body[data-mood="beach"] { --color-bg:#fff8e8; --color-surface:#fffefa; --color-primary:#16818d; --color-primary-contrast:#fff; --color-text:#35413a; --color-muted:#8b8874; --color-line:#eee3c9; --color-accent:#e0f2e9; background:linear-gradient(155deg,#fff9eb,#f8ebd3 48%,#e8f5ef); }
body[data-mood="sunset"] { --color-bg:#fff2e9; --color-surface:#fffaf6; --color-primary:#bd514e; --color-primary-contrast:#fff; --color-text:#462c30; --color-muted:#947478; --color-line:#f1d9cf; --color-accent:#fbe2d7; background:linear-gradient(145deg,#fff6e8,#fce5dd 52%,#f8edf3); }
body[data-mood="forest"] { --color-bg:#eef5ed; --color-surface:#fbfefa; --color-primary:#3e7454; --color-primary-contrast:#fff; --color-text:#263a2d; --color-muted:#718578; --color-line:#d9e6d9; --color-accent:#dfeddf; background:radial-gradient(ellipse at 80% 0%,#d8ead9,transparent 40%),#f1f6ee; }
body[data-mood="desert"] { --color-bg:#fbf2e6; --color-surface:#fffcf7; --color-primary:#a65f39; --color-primary-contrast:#fff; --color-text:#49372b; --color-muted:#917c68; --color-line:#ecdeca; --color-accent:#f5e6ce; background:linear-gradient(150deg,#fff8eb,#f5e8d2 54%,#f4ece2); }
body[data-mood="sakura"] { --color-bg:#fff4f7; --color-surface:#fffafd; --color-primary:#bb4f78; --color-primary-contrast:#fff; --color-text:#452d38; --color-muted:#927583; --color-line:#f0dce4; --color-accent:#fae5ed; background:radial-gradient(ellipse at 80% 0%,#ffe1ec,transparent 42%),#fff5f8; }
body[data-mood="cyberpunk"] { color-scheme:dark; --color-bg:#120d1b; --color-surface:#21162c; --color-primary:#ff43d1; --color-primary-contrast:#250c24; --color-text:#fff0fc; --color-muted:#c4a6c1; --color-line:#4c3151; --color-accent:#39203d; background:radial-gradient(ellipse at 85% 0%,#7e205c59,transparent 38%),radial-gradient(ellipse at 12% 85%,#2629685c,transparent 38%),#120d1b; }
body[data-mood="retro"] { --color-bg:#fff3dc; --color-surface:#fffaf0; --color-primary:#bb4d2e; --color-primary-contrast:#fff; --color-text:#49342a; --color-muted:#907967; --color-line:#ebdcc1; --color-accent:#f7e6c3; background:linear-gradient(145deg,#fff9e9,#f9e9ca); }
body[data-mood="pastel"] { --color-bg:#f8f5ff; --color-surface:#fefcff; --color-primary:#725dc4; --color-primary-contrast:#fff; --color-text:#39334d; --color-muted:#817b98; --color-line:#e8e2f5; --color-accent:#eee9fb; background:linear-gradient(135deg,#fbf9ff,#f2efff 55%,#fff5f9); }
body[data-mood="minimal"] { --color-bg:#f7f8f8; --color-surface:#fff; --color-primary:#49545d; --color-primary-contrast:#fff; --color-text:#252d33; --color-muted:#737d83; --color-line:#e2e6e7; --color-accent:#eceff0; background:#f7f8f8; }
body[data-mood="coffee"] { --color-bg:#f8f1e8; --color-surface:#fffaf3; --color-primary:#81583f; --color-primary-contrast:#fff; --color-text:#403128; --color-muted:#8c7869; --color-line:#e9ddcf; --color-accent:#efe1d2; background:linear-gradient(145deg,#fcf6ee,#f1e5d7); }
body[data-mood="lavender"] { --color-bg:#f7f2fc; --color-surface:#fdfaff; --color-primary:#7656ad; --color-primary-contrast:#fff; --color-text:#382d49; --color-muted:#817291; --color-line:#e7dff0; --color-accent:#eee6f7; background:radial-gradient(ellipse at 80% 0%,#e9ddf7,transparent 43%),#f8f4fc; }
body[data-mood="arctic"] { --color-bg:#f1f9fd; --color-surface:#fbfeff; --color-primary:#2670a5; --color-primary-contrast:#fff; --color-text:#263a47; --color-muted:#728995; --color-line:#d8e8f0; --color-accent:#e0f0f7; background:linear-gradient(145deg,#fbfeff,#e6f4fa); }
body[data-mood="aurora"] { color-scheme:dark; --color-bg:#101d31; --color-surface:#192b42; --color-primary:#48d7ba; --color-primary-contrast:#10251f; --color-text:#e9f7ff; --color-muted:#a2b6c7; --color-line:#30475b; --color-accent:#203e47; background:radial-gradient(ellipse at 78% 0%,#266f725e,transparent 38%),radial-gradient(ellipse at 20% 35%,#4d35814a,transparent 36%),#101d31; }
body[data-mood="oceanic"] { --color-bg:#eaf7f4; --color-surface:#fbfffd; --color-primary:#087d82; --color-primary-contrast:#fff; --color-text:#203d3c; --color-muted:#6b8984; --color-line:#d3e9e3; --color-accent:#dcf1eb; background:linear-gradient(150deg,#f8fdfb,#e2f3ef); }
body[data-mood="highcontrast"] { --color-bg:#fff; --color-surface:#fff; --color-primary:#064fc4; --color-primary-contrast:#fff; --color-text:#101820; --color-muted:#45515c; --color-line:#9ca9b4; --color-accent:#e2edff; background:#fff; }
body[data-mood="newsroom"] { --color-bg:#f8f5ef; --color-surface:#fffdf8; --color-primary:#a83232; --color-primary-contrast:#fff; --color-text:#302c29; --color-muted:#77716a; --color-line:#e7e0d6; --color-accent:#f4e8df; background:linear-gradient(150deg,#fcfaf5,#f2ede4); }
body[data-mood="studio"] { --color-bg:#fcf4ff; --color-surface:#fffaff; --color-primary:#9343bd; --color-primary-contrast:#fff; --color-text:#392a43; --color-muted:#84718f; --color-line:#eadcf1; --color-accent:#f2e4f8; background:radial-gradient(ellipse at 80% 0%,#f0dcfa,transparent 44%),#fcf6ff; }
body[data-mood="wellness"] { --color-bg:#f5f8f3; --color-surface:#fcfefa; --color-primary:#587d69; --color-primary-contrast:#fff; --color-text:#334339; --color-muted:#7e8d81; --color-line:#e0e9df; --color-accent:#e3eee2; background:linear-gradient(145deg,#fbfcf7,#edf4eb); }
body[data-mood="blueprint"] { --color-bg:#eef5ff; --color-surface:#fbfdff; --color-primary:#1764af; --color-primary-contrast:#fff; --color-text:#20344b; --color-muted:#71849b; --color-line:#d5e2f1; --color-accent:#e0ebfa; background-color:#eef5ff; background-image:linear-gradient(#1764af0a 1px,transparent 1px),linear-gradient(90deg,#1764af0a 1px,transparent 1px); background-size:24px 24px; }
body[data-mood="arcade"] { color-scheme:dark; --color-bg:#17112d; --color-surface:#261c43; --color-primary:#55f0cf; --color-primary-contrast:#142a2a; --color-text:#f4f0ff; --color-muted:#bbb1d4; --color-line:#453660; --color-accent:#302b50; background:radial-gradient(ellipse at 85% 4%,#593c8659,transparent 37%),#17112d; }

.expanded-theme aside, .expanded-theme header, .expanded-theme .mobile-dock { background-color:color-mix(in srgb,var(--color-bg) 90%,transparent)!important; border-color:var(--color-line)!important; backdrop-filter:blur(16px); }
.expanded-theme #todayView section, .expanded-theme #alternateView section, .expanded-theme .bg-white { background-color:var(--color-surface)!important; border-color:var(--color-line)!important; color:var(--color-text)!important; }
.expanded-theme [class~="bg-[#176b55]"], .expanded-theme [class~="bg-[#206b51]"] { background:var(--color-primary)!important; color:var(--color-primary-contrast)!important; }
.expanded-theme .sidebar-link.active { color:var(--color-primary)!important; background:var(--color-accent)!important; }
.expanded-theme input:not([type="checkbox"]), .expanded-theme textarea { background:var(--color-surface)!important; color:var(--color-text)!important; border-color:var(--color-line)!important; }
.expanded-theme .theme-option[aria-pressed="true"] { box-shadow:0 0 0 2px color-mix(in srgb,var(--color-primary) 30%,transparent); }
.expanded-theme [class*="text-[#879"], .expanded-theme [class*="text-[#818"], .expanded-theme [class*="text-[#899"], .expanded-theme [class*="text-[#929"], .expanded-theme [class*="text-[#98"], .expanded-theme [class*="text-[#a0"] { color:var(--color-muted)!important; }
body[data-mood="gamer"] .theme-option[aria-pressed="true"], body[data-mood="cyberpunk"] .theme-option[aria-pressed="true"], body[data-mood="arcade"] .theme-option[aria-pressed="true"] { box-shadow:0 0 0 2px color-mix(in srgb,var(--color-primary) 42%,transparent),0 0 22px color-mix(in srgb,var(--color-primary) 23%,transparent); }
body[data-mood="tech"] #workspace { background-image:linear-gradient(#087fce08 1px,transparent 1px),linear-gradient(90deg,#087fce08 1px,transparent 1px); background-size:30px 30px; }
body[data-mood="highcontrast"] .theme-option { border-width:2px; }

/* Extra theme families: distinct palettes and CSS-only motifs, with no image downloads. */
body[data-mood="minimalicon"] { --color-bg:#f7f9f9; --color-surface:#fff; --color-primary:#4d6872; --color-primary-contrast:#fff; --color-text:#28363a; --color-muted:#718086; --color-line:#e3eaeb; --color-accent:#e7eff0; background:#f7f9f9; }
body[data-mood="largeicon"] { --color-bg:#f5f8ff; --color-surface:#fff; --color-primary:#246fda; --color-primary-contrast:#fff; --color-text:#1e2f47; --color-muted:#6b7f99; --color-line:#dce7f6; --color-accent:#e2edff; background:radial-gradient(circle at 90% 5%,#d9e8ff,transparent 35%),#f5f8ff; }
body[data-mood="textonly"] { --color-bg:#fafafa; --color-surface:#fff; --color-primary:#454545; --color-primary-contrast:#fff; --color-text:#252525; --color-muted:#707070; --color-line:#e6e6e6; --color-accent:#ededed; background:#fafafa; }
body[data-mood="micro"] { --color-bg:#f2f5f8; --color-surface:#fff; --color-primary:#536578; --color-primary-contrast:#fff; --color-text:#263746; --color-muted:#71808e; --color-line:#dce4eb; --color-accent:#e6edf3; background:linear-gradient(145deg,#f8fafc,#eef2f6); }
body[data-mood="programmer"] { color-scheme:dark; --color-bg:#111b19; --color-surface:#192522; --color-primary:#49c986; --color-primary-contrast:#102219; --color-text:#e2f3e9; --color-muted:#9ab5a5; --color-line:#2c4339; --color-accent:#203b30; background-color:#111b19; background-image:linear-gradient(#49c9860c 1px,transparent 1px),linear-gradient(90deg,#49c9860c 1px,transparent 1px); background-size:26px 26px; }
body[data-mood="hacker"] { color-scheme:dark; --color-bg:#09130d; --color-surface:#112018; --color-primary:#70ff7a; --color-primary-contrast:#102114; --color-text:#dfffe3; --color-muted:#93b99b; --color-line:#294632; --color-accent:#193421; background:radial-gradient(ellipse at 80% 0%,#164d2850,transparent 42%),#09130d; }
body[data-mood="wizard"] { color-scheme:dark; --color-bg:#151329; --color-surface:#201d3b; --color-primary:#b58cff; --color-primary-contrast:#201334; --color-text:#f2edff; --color-muted:#b4a8d0; --color-line:#3a345c; --color-accent:#30294d; background:radial-gradient(ellipse at 80% 0%,#6248a04d,transparent 40%),radial-gradient(ellipse at 10% 85%,#283e6950,transparent 38%),#151329; }
body[data-mood="superpower"] { --color-bg:#f4f7ff; --color-surface:#fff; --color-primary:#287be8; --color-primary-contrast:#fff; --color-text:#1e2d49; --color-muted:#71809c; --color-line:#dce5f4; --color-accent:#e3edff; background:radial-gradient(ellipse at 90% 0%,#f5df91,transparent 30%),linear-gradient(145deg,#f8faff,#edf3ff); }
body[data-mood="villain"] { color-scheme:dark; --color-bg:#171116; --color-surface:#241923; --color-primary:#ca4561; --color-primary-contrast:#fff; --color-text:#f5e8ed; --color-muted:#b69da8; --color-line:#44303b; --color-accent:#38222e; background:radial-gradient(ellipse at 85% 0%,#72283d55,transparent 40%),#171116; }
body[data-mood="dark"] { color-scheme:dark; --color-bg:#171a21; --color-surface:#222733; --color-primary:#8cb6ff; --color-primary-contrast:#142039; --color-text:#eef2f8; --color-muted:#a8b1bf; --color-line:#363e4c; --color-accent:#2b3546; background:radial-gradient(ellipse at 80% 0%,#293d5a55,transparent 40%),#171a21; }
body[data-mood="horror"] { color-scheme:dark; --color-bg:#151213; --color-surface:#211a1b; --color-primary:#c84b52; --color-primary-contrast:#fff; --color-text:#f3e8e8; --color-muted:#b6a0a1; --color-line:#413033; --color-accent:#352326; background:radial-gradient(ellipse at 80% 0%,#6d22294d,transparent 40%),#151213; }
body[data-mood="zombie"] { color-scheme:dark; --color-bg:#171d18; --color-surface:#222a22; --color-primary:#a7c96a; --color-primary-contrast:#202817; --color-text:#edf1df; --color-muted:#b0b89b; --color-line:#3a4538; --color-accent:#303c2a; background:radial-gradient(ellipse at 80% 0%,#71834538,transparent 42%),#171d18; }
body[data-mood="apocalypse"] { color-scheme:dark; --color-bg:#1d1918; --color-surface:#2a2320; --color-primary:#ec8051; --color-primary-contrast:#29150d; --color-text:#f5e9dc; --color-muted:#b9a79a; --color-line:#49372f; --color-accent:#3c2b24; background:radial-gradient(ellipse at 80% 0%,#b84e2e4a,transparent 40%),linear-gradient(145deg,#1d1918,#27201d); }
body[data-mood="bolt"] { color-scheme:dark; --color-bg:#151c28; --color-surface:#202b3a; --color-primary:#f4c928; --color-primary-contrast:#2b250d; --color-text:#edf1f8; --color-muted:#b0b8c5; --color-line:#374555; --color-accent:#343622; background:radial-gradient(ellipse at 85% 0%,#ab8e2440,transparent 38%),#151c28; }
body[data-mood="atoms"] { --color-bg:#eff9f8; --color-surface:#fff; --color-primary:#168f89; --color-primary-contrast:#fff; --color-text:#21413f; --color-muted:#6c8986; --color-line:#d5ebe8; --color-accent:#dff3f0; background:radial-gradient(ellipse at 80% 0%,#ccefeb,transparent 40%),#eff9f8; }
body[data-mood="physics"] { --color-bg:#f3f7ff; --color-surface:#fff; --color-primary:#3c75d5; --color-primary-contrast:#fff; --color-text:#21324e; --color-muted:#73829b; --color-line:#dce5f4; --color-accent:#e1ebfc; background-color:#f3f7ff; background-image:linear-gradient(#3c75d50a 1px,transparent 1px),linear-gradient(90deg,#3c75d50a 1px,transparent 1px); background-size:32px 32px; }
body[data-mood="maths"] { --color-bg:#f5f4ff; --color-surface:#fff; --color-primary:#625bd4; --color-primary-contrast:#fff; --color-text:#302f50; --color-muted:#777696; --color-line:#e2e0f5; --color-accent:#e9e7ff; background-color:#f5f4ff; background-image:linear-gradient(#625bd40a 1px,transparent 1px),linear-gradient(90deg,#625bd40a 1px,transparent 1px); background-size:28px 28px; }
body[data-mood="home"] { --color-bg:#f5f7ef; --color-surface:#fff; --color-primary:#58866b; --color-primary-contrast:#fff; --color-text:#2e4135; --color-muted:#78897c; --color-line:#dfe8dc; --color-accent:#e4eee1; background:linear-gradient(145deg,#fbfcf7,#edf3e9); }
body[data-mood="village"] { --color-bg:#f8f6e9; --color-surface:#fffdf5; --color-primary:#617f48; --color-primary-contrast:#fff; --color-text:#394431; --color-muted:#85866e; --color-line:#e7e5d0; --color-accent:#ecedda; background:radial-gradient(ellipse at 90% 0%,#e9edc8,transparent 40%),#f8f6e9; }
body[data-mood="town"] { --color-bg:#f5f2ed; --color-surface:#fff; --color-primary:#a75140; --color-primary-contrast:#fff; --color-text:#3e302d; --color-muted:#887873; --color-line:#e8ddd6; --color-accent:#f2e5df; background:linear-gradient(145deg,#faf8f5,#eee8e2); }
body[data-mood="city"] { --color-bg:#f0f4f8; --color-surface:#fff; --color-primary:#477caa; --color-primary-contrast:#fff; --color-text:#253747; --color-muted:#728393; --color-line:#dce4eb; --color-accent:#e3edf4; background:linear-gradient(150deg,#f8fafc,#eaf0f5); }
body[data-mood="train"] { --color-bg:#f1f6fa; --color-surface:#fff; --color-primary:#286b9a; --color-primary-contrast:#fff; --color-text:#263b4b; --color-muted:#748897; --color-line:#dbe5eb; --color-accent:#e2edf3; background:linear-gradient(145deg,#f8fbfd,#eaf2f6); }
body[data-mood="bus"] { --color-bg:#f5f7f5; --color-surface:#fff; --color-primary:#376bb8; --color-primary-contrast:#fff; --color-text:#29384a; --color-muted:#75818c; --color-line:#e0e5e2; --color-accent:#e4edf8; background:radial-gradient(ellipse at 90% 0%,#f5e59d,transparent 30%),#f5f7f5; }
body[data-mood="car"] { --color-bg:#f5f5f4; --color-surface:#fff; --color-primary:#c83d3c; --color-primary-contrast:#fff; --color-text:#2c3036; --color-muted:#777d84; --color-line:#e0e1e1; --color-accent:#f7e7e5; background:linear-gradient(145deg,#fbfbfa,#eceeef); }
body[data-mood="rocket"] { color-scheme:dark; --color-bg:#121a2b; --color-surface:#1c2940; --color-primary:#f08a43; --color-primary-contrast:#2c190c; --color-text:#edf2ff; --color-muted:#aab8ce; --color-line:#33435c; --color-accent:#352f36; background:radial-gradient(ellipse at 85% 0%,#b95d3850,transparent 38%),radial-gradient(ellipse at 10% 70%,#284b8750,transparent 45%),#121a2b; }
body[data-mood="globe"] { --color-bg:#eff7f5; --color-surface:#fff; --color-primary:#2987a4; --color-primary-contrast:#fff; --color-text:#263d40; --color-muted:#72898a; --color-line:#d8e9e5; --color-accent:#e0f0e8; background:radial-gradient(ellipse at 90% 0%,#d0e9d1,transparent 38%),linear-gradient(145deg,#f8fbfa,#eaf4f2); }
body[data-mood="moon"] { color-scheme:dark; --color-bg:#171727; --color-surface:#24243a; --color-primary:#b7a6ed; --color-primary-contrast:#231c3b; --color-text:#f0effb; --color-muted:#b0aec7; --color-line:#3a3952; --color-accent:#302e49; background:radial-gradient(ellipse at 82% 0%,#66618b44,transparent 38%),#171727; }
body[data-mood="samurai"] { color-scheme:dark; --color-bg:#191416; --color-surface:#282022; --color-primary:#c94d4e; --color-primary-contrast:#fff; --color-text:#f4e9e6; --color-muted:#b9a5a1; --color-line:#463537; --color-accent:#392729; background:linear-gradient(145deg,#251719,#171416 65%); }
body[data-mood="ninja"] { color-scheme:dark; --color-bg:#12191e; --color-surface:#1d282d; --color-primary:#62c7a3; --color-primary-contrast:#12251f; --color-text:#e8f5f1; --color-muted:#a5bbb4; --color-line:#33454a; --color-accent:#223b37; background:radial-gradient(ellipse at 85% 0%,#26634f50,transparent 38%),#12191e; }
body[data-mood="mortalkombat"] { color-scheme:dark; --color-bg:#171313; --color-surface:#251c1c; --color-primary:#e0544e; --color-primary-contrast:#fff; --color-text:#f4e9e6; --color-muted:#b8a5a1; --color-line:#463331; --color-accent:#3a2523; background:radial-gradient(ellipse at 80% 0%,#782a2455,transparent 40%),#171313; }
body[data-mood="streetfighter"] { --color-bg:#f5f2ec; --color-surface:#fff; --color-primary:#d94e37; --color-primary-contrast:#fff; --color-text:#322e31; --color-muted:#7f7776; --color-line:#e6dfd6; --color-accent:#f4e5dd; background:radial-gradient(ellipse at 90% 0%,#d9e4fa,transparent 37%),linear-gradient(145deg,#fbf8f2,#efece8); }
body[data-mood="pixel"] { color-scheme:dark; --color-bg:#17172b; --color-surface:#24243e; --color-primary:#42dfbb; --color-primary-contrast:#102820; --color-text:#f1efff; --color-muted:#b4b2d0; --color-line:#41405e; --color-accent:#2c3c4b; background-color:#17172b; background-image:linear-gradient(#ffffff07 1px,transparent 1px),linear-gradient(90deg,#ffffff07 1px,transparent 1px); background-size:16px 16px; }
body[data-mood="retrobw"] { --color-bg:#f0f0f0; --color-surface:#fff; --color-primary:#292929; --color-primary-contrast:#fff; --color-text:#202020; --color-muted:#666; --color-line:#ccc; --color-accent:#e5e5e5; background:repeating-linear-gradient(0deg,#00000004 0 1px,transparent 1px 4px),#f0f0f0; }
body[data-mood="minecraft"] { --color-bg:#f0f2e8; --color-surface:#fff; --color-primary:#4e8950; --color-primary-contrast:#fff; --color-text:#303a2e; --color-muted:#777f70; --color-line:#dfe4d5; --color-accent:#e5eddc; background:linear-gradient(180deg,#e8f0e4,#f4f2e9 48%,#f0eee5); }
body[data-mood="roblox"] { --color-bg:#f4f5f7; --color-surface:#fff; --color-primary:#d83f3a; --color-primary-contrast:#fff; --color-text:#2c3038; --color-muted:#737d89; --color-line:#dfe3e8; --color-accent:#e7eef8; background:radial-gradient(ellipse at 90% 0%,#dce8fc,transparent 38%),#f4f5f7; }
body[data-mood="cod"] { color-scheme:dark; --color-bg:#191c19; --color-surface:#252a25; --color-primary:#a1a878; --color-primary-contrast:#20231b; --color-text:#ecefe5; --color-muted:#b1b7a6; --color-line:#41483e; --color-accent:#343b2e; background-color:#191c19; background-image:linear-gradient(#a1a8780b 1px,transparent 1px),linear-gradient(90deg,#a1a8780b 1px,transparent 1px); background-size:28px 28px; }

/* These treatments emphasize each theme without concealing labels or controls. */
body[data-mood="micro"] #todayView section, body[data-mood="micro"] #alternateView section, body[data-mood="micro"] .bg-white { border-radius:9px!important; box-shadow:0 1px 3px #2030400b; }
body[data-mood="minimalicon"] .theme-icon { font-size:17px; }
body[data-mood="largeicon"] .theme-icon { display:inline-grid; place-items:center; min-width:1.8em; min-height:1.8em; border-radius:.55em; background:var(--color-accent); font-size:1.2em; }
body[data-mood="textonly"] .grain { background-image:none!important; }
body[data-mood="textonly"] #todayView section, body[data-mood="textonly"] #alternateView section { box-shadow:none!important; }
body[data-mood="programmer"] .font-mono, body[data-mood="hacker"] .font-mono, body[data-mood="pixel"] .font-mono { letter-spacing:.02em; }
body[data-mood="pixel"] #todayView section, body[data-mood="pixel"] #alternateView section, body[data-mood="pixel"] .theme-option { border-radius:5px!important; }
body[data-mood="minecraft"] #todayView section, body[data-mood="minecraft"] #alternateView section { box-shadow:0 3px 0 #53684424; }
body[data-mood="roblox"] .theme-option:hover, body[data-mood="largeicon"] .theme-option:hover { transform:translateY(-3px) scale(1.01); }
body[data-mood="bolt"] #todayView .rounded-\[13px\] { box-shadow:inset 3px 0 color-mix(in srgb,var(--color-primary) 60%,transparent); }
body[data-mood="atoms"] .theme-option:hover, body[data-mood="globe"] .theme-option:hover { box-shadow:0 6px 20px #168f8918; }
body[data-mood="apocalypse"] #workspace, body[data-mood="horror"] #workspace { animation:atmosphere-pulse 12s ease-in-out infinite alternate; }
@keyframes atmosphere-pulse { from { filter:saturate(.92); } to { filter:saturate(1.08); } }
@media (prefers-reduced-motion:reduce) { body[data-mood="apocalypse"] #workspace, body[data-mood="horror"] #workspace { animation:none; } }

/* Keep fixed utility text colors legible when a theme changes the surface palette.
   Leave controls to their own theme rules, and preserve text on colored badges. */
body[data-mood] [class*="text-[#"]:not([class*="bg-[#"]):not(button):not(button *) {
  color: var(--color-text) !important;
}

/* Muted copy stays secondary, but is always readable against the active theme. */
body[data-mood] [class*="text-[#879"]:not(button):not(button *),
body[data-mood] [class*="text-[#818"]:not(button):not(button *),
body[data-mood] [class*="text-[#899"]:not(button):not(button *),
body[data-mood] [class*="text-[#929"]:not(button):not(button *),
body[data-mood] [class*="text-[#93"]:not(button):not(button *),
body[data-mood] [class*="text-[#98"]:not(button):not(button *),
body[data-mood] [class*="text-[#9a"]:not(button):not(button *),
body[data-mood] [class*="text-[#9b"]:not(button):not(button *),
body[data-mood] [class*="text-[#a0"]:not(button):not(button *),
body[data-mood] [class*="text-[#a1"]:not(button):not(button *) {
  color: var(--color-muted) !important;
}

/* Pair the app's primary button backgrounds with their accessible foreground. */
body[data-mood] button[class~="bg-[#176b55]"],
body[data-mood] button[class~="bg-[#206b51]"] {
  color: var(--color-primary-contrast) !important;
}
body[data-mood] button[class~="bg-[#176b55]"] *,
body[data-mood] button[class~="bg-[#206b51]"] * {
  color: inherit !important;
}

/* Embedded previews can be short as well as narrow; keep themed menus reachable. */
.desktop-start-menu {
  box-sizing: border-box;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 76px - env(safe-area-inset-top));
  overflow: auto;
  overscroll-behavior: contain;
}
#modalPanel {
  max-height: min(88dvh, 900px);
  overflow: auto;
  overscroll-behavior: contain;
}

/* Prevent fixed-color utility classes on button labels/icons from overriding
   the carefully paired foreground color of each theme-specific control. */
body[data-mood] button [class*="text-[#"]:not([class*="bg-[#"]) {
  color: inherit !important;
}
