/* Shared product chrome — used on every page */
:root {
  --app-header: 72px;
  --app-tabbar: 68px;
}

body.has-site-header {
  padding-top: var(--app-header);
}

body.has-app-tabbar {
  padding-bottom: calc(var(--app-tabbar) + env(safe-area-inset-bottom, 0px));
}

.app-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.15rem 2.5rem;
}

.app-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.app-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7dd3fc;
  margin-bottom: 0.35rem;
}

.app-page-head h1 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.app-page-head p {
  color: rgba(220, 225, 255, 0.7);
  font-size: 0.95rem;
  margin: 0.35rem 0 0;
  max-width: 36rem;
  line-height: 1.5;
}

.app-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(46, 203, 255, 0.12);
  border: 1px solid rgba(46, 203, 255, 0.28);
  color: #7dd3fc;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  color: #041018;
  background: linear-gradient(90deg, #22d3ee, #3b82f6 55%, #6366f1);
  box-shadow: 0 8px 22px rgba(46, 203, 255, 0.28);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-secondary {
  color: #e0f7ff;
  background: rgba(46, 203, 255, 0.1);
  border: 1px solid rgba(46, 203, 255, 0.4);
}

.btn-ghost {
  color: rgba(220, 225, 255, 0.8);
  background: transparent;
  border: 1px solid rgba(140, 160, 255, 0.22);
}

.app-empty {
  text-align: center;
  padding: 2.5rem 1.25rem;
  border: 1px dashed rgba(140, 160, 255, 0.28);
  border-radius: 18px;
  background: rgba(16, 18, 34, 0.45);
}

.app-empty h3 {
  color: #fff;
  margin-bottom: 0.4rem;
}

.app-empty p {
  color: rgba(220, 225, 255, 0.7);
  margin-bottom: 1rem;
}

.app-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.15rem 2rem;
  color: rgba(220, 225, 255, 0.45);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(140, 160, 255, 0.12);
}

.app-tabbar {
  display: none;
}

@media (max-width: 800px) {
  .app-tabbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    background: rgba(8, 10, 22, 0.92);
    border-top: 1px solid rgba(140, 160, 255, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.4rem 0.35rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
  }

  .app-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    color: rgba(220, 225, 255, 0.55);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.35rem 0.2rem;
    border-radius: 12px;
  }

  .app-tabbar a.is-active {
    color: #7dd3fc;
    background: rgba(46, 203, 255, 0.1);
  }

  .app-tabbar .tab-ico {
    font-size: 1.15rem;
    line-height: 1;
  }
}

.site-nav-links a.is-active {
  color: #fff;
  position: relative;
}

.site-nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.55rem;
  height: 2px;
  border-radius: 2px;
  background: #2ecbff;
}

.site-create-btn {
  display: none;
}

@media (min-width: 801px) {
  .site-create-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #22d3ee, #6366f1);
    color: #041018;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
  }
}
