:root { --fixdoc-safe-bottom: env(safe-area-inset-bottom, 0px); }
.fixdoc-topbar { z-index: 1030; }
.fixdoc-main-content { min-height: calc(100vh - 64px); }
.fixdoc-cookie-banner,
.fixdoc-install-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  max-width: 920px;
  margin: 0 auto;
  border-radius: 18px;
  box-shadow: 0 20px 55px rgba(15,23,42,.28);
}
.fixdoc-cookie-banner {
  bottom: calc(16px + var(--fixdoc-safe-bottom));
  z-index: 2200;
  padding: 16px;
  color:#fff;
  background:#0f172a;
}
.fixdoc-cookie-content { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.fixdoc-cookie-text strong { display:block; margin-bottom:3px; font-size:.98rem; }
.fixdoc-cookie-text p { margin:0; color:rgba(255,255,255,.84); font-size:.88rem; line-height:1.4; }
.fixdoc-cookie-accept { white-space:nowrap; border-radius:12px; }
.fixdoc-cookie-hide { opacity:0; transform:translateY(12px); transition:.2s ease; }
.fixdoc-nav-container { flex-wrap: nowrap; gap: 8px; min-width: 0; }
.fixdoc-nav-container > .d-flex { min-width: 0; gap: 8px; }
.fixdoc-nav-container .navbar-brand { white-space: nowrap; margin-right: 6px; }
.fixdoc-account-menu { min-width: 0; }
.fixdoc-user-trigger {
  min-height: 40px;
  max-width: min(46vw, 230px);
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e40af;
  border-radius: 12px;
  padding: 7px 10px;
  font-weight: 700;
}
.fixdoc-user-trigger:hover, .fixdoc-user-trigger:focus-visible { background: #dbeafe; color: #1d4ed8; }
.fixdoc-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fixdoc-user-avatar { color: #16a34a; font-size: .65rem; line-height: 1; }
.fixdoc-user-dropdown { min-width: 205px; z-index: 1050; border-radius: 14px; }
.fixdoc-user-dropdown .dropdown-item { min-height: 42px; display: flex; align-items: center; }
.fixdoc-logout-link { min-height: 40px; display: inline-flex; align-items: center; white-space: nowrap; border-radius: 12px; }

.fixdoc-install-banner {
  top: calc(78px + env(safe-area-inset-top, 0px));
  z-index: 2100;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #dbeafe;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 44px;
  grid-template-areas: 'icon copy install close';
  align-items: center;
  gap: 12px;
}
.fixdoc-install-icon {
  grid-area: icon;
  width: 44px; height: 44px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: #0d6efd; color: #fff; font-size: 1.35rem; font-weight: 800;
}
.fixdoc-install-copy { grid-area: copy; min-width: 0; }
.fixdoc-install-copy strong { display: block; color: #0f172a; }
.fixdoc-install-copy span { display: block; color: #64748b; font-size: .86rem; line-height: 1.35; }
#fixdocInstallButton { grid-area: install; min-height: 44px; border-radius: 12px; }
.fixdoc-banner-close {
  grid-area: close;
  position: static;
  width: 44px; height: 44px;
  display: flex; justify-content: center; align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: #334155;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.fixdoc-banner-close:hover, .fixdoc-banner-close:focus-visible {
  color: #0f172a; background: #dbeafe; border-color: #93c5fd;
  outline-offset: 3px;
}
@media (max-width: 767.98px) {
  .fixdoc-cookie-banner { left: 10px; right: 10px; bottom: calc(10px + var(--fixdoc-safe-bottom)); padding: 14px; }
  .fixdoc-cookie-content { display: block; }
  .fixdoc-cookie-accept { width: 100%; margin-top: 12px; min-height: 44px; }
  .fixdoc-install-banner {
    left: 10px; right: 10px;
    top: calc(68px + env(safe-area-inset-top, 0px));
    padding: 14px;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-areas: 'icon copy close' 'install install install';
    gap: 10px;
  }
  .fixdoc-install-banner #fixdocInstallButton { width: 100%; }
}
@media (max-width: 480px) {
  .fixdoc-user-trigger { max-width: min(37vw, 160px); padding: 7px 8px; }
  .fixdoc-nav-container .navbar-brand { font-size: 1.06rem; margin-right: 0; }
  .fixdoc-logout-link { padding-left: 9px; padding-right: 9px; }
  #fixdocInstallTopButton { display: none !important; }
}
@media (max-width: 350px) {
  .fixdoc-user-trigger { max-width: 32vw; }
  .fixdoc-nav-container > .d-flex { gap: 5px !important; }
}
@media (display-mode:standalone) { body { overscroll-behavior-y:contain; } }
