/* New Year theme. Keep controls above the illustration. */
body.np {
  --village:url("./night.png");
  --sky:#152b3b;
  --sky-overlay:linear-gradient(90deg,#152b3b 0%,transparent 42%);
  --header-ink:#fff;
  --header-detail:#e0eaf5;
  --header-control:#102a41;
}
:root[data-theme="light"] body.np {
  --village:url("./day.png");
  --sky:#b9def7;
  --sky-overlay:linear-gradient(90deg,#cae8fa,transparent 48%);
  --header-ink:#132f46;
  --header-detail:#25465e;
  --header-control:#e6f4fd;
}
body.np #app > .head, body.np .account-header, body.np .welcome-head {
  position:relative;
  isolation:isolate;
  color:var(--header-ink);
  background-color:var(--sky);
  background-image:var(--sky-overlay),var(--village);
  background-size:cover,auto 128%;
  background-repeat:no-repeat;
  background-position:center,center bottom;
  border-bottom:1px solid #708ea6;
}
body.np :is(.head,.welcome-head) :is(h1,.welcome-brand) { color:var(--header-ink); }
body.np :is(.head,.welcome-head) .status { color:var(--header-detail); }
body.np .account-header, body.np .welcome-head {
  padding:12px 16px; min-height:68px; border-radius:var(--control-radius);
}
body.np :is(.head,.welcome-head) :is(#openTutorial,#openAdmin,.interface-preferences > summary,.text-link,.ghost) {
  background:var(--header-control); color:var(--header-ink); border-color:#9fb4c480;
}
body.np #app .nav button.active {
  box-shadow:inset 0 0 0 1px var(--glass-edge), inset 0 -2px #549ac3;
}
@media (max-width:700px) {
  body.np { --sky-overlay:linear-gradient(90deg,var(--sky) 116px,transparent 205px); }
  :root[data-theme="light"] body.np { --sky-overlay:linear-gradient(90deg,#cae8fa 116px,transparent 205px); }
  body.np #app > .head {
    padding-bottom:16px;
  }
  body.np :is(#app > .head, .account-header, .welcome-head) {
    background-size:cover,auto 100%;
    background-position:center,right bottom;
  }
  body.np .account-header, body.np .welcome-head { padding-bottom:26px; }
}
@media (max-height:440px) {
  body.np #app > .head, body.np .account-header, body.np .welcome-head { padding-bottom:8px; }
}
@media (prefers-reduced-motion:no-preference) {
  body.np :is(.head,.welcome-head)::before {
    content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
    background-image:
      radial-gradient(circle at 18px 5px,#fff 1px,transparent 1.7px),
      radial-gradient(circle at 75px 33px,#e6f4ff 1.3px,transparent 2px),
      radial-gradient(circle at 47px 22px,#e6f4ff .7px,transparent 1.4px);
    background-size:113px 51px,151px 77px,83px 61px;
    opacity:.6; animation:posty-winter-snow 8s linear infinite;
  }
  :root[data-theme="light"] body.np :is(.head,.welcome-head)::before { opacity:.94; }
  @keyframes posty-winter-snow {
    from { background-position:0 0,0 0,0 0; }
    to { background-position:0 102px,0 77px,0 61px; }
  }
}

body.np :is(#app > .head,.account-header,.welcome-head) .mark {
  width:clamp(50px,13.5vw,58px);
  height:clamp(50px,13.5vw,58px);
  background:transparent url("./posty-ushanka.png") center / contain no-repeat;
  border-radius:0;
  box-shadow:none;
}
body.np .head .brand > div { overflow:hidden; }

/* A swag hangs from the channel bar. Its two light circuits breathe independently. */
body.np .winter-eaves {
  display:block;
  position:relative;
  flex:none;
  pointer-events:none;
  height:45px;
  --swag-size:clamp(238px,76vw,330px) auto;
  background:url("./eaves.png") center top / var(--swag-size) repeat-x;
}
body.np .winter-eaves::before, body.np .winter-eaves::after {
  content:"";
  position:absolute;
  inset:0;
  background:url("./bulbs.png") center top / var(--swag-size) repeat-x;
  opacity:.65;
}
body.np .winter-eaves::before { clip-path:inset(0 50% 0 0); }
body.np .winter-eaves::after { clip-path:inset(0 0 0 50%); }
@media (prefers-reduced-motion:no-preference) {
  body.np .winter-eaves::before { animation:posty-festoon 3.3s ease-in-out infinite alternate; }
  body.np .winter-eaves::after { animation:posty-festoon 4.7s -2s ease-in-out infinite alternate-reverse; }
  @keyframes posty-festoon { from {opacity:.18;} to {opacity:1;} }
}

/* Carry the illustrated square to the very edge of the navigation. The distant
   bank continues across wider workspaces and the sleigh rests on its runners. */
body.np #workspaceScroll {
  display:flex;
  flex-direction:column;
  --winter-gutter:32px;
  padding:0 var(--winter-gutter);
}
body.np #workspaceScroll > .page { flex:none; }
body.np #workspaceScroll > .winter-eaves { margin:0 calc(-1 * var(--winter-gutter)) 10px; }
body.np .account-shell > .winter-eaves { margin-bottom:8px; }
body.np #workspaceScroll::after, body.np .account-footer::before {
  --square:url("./square-night.png");
  --bank:#385460;
  content:"";
  display:block;
  flex:none;
  height:clamp(72px,21vw,102px);
  pointer-events:none;
  background:var(--square) center bottom / auto 100% no-repeat,
    linear-gradient(to top,var(--bank) 13.6%,transparent 13.6%);
}
:root[data-theme="light"] body.np #workspaceScroll::after,
:root[data-theme="light"] body.np .account-footer::before {
  --square:url("./square-day.png");
  --bank:#d2c49e;
}
body.np #workspaceScroll::after { margin:auto calc(-1 * var(--winter-gutter)) 0; }
body.np .account-footer::before { margin-bottom:10px; }
@media (min-width:1080px) { body.np #workspaceScroll { --winter-gutter:36px; } }
@media (max-width:1079px) { body.np #workspaceScroll { --winter-gutter:20px; } }
@media (max-width:600px) { body.np #workspaceScroll { --winter-gutter:16px; } }
@media (max-width:360px) { body.np #workspaceScroll { --winter-gutter:12px; } }

@media (max-width:1079px) {
  body.np #app:has(#nav:not([hidden])) #workspaceScroll { padding-bottom:0; }
  body.np #workspaceScroll::after {
    box-sizing:content-box;
    border-bottom:calc(var(--dock-height) + var(--dock-bottom)) solid var(--bank);
    min-height:calc(var(--dock-height) + 16px);
  }
}
