/* Diarity v6.34.0 — mobile app experience, authenticated shell only.
   The desktop sidebar and route list remain the single source of truth. */
@media (max-width:900px) {
  :root {--mobile-app-padding:clamp(14px,4.3vw,23px);}
  body:not(.public-mode):not(.auth-mode) .topbar {
    height:calc(62px + env(safe-area-inset-top,0px));
    padding:env(safe-area-inset-top,0px) var(--mobile-app-padding) 0;
    border-bottom:1px solid var(--border-soft);
    background:color-mix(in srgb,var(--bg) 93%,var(--surface));
  }
  body:not(.public-mode):not(.auth-mode) .topbar .eyebrow {display:none;}
  body:not(.public-mode):not(.auth-mode) .topbar h1 {font-size:22px;font-weight:780;letter-spacing:-.035em;}
  body:not(.public-mode):not(.auth-mode) .content {
    padding:19px var(--mobile-app-padding) calc(117px + env(safe-area-inset-bottom,0px));
  }
  /* A tactile dock, not a desktop navigation bar squeezed into five cells. */
  body:not(.public-mode):not(.auth-mode) .mobile-bottom-nav {
    left:max(10px,env(safe-area-inset-left,0px));
    right:max(10px,env(safe-area-inset-right,0px));
    bottom:calc(9px + env(safe-area-inset-bottom,0px));
    border:1px solid var(--border);
    border-radius:21px;
    min-height:68px;
    padding:6px 5px;
    background:color-mix(in srgb,var(--surface) 96%,transparent);
    box-shadow:0 12px 45px rgba(0,0,0,.13),0 3px 10px rgba(0,0,0,.04);
  }
  .mobile-bottom-item {min-height:54px; border-radius:15px; transition:background .15s ease, color .15s ease;}
  .mobile-bottom-item.active:not(.mobile-bottom-add) {background:var(--accent-soft);}
  .mobile-bottom-add .mobile-add-icon {border-radius:16px;width:46px;height:46px;min-height:46px;}
  /* Sections becomes a full-screen app launcher, rather than a cramped web sidebar. */
  body:not(.public-mode):not(.auth-mode) .sidebar {
    inset:0;
    width:100%;height:100dvh;max-width:none;
    border-radius:0;
    border:0;
    padding:calc(17px + env(safe-area-inset-top,0px)) var(--mobile-app-padding) calc(25px + env(safe-area-inset-bottom,0px));
    background:var(--bg);
    transform:translate3d(0,105%,0);
    box-shadow:none;
    overflow:hidden;
  }
  body:not(.public-mode):not(.auth-mode) .sidebar.open {transform:translate3d(0,0,0);box-shadow:0 -12px 50px rgba(0,0,0,.18);}
  .sidebar .mobile-drawer-heading {padding:0 0 10px;font-size:24px;letter-spacing:-.04em;}
  .sidebar .mobile-drawer-close {border-radius:50%;background:var(--surface);font-size:25px;}
  .sidebar .brand {padding:3px 0 16px;gap:11px;}
  .sidebar .brand-mark {width:39px;height:39px;}
  .sidebar .nav {
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;align-content:start;
    min-height:0;flex:1 1 auto;
    padding:6px 1px 16px;
    overflow-y:auto;scrollbar-width:none;
  }
  .sidebar .nav::-webkit-scrollbar {display:none;}
  .sidebar .nav .nav-item:not([hidden]) {
    min-width:0;min-height:102px;padding:14px 10px;
    display:flex;flex-direction:column;justify-content:center;align-items:center;
    text-align:center;gap:10px;
    font-size:13px;font-weight:680;line-height:1.22;
    background:var(--surface);border:1px solid var(--border-soft);
    border-radius:18px;
    transition:background .15s ease,transform .15s ease;
  }
  .sidebar .nav .nav-item[hidden] {display:none !important;}
  .sidebar .nav .nav-icon {width:36px;height:36px;display:grid;place-items:center;font-size:24px;flex:none;}
  .sidebar .nav .nav-icon svg {width:27px;height:27px;}
  .sidebar .nav .nav-item span:last-child {overflow-wrap:anywhere;white-space:normal;}
  .sidebar .nav .nav-item.active {background:var(--accent-soft);border-color:rgba(var(--accent-rgb),.25);color:var(--accent);}
  .sidebar .nav .nav-item:active {transform:scale(.98);}
  .sidebar .nav .nav-item.customize-link {background:transparent;border-style:dashed;}
  .sidebar .nav .nav-item.admin-link {background:var(--surface-2);}
  .sidebar .sidebar-bottom {padding-top:10px;}
  .sidebar .sidebar-account {background:var(--surface);border:1px solid var(--border-soft);border-radius:17px;padding:10px 12px;}
  .sidebar .sidebar-account-menu {bottom:calc(82px + env(safe-area-inset-bottom,0px));}
  .product-tour-mobile .product-tour-card {
    left:12px;right:12px;bottom:calc(14px + env(safe-area-inset-bottom,0px));
    width:auto;padding:18px;border-radius:23px;
  }
  /* Do not cover the highlighted bottom navigation with the guide card. */
  .product-tour-mobile[data-mobile-tour-step="sections-tab"] .product-tour-card,
  .product-tour-mobile[data-mobile-tour-step="quick-add"] .product-tour-card {
    bottom:auto;top:calc(76px + env(safe-area-inset-top,0px));
  }
  .product-tour-mobile .product-tour-card h3 {font-size:20px;}
  .product-tour-mobile .product-tour-card p {font-size:13px;line-height:1.5;}
  .product-tour-mobile .tour-actions .btn {min-height:44px;}
}
@media(max-width:380px) {
  .sidebar .nav {gap:8px;}
  .sidebar .nav .nav-item:not([hidden]) {min-height:92px;padding:11px 6px;font-size:12px;}
  .sidebar .nav .nav-icon {height:30px;width:30px;}
  .mobile-bottom-nav .mobile-bottom-item {font-size:9px;}
}
@media(max-height:600px) and (max-width:900px) {
  .sidebar .nav .nav-item:not([hidden]) {min-height:76px;gap:3px;}
  .sidebar .brand {padding-bottom:5px;}
  .product-tour-mobile .product-tour-card {max-height:44dvh;overflow-y:auto;}
}
@media(prefers-reduced-motion:reduce){.sidebar .nav .nav-item{transition:none;}}
