/* ============================================================
   Header & footer — professional "web app" look
   Self-contained: no external fonts/icon CDNs, so it renders
   identically wherever this is hosted. Uses the same color
   tokens (--red, --ink, --muted, --line, --card) already
   defined in style.css.
   ============================================================ */

/* ---------- header ---------- */
.app-header{
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(251,250,247,0.92);
  -webkit-backdrop-filter:saturate(180%) blur(10px);
  backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid var(--line);
  transition:box-shadow .2s ease, background .2s ease;
}
.app-header.scrolled{
  box-shadow:0 2px 14px rgba(23,19,19,0.08);
}

.app-header-inner{
  max-width:680px;
  margin:0 auto;
  padding:12px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  min-width:0;
}
.brand-logo{
  width:42px;
  height:42px;
  object-fit:contain;
  border-radius:11px;
  background:var(--ink);
  padding:5px;
  flex-shrink:0;
  box-shadow:0 4px 10px -4px rgba(33,29,26,.3);
}
.brand-text{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.brand-name{
  font-size:15px;
  font-weight:800;
  color:var(--ink);
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.brand-tagline{
  font-size:11.5px;
  font-weight:600;
  letter-spacing:0.05em;
  text-transform:uppercase;
  color:var(--red);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.app-header-badge{
  display:flex;
  align-items:center;
  gap:7px;
  font-size:12px;
  font-weight:600;
  color:var(--muted);
  background:var(--red-tint);
  border:1px solid rgba(200,30,44,0.18);
  padding:7px 12px;
  border-radius:999px;
  flex-shrink:0;
  white-space:nowrap;
}
.badge-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--green);
  display:inline-block;
  box-shadow:0 0 0 3px var(--green-tint);
}

@media (max-width:420px){
  .app-header-inner{
    padding:10px 14px;
    flex-wrap:wrap;
    row-gap:8px;
  }
  .brand{
    width:100%;
  }
  .brand-logo{width:36px;height:36px;}
  .brand-name{font-size:13.5px;}
  .brand-tagline{font-size:10px;}
  .app-header-badge{
    font-size:11px;
    padding:5px 10px;
  }
}

@media (max-width:340px){
  .app-header-badge{
    font-size:10.5px;
    padding:4px 9px;
    gap:5px;
  }
  .badge-dot{width:6px;height:6px;}
}

/* ---------- footer ---------- */
.app-footer{
  margin-top:8px;
  background:var(--ink);
  color:#cfcbca;
  padding:28px 18px 26px;
}
.app-footer-inner{
  max-width:680px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:18px;
}
.footer-brand{
  display:flex;
  align-items:center;
  gap:14px;
}
.footer-logo{
  width:44px;
  height:44px;
  object-fit:contain;
  border-radius:11px;
  background:#ffffff;
  padding:5px;
  flex-shrink:0;
}
.footer-brand-text strong{
  display:block;
  font-size:15px;
  font-weight:800;
  color:#ffffff;
  margin-bottom:4px;
}
.footer-brand-text p{
  margin:0;
  font-size:12.5px;
  line-height:1.5;
  color:#a8a3a2;
  max-width:440px;
}

.footer-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  font-size:12.5px;
  color:#b8b4b3;
  border-top:1px solid rgba(255,255,255,0.1);
  padding-top:16px;
}
.footer-divider{color:#555050;}

@media (max-width:420px){
  .footer-brand{align-items:flex-start;}
  .footer-brand-text p{max-width:none;}
}

@media (prefers-reduced-motion: reduce){
  .app-header{transition:none;}
}
