/* Header circle v107 */ .mobile-tools .add-button,.top-actions .add-button{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;border:0!important;border-radius:50%!important;box-shadow:none!important;display:inline-flex!important;align-items:center;justify-content:center;background:radial-gradient(circle at center,#ff6e3d 0 14px,transparent 14.5px)!important} .mobile-tools .add-button svg,.top-actions .add-button svg{width:18px!important;height:18px!important;color:#fff;stroke:#fff}
/* Mobile brand v108: bottom navigation replaces the mobile drawer only. */
@media (max-width: 820px) {
  .mobile-sidebar-toggle,
  #app .sidebar,
  #app .sidebar-scrim { display: none !important; }
  .mobile-tools { gap: 8px; }
  .mobile-tools .mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-right: auto;
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: -.035em;
  }
  .mobile-tools .mobile-brand::before {
    content: "";
    display: block;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: url("/icon.svg") center / contain no-repeat;
  }
}

/* PWA surfaces v109: opaque bars, crisp SVG and explicit notch/home safe areas. */
@media (max-width: 820px) {
  html, body { background: #fff !important; color-scheme: light; }
  #app {
    background: #fff;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  .mobile-tools {
    background: #fff !important;
    opacity: 1;
    filter: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }
  .mobile-tools .mobile-brand,
  .mobile-tools .mobile-brand::before {
    opacity: 1 !important;
    filter: none !important;
    box-shadow: none !important;
  }
  .mobile-nav {
    background: #fff !important;
    opacity: 1;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border-top: 1px solid #e6e8eb;
    padding-top: 7px;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    padding-left: max(3px, env(safe-area-inset-left, 0px));
    padding-right: max(3px, env(safe-area-inset-right, 0px));
  }
  .modal-backdrop {
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  .modal {
    max-height: calc(94vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: calc(94dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
  .modal-actions { padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
}
/* Mobile header v110: normal spacing; the logo never scrolls into the OS bar.
   viewport-fit:auto lets Safari own the system safe area, without a second inset.
   Only the workspace scrolls; document overscroll cannot move the brand upward. */
@media (max-width: 820px) {
  html, body { height: 100%; overflow: hidden; }
  #app {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }
  #app > .workspace {
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-padding-top: 56px;
  }
  .mobile-tools {
    position: sticky;
    top: 0;
    z-index: 6;
    padding-top: 4px;
    padding-bottom: 4px;
    isolation: isolate;
  }
  body.modal-open #app > .workspace { overflow-y: hidden; }
}

/* Desktop logo v113: same compact mark with sidebar open or collapsed. */
@media (min-width: 821px) {
  .sidebar .brand img,
  .sidebar-collapsed .sidebar .brand img {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    object-fit: contain;
  }
}

/* Author credit v114: discreet footer link and account attribution. */
.app-footer .author-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.author-credit { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line, #e6e8eb); }
.author-link:focus-visible, .author-credit a:focus-visible { outline: 2px solid var(--orange, #ff6e3d); outline-offset: 4px; }
