/* DELEG8 day and night (day-night.js): a sun and a moon, bare icons with no box or border. The one that is on wears its
   colour (the sun warm, the moon the theme's lavender); the other rests in quiet ink. Kit tokens only. */
.day-night { display: flex; align-items: center; gap: var(--vx-sp-1); }
.day-night.hidden { display: none; }
.day-night-btn { display: grid; place-items: center; inline-size: 40px; block-size: 40px; padding: 0; border: 0; border-radius: var(--vx-r-pill); background: none; color: var(--vx-ink-3); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color .2s ease, transform .2s ease; }
.day-night-btn .icon { inline-size: 22px; block-size: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.day-night-btn:hover { color: var(--vx-ink-2); }
.day-night-btn:active { transform: scale(.92); }
.day-night-btn:focus-visible { outline: 2px solid var(--vx-focus); outline-offset: 1px; }
.day-night-btn[data-day-night="day"][aria-pressed="true"] { color: var(--vx-deleg8-sun, var(--vx-amber-text)); }
.day-night-btn[data-day-night="night"][aria-pressed="true"] { color: var(--vx-deleg8-moon, var(--vx-violet-text)); }
.day-night-btn[aria-pressed="true"] .icon { fill: currentColor; fill-opacity: .18; }

/* Phone: top right, level with the menu button across from it. */
.day-night-float { position: fixed; z-index: 45; inset-block-start: var(--verser-nav-top); inset-inline-end: calc(var(--edge-right) - 6px); block-size: var(--verser-nav-size); }
.day-night-float .day-night-btn { inline-size: var(--verser-nav-size); block-size: var(--verser-nav-size); }
body.desk .day-night-float { display: none; }
/* My Agent full screen on a phone: the pair closes up beside the agent's own row (From agents, Live, Mute, More), and
   steps aside on the narrowest phones where that row needs the width. */
body.verser-open:not(.desk) .day-night-float { gap: 0; inset-inline-end: calc(var(--edge-right) - 8px); }
body.verser-open:not(.desk) .day-night-float .day-night-btn { inline-size: 40px; }
@media (max-width: 371px) { body.verser-open:not(.desk) .day-night-float { display: none; } }

@media (prefers-reduced-motion: reduce) { .day-night-btn { transition: none; } .day-night-btn:active { transform: none; } }

/* The page's own scrollbars and form controls follow the look. */
html[data-mode="light"] { color-scheme: light; }

/* My Agent's glass (the text bar and chips over the stage) darkens what is behind it for the night look; by day it
   frosts lighter instead, so the bar reads as paper and not grey. */
html[data-mode="light"] .story { --story-glass: color-mix(in srgb, var(--vx-card) 78%, transparent); --story-glass-filter: var(--blur-chat) saturate(1.2); }

/* By day the sign-in's pixel field drifts behind the app: square pixels of uneven strength, lit violet low left and
   amber high right, fading out towards the middle so cards and words stay calm. Fixed, under everything, no clicks. */
.day-pixels { display: none; }
html[data-mode="light"] .day-pixels {
  display: block; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 46% 44% at 8% 88%, var(--vx-deleg8-day-pixel-violet), transparent 72%),
    radial-gradient(ellipse 30% 30% at 34% 104%, var(--vx-deleg8-day-pixel-violet), transparent 76%),
    radial-gradient(ellipse 40% 36% at 94% 8%, var(--vx-deleg8-day-pixel-amber), transparent 72%),
    radial-gradient(ellipse 24% 26% at 70% -4%, var(--vx-deleg8-day-pixel-amber), transparent 76%);
  -webkit-mask-image: url("./icons/pixel-field.svg"); mask-image: url("./icons/pixel-field.svg");
  -webkit-mask-size: 312px 312px; mask-size: 312px 312px; -webkit-mask-repeat: repeat; mask-repeat: repeat;
}
