/* Shared floating theme control: the same icon on the website and calendar. */
:root { --floating-edge:max(16px,env(safe-area-inset-right));--floating-top:max(20px,env(safe-area-inset-top)); }
body { transition:background-color 450ms ease,color 450ms ease; }
:root .theme-switch.theme-morph {
  position:fixed;top:var(--floating-top);right:var(--floating-edge);bottom:auto;z-index:90;
  display:grid;place-items:center;width:44px;height:44px;min-height:44px;
  padding:10px;border-radius:50%;cursor:pointer;color:var(--mvm-text);
  background:color-mix(in srgb,var(--mvm-surface) 90%,transparent);
  border:1px solid var(--mvm-border);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  box-shadow:inset 0 1px 0 rgb(255 255 255 / .14),0 8px 28px rgb(0 0 0 / .12);
  transition:scale 220ms ease,box-shadow 350ms ease,background-color 350ms ease;
}
:root .theme-morph svg { width:24px;height:24px;overflow:visible; }
.theme-rays { opacity:var(--sun,0);transform:rotate(calc((1 - var(--sun,0)) * -65deg)) scale(calc(.5 + var(--sun,0) * .5));transform-origin:12px 12px; }
:root .theme-switch.theme-morph:hover { color:var(--mvm-accent);box-shadow:0 0 24px color-mix(in srgb,var(--mvm-accent) 20%,transparent); }
:root .theme-switch.theme-morph:active { scale:.9; }
header:has(.header-right) { padding-right:180px; }
header .header-right { top:var(--floating-top);right:calc(var(--floating-edge) + 56px);gap:8px; }
header .header-right #login,header .header-right .jarvis-toggle { width:44px;height:44px;min-height:44px; }
@media(max-width:760px) { body { padding-bottom:0; } }
@media(max-width:359px) {
  header:has(.header-right) .brand { gap:8px; }
  header:has(.header-right) .brand img { width:30px;height:30px; }
  header:has(.header-right) .header-title { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap; }
}
@media(prefers-reduced-motion:reduce) { body,:root .theme-switch.theme-morph { transition:none; } }

/* Public header reserves two fixed slots: Prenota, then the shared theme icon. */
:root .portal-button { top:var(--floating-top);right:calc(var(--floating-edge) + 56px); }
.header-inner { padding-right:220px; }
@media(max-width:760px) {
  .header-inner { padding-right:var(--gutter); }
  .brand { max-width:calc(100% - 172px); }
  .nav { padding-right:0; }
}
@media(max-width:359px) {
  .brand { --brand-size:30px;gap:8px;max-width:112px; }
  .brand img { width:30px;height:30px; }
  .brand-word { font-size:13px; }
  .brand-subtitle { display:none; }
}
