/* Navigation and page frame. One owner for mobile geometry. */
.shell {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  background: #f5ebe6;
  border-right: 1px solid var(--line);
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 39px 24px 26px;
}
.brand {
  text-align: left;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  line-height: .95;
  font-family: var(--serif);
  font-size: 31px;
  letter-spacing: -1.35px;
}
.brand em {
  font-weight: 400;
  font-size: 30px;
  margin: 2px 0 0 51px;
}
.brand-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.brand-bow {
  color: var(--berry);
  width: 34px;
  margin-top: 8px;
}
.brand-note {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 18px;
  color: var(--muted);
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 56px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 15px;
  text-align: left;
  border-radius: 8px;
  font-size: 13px;
}
.nav-item:hover {
  background: #ebddd9;
}
.nav-item.active {
  background: #e9d4d5;
  color: var(--berry);
  font-weight: 600;
}
.nav-item.active .icon {
  stroke-width: 1.9;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 40px;
}
.storage-chip {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding: 18px 0 0;
  font-size: 11px;
  color: var(--muted);
  text-align: left;
}
.status-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  flex: none;
}
.storage-chip .icon:last-child {
  margin-left: auto;
}
.main {
  margin-left: 232px;
  padding: 0 48px 64px;
  max-width: 1780px;
}
.topbar {
  height: 91px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.topbar-title {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: none;
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 19px;
}
.search-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--muted);
  min-width: 44px;
  min-height: 44px;
}
.avatar {
  background: #ecd7d7;
  border: 1px solid #dfbfc5;
  border-radius: 50%;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--berry);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}
.mobile-brand {
  display: none;
}
.mobile-nav {
  display: none;
}
.mobile-nav .add-tab {
  flex-direction: column;
  gap: 1px;
}
.mobile-nav .add-tab .icon {
  width: 23px;
  height: 23px;
}
.mobile-nav .add-tab span {
  font-size: 9px;
  line-height: 1.2;
}
.mobile-nav button[aria-current=page] {
  color: var(--berry);
}
@media (min-width:1600px) {
  .main {
    padding-left: 68px;
    padding-right: 68px;
  }
}
@media (max-width:1190px) {
  .sidebar {
    width: 202px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .main {
    margin-left: 202px;
    padding-left: 32px;
    padding-right: 32px;
  }
  .brand {
    font-size: 28px;
  }
  .brand em {
    font-size: 28px;
    margin-left: 42px;
  }
  .brand-bow {
    width: 28px;
  }
}
@media (max-width:980px) {
  .sidebar {
    width: 178px;
    padding: 30px 15px 21px;
  }
  .main {
    margin-left: 178px;
    padding-left: 25px;
    padding-right: 25px;
  }
  .brand {
    font-size: 25px;
  }
  .brand em {
    font-size: 25px;
    margin-left: 36px;
  }
  .brand-bow {
    width: 24px;
  }
  .brand-note {
    font-size: 8px;
    letter-spacing: 1.5px;
  }
  .sidebar-nav {
    margin-top: 39px;
  }
  .nav-item {
    padding: 12px 11px;
    gap: 10px;
    font-size: 12px;
  }
  .topbar {
    height: 79px;
  }
}
@media (max-width:720px) {
  .sidebar {
    display: none;
  }
  .main {
    margin-left: 0;
    padding: 0 22px 100px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: calc(103px + env(safe-area-inset-bottom));
  }
  .topbar {
    border-bottom: 1px solid var(--line);
    gap: 12px;
    height: 78px;
    padding-top: env(safe-area-inset-top);
  }
  .topbar-title {
    display: none;
  }
  .mobile-brand {
    display: block;
  }
  .mobile-brand .brand {
    display: block;
    letter-spacing: -1px;
    line-height: 1.05;
    white-space: nowrap;
    font-size: 24px;
  }
  .mobile-brand .brand em {
    display: inline;
    margin: 0 0 0 4px;
    font-size: 24px;
  }
  .topbar-right {
    gap: 3px;
  }
  .search-btn span {
    display: none;
  }
  .search-btn {
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
  .avatar {
    font-size: 17px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
  }
  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    align-items: center;
    justify-content: space-around;
    background: #fcf6f0f7;
    border-top: 1px solid #e6d6d2;
    backdrop-filter: blur(16px);
    z-index: 50;
    box-shadow: 0 -6px 20px #4e373607;
    height: calc(74px + env(safe-area-inset-bottom));
    padding: 0 7px env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 0;
    isolation: isolate;
  }
  .mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 56px;
    z-index: 2;
    font-size: 10px;
    color: #8a7179;
  }
  .mobile-nav button .icon {
    width: 21px;
    height: 21px;
  }
  .mobile-nav button.active {
    color: var(--berry);
  }
  .mobile-nav button.active:after {
    content: "";
    position: absolute;
    bottom: calc(7px + env(safe-area-inset-bottom));
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--berry);
    display: none;
  }
  .mobile-nav .add-tab {
    background: var(--berry);
    color: white;
    box-shadow: 0 3px 9px #8b354b23;
    justify-self: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    margin: 0;
    border-radius: 16px;
    transform: rotate(-3deg);
  }
  .mobile-nav .add-tab .icon {
    width: 22px;
    height: 22px;
    transform: rotate(3deg);
  }
  .mobile-nav .add-tab:active {
    transform: rotate(0) scale(.94);
  }
  .nav-active-pill {
    position: absolute;
    left: 7px;
    top: 9px;
    height: 54px;
    width: calc((100% - 14px)/5);
    transform: translateX(calc(var(--active-tab) * 100%));
    background: #efdedf;
    border-radius: 14px;
    z-index: 0;
  }
}
@media (max-width:370px) {
  .main {
    padding-left: 16px;
    padding-right: 16px;
  }
  .mobile-brand .brand {
    font-size: 21px;
  }
  .mobile-brand .brand em {
    font-size: 21px;
  }
  .topbar-right {
    gap: 0;
  }
  .mobile-nav {
    padding-left: 3px;
    padding-right: 3px;
  }
  .mobile-nav button {
    min-width: 48px;
    font-size: 9px;
  }
  .mobile-nav .add-tab {
    margin-left: 3px;
    margin-right: 3px;
  }
  .search-btn {
    width: 44px;
    min-width: 44px;
  }
  .avatar {
    width: 44px;
    min-width: 44px;
  }
}
