hm-service-nav { position: absolute; z-index: 40; }
.hm-service-nav { position: absolute; left: 16px; top: 16px; width: 70px; display: grid; gap: 7px; padding: 8px; border: 1px solid rgba(229,234,240,.9); border-radius: 22px; background: var(--hm-surface); box-shadow: var(--hm-shadow); backdrop-filter: blur(18px); }
.hm-service-link { min-height: 57px; display: grid; place-items: center; align-content: center; gap: 4px; padding: 5px 3px; border-radius: 15px; color: var(--hm-muted); text-decoration: none; font-size: 11px; font-weight: 600; transition: .18s ease; }
.hm-service-link svg { width: 21px; height: 21px; fill: currentColor; }
.hm-service-link:hover { background: #f3f7f8; color: var(--hm-text); }
.hm-service-link.is-active { background: var(--hm-accent-soft); color: var(--hm-accent-strong); }
.hm-service-drawer { position: fixed; inset: 0; z-index: 200; display: grid; align-items: end; background: rgba(15,23,42,.28); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.hm-service-drawer.is-open { opacity: 1; pointer-events: auto; }
.hm-service-drawer__panel { width: min(520px,calc(100vw - 20px)); margin: 0 auto 10px; padding: 18px; border: 1px solid var(--hm-line); border-radius: 24px; background: white; box-shadow: var(--hm-shadow); transform: translateY(24px); transition: transform .2s ease; }
.hm-service-drawer.is-open .hm-service-drawer__panel { transform: translateY(0); }
.hm-service-drawer__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hm-service-drawer__top strong { font-size: 17px; }
.hm-service-drawer__close { width: 36px; height: 36px; border: 0; border-radius: 12px; background: #f1f5f7; font-size: 22px; cursor: pointer; }
.hm-service-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.hm-service-grid .hm-service-link { min-height: 78px; border: 1px solid var(--hm-line); background: #fff; font-size: 12px; }

@media (max-width: 760px) {
  .hm-service-nav { position: fixed; left: 10px; right: 10px; top: auto; bottom: calc(10px + var(--hm-safe-bottom)); width: auto; min-height: 68px; grid-template-columns: repeat(5,1fr); gap: 3px; padding: 6px; border-radius: 22px; }
  .hm-service-link { min-width: 0; min-height: 56px; border-radius: 16px; font-size: 10px; }
  .hm-service-link svg { width: 20px; height: 20px; }
  .hm-service-drawer__panel { margin-bottom: calc(10px + var(--hm-safe-bottom)); }
}


/* Standalone service pages: the rail is positioned below the common header. */
hm-service-nav[mode="links"] .hm-service-nav { position: fixed; top: calc(var(--hm-header-h) + 14px); left: 14px; }
.hm-service-link--context { border-top: 1px solid var(--hm-line); margin-top: 2px; padding-top: 8px; }

@media (max-width: 760px) {
  hm-service-nav[mode="links"] .hm-service-nav { top: auto; left: 10px; right: 10px; bottom: calc(10px + var(--hm-safe-bottom)); }
  .hm-service-link--context { display: none; }
}
