/* Keep the app chrome outside the scrolling content in mobile browsers and WebViews. */
html {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  scroll-behavior: auto;
}
body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100vh;
  height: var(--app-height, 100dvh);
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
.site-header {
  position: relative;
  top: auto;
  padding-top: env(safe-area-inset-top, 0px);
  background: #fff;
}
.app-viewport {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding: 24px 0;
}
#main:focus,
#main:focus-visible {
  outline: none;
}
.sidebar { top: 24px; }
.site-footer { padding-bottom: 28px; }
.app-footer {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  min-height: 66px;
  padding: 8px 36px calc(8px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: #fff;
}
.mobile-nav {
  position: static;
  inset: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(68px, 1fr));
  gap: 18px;
  max-width: 420px;
  width: 100%;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  border: 0;
}
.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  gap: 3px;
  padding: 2px 0;
  color: #9595a0;
  font-size: 10px;
  line-height: 1.3;
}
.mobile-nav a svg { width: 20px; height: 20px; }
.mobile-nav a.active { color: var(--blue); }
.mobile-nav a[data-nav="help"].active { color: var(--red); }
.dock-brand {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: #62626d;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.05em;
  margin-right: auto;
  white-space: nowrap;
}
.dock-brand span { font-size: 10px; font-weight: 500; letter-spacing: 0; }
.dock-about {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-size: 11px;
  color: #82828e;
  white-space: nowrap;
}
.dock-about svg { width: 13px; height: 13px; }
.owner-credit {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 12px;
  font-size: 11px;
  color: #8a8a94;
}
.owner-credit strong { color: #666672; font-weight: 600; }
.owner-credit svg { width: 13px; height: 13px; }
.owner-credit:hover,
.owner-credit:hover strong { color: var(--blue); }
.about-intro { font-size: 13px; color: var(--muted); line-height: 1.85; }
.about-steps { display: grid; gap: 11px; }
.about-signature {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.about-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #eef1f5;
  color: #657080;
  font-size: 13px;
  font-weight: 700;
}
.about-signature strong { display: block; font-size: 14px; font-weight: 650; }
.about-signature span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.toast { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 850px) {
  .app-footer { gap: 18px; padding-left: 24px; padding-right: 24px; }
  .dock-brand span { display: none; }
  .mobile-nav { max-width: 340px; gap: 8px; }
}
@media (max-width: 650px) {
  .app-footer {
    min-height: 64px;
    padding: 7px 12px calc(7px + env(safe-area-inset-bottom, 0px));
  }
  .dock-brand,
  .dock-about { display: none; }
  .mobile-nav {
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }
  .mobile-nav a { min-height: 47px; font-size: 10px; }
  .mobile-nav a svg { width: 21px; height: 21px; }
  .site-footer { margin-top: 28px; padding: 23px 0 28px; }
  .sidebar { position: static; }
  .owner-credit { font-size: 10px; margin-top: 10px; }
  .about-intro { font-size: 12px; }
}
@media print {
  html, body {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .app-viewport {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .app-footer { display: none !important; }
}
