.public-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 260px;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* The settings area has no right column: let the content take its space. */
.public-shell--settings {
  grid-template-columns: 280px minmax(0, 1fr);
}

.public-left,
.public-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.public-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Column header: one card holding an icon+title bar and, flush below it,
   the tab tray. Both halves share the same 50px height. */
.public-card.public-header {
  display: flex;
  flex-direction: column;
  padding: 0 16px;
}

.public-header__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
}

.public-header__icon {
  font-size: 18px;
  line-height: 1;
}

.public-header__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.public-header__aside {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--public-muted);
  text-decoration: none;
  white-space: nowrap;
}

.public-header__aside:hover {
  color: var(--public-accent);
}

.public-header__action {
  margin-left: auto;
}

.public-header__note {
  padding: 0 0 12px;
  font-size: 13px;
  color: var(--public-muted);
}

/* A segmented control: a recessed full-width tray with the tab pills,
   flush against the bottom edge of the header card. Concentric radii:
   the tray corners repeat the card (16px), pills are 16 - 5 (padding) = 11px. */
.public-tabs {
  display: flex;
  gap: 5px;
  margin: 0 -16px;
  padding: 5px;
  height: 50px;
  background: var(--public-soft-bg);
  border-radius: 0 0 16px 16px;
}

.public-tab {
  flex: 1 1 0;
  min-width: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 11px;
  font-size: 13px;
  color: var(--public-muted);
  font-weight: 600;
  white-space: nowrap;
}

.public-tab:hover {
  color: var(--public-text);
}

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

.public-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.public-nav__title {
  font-weight: 600;
  margin-bottom: 6px;
}

.public-nav__item {
  text-decoration: none;
  color: var(--public-text);
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 500;
}

.public-nav__item--disabled {
  color: var(--public-muted);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.7;
}

.public-nav__item--active {
  background: var(--public-accent-soft);
  color: var(--public-accent);
}

.public-nav__item:hover {
  background: var(--public-accent-soft);
  color: var(--public-accent);
}

.public-nav__item--disabled:hover {
  background: transparent;
  color: var(--public-muted);
}

.public-nav__divider {
  height: 1px;
  background: var(--public-border);
  margin: 8px 0;
}

.public-nav__item--button {
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* The instance brand above the navigation — a card, like the profile
   widget in the left column (mirrors the admin zone logo). */
.public-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 12px 16px;
}

.public-brand__icon {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}

.public-brand__text {
  font-size: 16px;
  font-weight: 700;
  color: var(--public-accent);
  text-transform: lowercase;
}

.public-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 10px;
  background: var(--public-accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.public-mobile-menu {
  display: none;
}

.public-menu-toggle {
  display: none;
}

.public-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(19, 23, 43, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1200;
}

.public-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 280px;
  background: var(--public-bg);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateX(100%);
  transition: transform 0.2s ease;
  z-index: 1202;
  overflow-y: auto;
}

.public-menu-toggle:checked~.public-menu-overlay {
  opacity: 1;
  pointer-events: auto;
}

.public-menu-toggle:checked~.public-menu-panel {
  transform: translateX(0);
}

/* Mobile-only bottom tab bar (Mastodon-style): 🏠 🔍 ➕ 🔔 ☰. */
.public-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  justify-content: space-around;
  align-items: center;
  background: var(--public-card);
  border-top: 1px solid var(--public-border);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
}

.public-tabbar__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 40px;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
  color: var(--public-muted);
  text-decoration: none;
  cursor: pointer;
}

.public-tabbar__item--active {
  color: var(--public-accent);
  background: var(--public-accent-soft);
}

/* The compose action sits in the middle of the bar, accented. */
.public-tabbar__item--compose {
  background: var(--public-accent);
  color: #ffffff;
  font-size: 24px;
  font-weight: 600;
  width: 52px;
  height: 40px;
  border-radius: 14px;
}

.public-tabbar__badge {
  position: absolute;
  top: -2px;
  right: 0;
  background: var(--public-accent);
  color: #ffffff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 5px;
}

.public-tabbar__dot {
  position: absolute;
  top: 4px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--public-accent);
}

/* Mobile-only app bar of the settings/admin zones (back arrow + title). */
.settings-appbar {
  display: none;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  min-height: 40px;
}

.settings-appbar__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--public-border);
  border-radius: 12px;
  color: var(--public-text);
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
}

.settings-appbar__back:hover {
  background: var(--public-accent-soft);
  color: var(--public-accent);
}

.settings-appbar__title {
  font-size: 18px;
  font-weight: 700;
}