/* Shared sticky service menu: keep homepage articles/ad geometry untouched. */
html body .site-service-nav {
  position: sticky; top: 0; z-index: 35; width: 100%;
  border-top: 1px solid #173b38; border-bottom: 1px solid #173b38;
  background: #f8f7f2; color: #102d30; font-family: 'Noto Sans KR', sans-serif;
}
html body .site-service-nav > .front-container {
  width: min(1380px, calc(100% - 96px)); margin: 0 auto; padding: 0;
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  min-height: 55px; gap: 24px;
}
html body .site-service-nav.has-ticker > .front-container { grid-template-columns: max-content minmax(100px, 1fr) max-content; }
.site-service-menu { display: contents; }
.site-service-left { grid-column: 1; grid-row: 1; }
.site-service-right { grid-column: -2 / -1; grid-row: 1; }
.site-service-links { display: flex; align-items: center; gap: 24px; white-space: nowrap; }
html body .site-service-nav .site-service-links > a {
  display: flex; align-items: center; flex: none; padding: 17px 0; margin: 0;
  font-size: 14px; line-height: 20px; font-weight: 700; color: #102d30; text-decoration: none;
}
.site-service-nav a:focus-visible,.site-service-nav button:focus-visible { outline: 2px solid #667d29; outline-offset: 3px; }
.site-service-nav a.current { border-bottom: 3px solid #173b38; }
html body .site-service-nav .site-notice-ticker {
  display: flex; align-items: center; grid-column: 2; grid-row: 1;
  min-width: 0; gap: 4px; padding: 0 8px; border-inline: 1px solid #d9ddd4;
}
html body .site-service-nav .site-notice-ticker[hidden],.site-notice-tools[hidden] { display: none; }
.site-notice-viewport { position: relative; min-width: 0; flex: 1; height: 32px; overflow: hidden; }
.site-notice-slide {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 8px;
  min-width: 0; transform: translateY(90%); opacity: 0; pointer-events: none;
  transition: transform 420ms cubic-bezier(.22,.8,.25,1), opacity 420ms ease;
}
.site-notice-slide.is-before { transform: translateY(-90%); }
.site-notice-slide.is-active { transform: translateY(0); opacity: 1; pointer-events: auto; }
.site-notice-kind { flex: none; padding: 3px 6px; border-radius: 3px; background: #e8eddc; color: #415c2e; font-size: 10px; line-height: 1.4; }
.site-notice-kind--obituary { background: #e8e8e5; color: #424944; }
html body .site-service-nav .site-notice-copy {
  display: block; flex: 1; min-width: 0; margin: 0; padding: 3px 0;
  border: 0; background: none; color: #173b38; font: 600 12px/1.5 'Noto Sans KR',sans-serif;
  text-align: left; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.site-notice-tools { display: flex; flex: none; gap: 2px; }
.site-notice-tools button { width: 24px; height: 30px; padding: 0; border: 0; background: none; color: #566b52; font: 700 13px/1 sans-serif; cursor: pointer; }
.site-notice-tools button:disabled { opacity: .35; cursor: default; }
.site-notice-detail { max-width: min(480px,calc(100% - 36px)); padding: 28px; border: 1px solid #bac6ab; border-radius: 8px; color: #173b38; background: #f8f7f2; }
.site-notice-detail::backdrop { background: #071a2c66; }
.site-notice-detail small { color: #687d45; font-weight: 700; }
.site-notice-detail p { font-size: 18px; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.site-notice-detail button { padding: 8px 20px; border: 0; color: #fff; background: #173b38; cursor: pointer; }
html body.community-home main section,html body main [id] { scroll-margin-top: calc(var(--site-service-height, 55px) + 14px); }
@media (min-width: 1101px) {
  /* Centre each badge + message as a group inside the space between menus. */
  html body .site-service-nav .site-notice-ticker { padding-inline: 20px; }
  .site-notice-slide { justify-content: center; }
  html body .site-service-nav .site-notice-copy { flex: 0 1 auto; }
}
@media (min-width: 801px) and (max-width: 1100px) {
  html body .site-service-nav > .front-container { width: calc(100% - 56px); gap: 0 20px; }
  html body .site-service-nav.has-ticker > .front-container { grid-template-columns: 1fr auto; }
  html body .site-service-nav .site-notice-ticker { grid-column: 1/-1; grid-row: 2; padding: 1px 0; border-inline: 0; border-top: 1px solid #e2e5dc; }
}
@media (max-width: 800px) {
  html body .site-service-nav > .front-container,
  html body .site-service-nav.has-ticker > .front-container { display: flex; flex-direction: column; align-items: stretch; width: 100%; gap: 0; min-height: 44px; }
  .site-service-menu { display: flex; gap: 12px; overflow-x: auto; width: 100%; padding: 0 12px; box-sizing: border-box; scrollbar-width: none; overscroll-behavior-x: contain; }
  .site-service-menu::-webkit-scrollbar { display: none; }
  .site-service-links { flex: none; gap: 12px; }
  html body .site-service-nav .site-service-links > a { display: flex; padding: 13px 0; font-size: 12px; line-height: 18px; }
  html body .site-service-nav .site-notice-ticker { padding: 2px 16px; border-inline: 0; border-top: 1px solid #e2e5dc; }
  .site-notice-viewport { height: 30px; }
  html body .site-service-nav .site-notice-copy { font-size: 12px; }
  .site-notice-detail p { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .site-notice-slide { transition: none; } }
