/**
 * Mobile app-shell — Phase 2.
 * Bottom nav, touch targets, safe areas. Hidden from 1024px up.
 */

.draco-bottom-nav {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  height: calc(var(--draco-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: color-mix(in srgb, var(--draco-bg) 94%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--draco-border);
}

.draco-bottom-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  height: var(--draco-bottom-nav-h);
  max-width: var(--draco-wide);
  margin-inline: auto;
}

.draco-bottom-nav__list li {
  flex: 1;
  min-width: 0;
}

.draco-bottom-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  height: 100%;
  min-height: var(--draco-touch);
  padding: 0.25rem 0.15rem;
  color: var(--draco-muted);
  text-decoration: none;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
}

.draco-bottom-nav__link.is-active,
.draco-bottom-nav__link[aria-current="page"] {
  color: var(--draco-accent);
}

.draco-bottom-nav__icon {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}

.draco-bottom-nav__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.draco-bottom-nav__label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.draco-theme {
  padding-bottom: calc(var(--draco-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
}

/* Compact phones 320–375 */
@media (max-width: 374px) {
  .draco-bottom-nav__label {
    font-size: 0.5625rem;
  }

  .draco-header-mobile .draco-brand__text {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Common mobile widths 375–414 */
@media (min-width: 375px) and (max-width: 767px) {
  .draco-feed {
    gap: 0.75rem;
  }

  .draco-card__title {
    font-size: 1rem;
  }
}

/* Hide app chrome on desktop */
@media (min-width: 1024px) {
  .draco-bottom-nav {
    display: none;
  }

  body.draco-theme {
    padding-bottom: 0;
  }
}
