body[data-maintenance-active="true"] { overflow: hidden; }
body[data-maintenance-active="true"] > :not(.app-shell),
body[data-maintenance-active="true"] .app-shell > :not([data-maintenance-screen]) { display: none !important; }
.maintenance-screen:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  color: var(--fg);
  background: radial-gradient(circle at 50% 0%, var(--glow), transparent 30rem), linear-gradient(180deg, rgba(0, 29, 20, 0.18), transparent 40%), var(--bg);
  text-align: center;
}
/* Crop the original logo's empty margins through layout; keep the asset unchanged. */
.maintenance-screen__logo { flex: 0 0 auto; margin: 0 0 32px; aspect-ratio: 3.75; }
.maintenance-screen__logo img {
  inset: auto;
  top: 50%;
  left: 50%;
  width: 132%;
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}
:root[data-theme="light"] .maintenance-screen__logo img { filter: invert(1); mix-blend-mode: multiply; }
.maintenance-screen h1 { max-width: 480px; margin: 0; font-size: clamp(26px, 6vw, 40px); line-height: 1.15; letter-spacing: -.035em; overflow-wrap: anywhere; }

/* The ordinary /app route loads this overlay after its older app stylesheet. */
.app-menu button[data-menu-view="chat"]::before {
  content: "";
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 11.5a7.5 7.5 0 0 1-7.5 7.5H6l-3 2v-5.2A7.4 7.4 0 0 1 2 12.5 7.5 7.5 0 0 1 9.5 5h3a7.5 7.5 0 0 1 7.5 6.5Z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='8.5' cy='12.5' r='0.8' fill='black'/%3E%3Ccircle cx='12' cy='12.5' r='0.8' fill='black'/%3E%3Ccircle cx='15.5' cy='12.5' r='0.8' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 11.5a7.5 7.5 0 0 1-7.5 7.5H6l-3 2v-5.2A7.4 7.4 0 0 1 2 12.5 7.5 7.5 0 0 1 9.5 5h3a7.5 7.5 0 0 1 7.5 6.5Z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='8.5' cy='12.5' r='0.8' fill='black'/%3E%3Ccircle cx='12' cy='12.5' r='0.8' fill='black'/%3E%3Ccircle cx='15.5' cy='12.5' r='0.8' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}
