.brand {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.sidebar {
  display: none;
}

.mobile-top {
  padding: 22px 20px 8px;
  padding-top: max(22px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-top .brand {
  font-size: 24px;
}

.mobile-top .brand-mark {
  height: 32px;
  width: 32px;
}

.profile {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.profile-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--person-color, var(--accent));
}

.main {
  padding: 26px 20px 120px;
  max-width: 1120px;
  margin: auto;
  min-width: 0;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}

.page-head p {
  margin-top: 8px;
}

.row-main {
  flex: 1;
  min-width: 0;
}

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 9px 8px max(10px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.tab {
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  border-radius: 14px;
}

.tab.active {
  color: var(--accent-text);
}

.tab.active .icon {
  stroke-width: 2.2;
}

/* Нижняя панель: активная вкладка в зелёной капсуле, подпись 11 px */
.tab-bar .tab {
  font-size: 11px;
}

.tab-bar .tab .icon {
  box-sizing: content-box;
  width: 24px;
  height: 24px;
  padding: 3px 16px;
  border-radius: 999px;
  transition: background-color var(--press) ease, transform var(--press) var(--ease-out);
}

.tab-bar .tab.active .icon {
  background: var(--accent-soft);
  stroke-width: 2.1;
}

.floating-action {
  position: fixed;
  bottom: 100px;
  right: 20px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent);
}

/* Место под плавающую «+ Записать»: она не закрывает последние строки */
.main:has(.floating-action) {
  padding-bottom: 180px;
}

@media(max-width:480px) {
  .page-head .btn {
    padding: 11px 16px;
  }
}

@media(min-width:680px) {
  .main {
    padding: 36px 32px 120px;
  }
}

@media(min-width:1024px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 236px;
    padding: 32px 22px;
    border-right: 1px solid var(--line);
    background: var(--sidebar-bg);
  }

  .sidebar .brand {
    padding: 0 12px;
  }

  .sidebar nav {
    display: grid;
    gap: 8px;
  }

  .sidebar .tab {
    min-height: 50px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 13px;
    padding: 12px 16px;
    font-size: 14px;
  }

  .sidebar .tab.active {
    background: var(--accent-soft);
    color: var(--ink);
  }

  .sidebar-foot {
    margin-top: auto;
    padding: 16px 10px;
  }

  .sidebar-foot p {
    margin-top: 14px;
    font-size: 12px;
    color: var(--muted);
  }

  .mobile-top,
  .tab-bar {
    display: none;
  }

  .app-shell {
    margin-left: 236px;
  }

  .main {
    padding: 52px 48px 80px;
  }

  .main:has(.floating-action) {
    padding-bottom: 120px;
  }

  .page-head {
    margin-bottom: 32px;
  }

  .floating-action {
    bottom: 32px;
    right: 40px;
  }
}
