html.ck-compact-header-sizing {
  overflow-anchor: none;
}

.site-header.is-scroll-aware.ck-compact-header {
  transform: none !important;
  transition: none;
  pointer-events: auto;
}

.site-header.ck-compact-header .header-inner {
  width: min(calc(100% - 24px), 1400px);
  height: auto;
  min-height: clamp(58px, 4.9vw, 66px);
  box-sizing: border-box;
  padding-block: 4px;
  gap: clamp(8px, 1.05vw, 16px);
  align-items: center;
}

.ck-compact-header .brand {
  flex: 0 0 auto;
  gap: 0;
  min-width: 0;
}

.ck-compact-header .brand > :not(.brand-mark) {
  display: none;
}

.ck-compact-header .brand-mark {
  --ck-compact-logo-size: clamp(42px, calc(1vw + 32px), 46px);
  --ck-cat-image-size: calc(96 * 100% / 55);
  --ck-cat-image-left: calc(-20 * 100% / 55);
  --ck-cat-image-top: calc(-7 * 100% / 55);
  width: var(--ck-compact-logo-size);
  height: var(--ck-compact-logo-size);
  flex: 0 0 var(--ck-compact-logo-size);
}

.ck-compact-header .brand-mark img {
  width: var(--ck-cat-image-size);
  height: var(--ck-cat-image-size);
  left: var(--ck-cat-image-left);
  top: var(--ck-cat-image-top);
}

.ck-compact-header .header-inner > .desktop-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: space-evenly;
  align-items: center;
  width: auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 0;
  gap: clamp(7px, calc(4.4vw - 34px), 24px);
  border: 0;
  background: transparent;
  white-space: nowrap;
}

.ck-compact-header .desktop-nav > a {
  flex: 0 0 auto;
  font-size: clamp(11px, calc(.55vw + 5.7px), 13px);
  letter-spacing: 0;
  line-height: 1.4;
  padding: 9px 0;
}

.ck-compact-header .header-search {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 6px 10px;
  gap: 8px;
  font-size: clamp(12px, calc(.55vw + 6.7px), 14px);
  white-space: nowrap;
}

.ck-compact-header .header-search > span {
  font-size: inherit;
}

.ck-compact-header .header-search svg {
  width: 17px;
  height: 17px;
}

.ck-compact-header .header-actions {
  flex: 0 0 auto;
  height: auto;
  gap: clamp(6px, 0.8vw, 12px);
}

.ck-compact-header .header-actions .icon-button,
.ck-compact-header .header-actions .menu-toggle {
  min-width: 42px;
  min-height: 42px;
  width: auto;
  height: 42px;
  padding: 0 3px;
  gap: 2px;
}

.ck-compact-header .header-actions .saved-label,
.ck-compact-header .header-actions .menu-toggle small {
  font-size: 9px;
}

.site-header .ck-header-paw-trail {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.site-header .ck-header-paw-trail--return {
  opacity: 0.65;
}

.ck-header-paw-trail > span {
  position: absolute;
  width: 16px;
  height: 16px;
  color: #9c793f;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--ck-paw-angle));
  animation: ck-header-paw-trace 600ms ease-out both;
}

.ck-header-paw-trail svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

@keyframes ck-header-paw-trace {
  0% { opacity: 0; scale: 0.65; }
  19% { opacity: 0.42; scale: 1.1; }
  47% { opacity: 0.38; scale: 1; }
  100% { opacity: 0; scale: 1.08; }
}

@media (max-width: 960px) {
  .ck-compact-header .header-inner > .desktop-nav {
    display: none;
  }
}

@media (max-width: 820px) {
  .site-header.is-scroll-aware {
    overflow-x: clip;
  }

  .site-header.ck-compact-header .header-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 44px 12px;
    grid-template-areas:
      'brand categories actions'
      'brand hint actions';
    width: calc(100% - 20px);
    min-height: 60px;
    padding-block: 3px;
    gap: 0 8px;
  }

  .site-header.ck-compact-header .header-inner::after {
    content: '↔ 横にスワイプ';
    grid-area: hint;
    justify-self: center;
    color: #315e58;
    font-size: 10px;
    font-weight: 650;
    line-height: 12px;
    white-space: nowrap;
  }

  .ck-compact-header .header-inner > .brand {
    grid-area: brand;
  }

  .ck-compact-header .brand-mark {
    --ck-cat-image-size: 200%;
    --ck-cat-image-left: calc(-23 * 100% / 48);
    --ck-cat-image-top: calc(-9 * 100% / 48);
  }

  .ck-compact-header .header-inner > .desktop-nav {
    display: flex;
    grid-area: categories;
    justify-content: flex-start;
    min-height: 44px;
    padding: 0 14px 0 2px;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 2px 14px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 11px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 11px), transparent);
  }

  .ck-compact-header .desktop-nav > a {
    display: flex;
    min-height: 44px;
    align-items: center;
  }

  .ck-compact-header .header-search {
    display: none;
  }

  .ck-compact-header .header-actions {
    grid-area: actions;
    margin-left: 0;
    gap: 4px;
  }

  .ck-compact-header .header-actions .mobile-search,
  .ck-compact-header .header-actions .menu-toggle {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    flex-direction: column;
    gap: 3px;
  }

  .ck-compact-header .header-actions .mobile-search {
    display: flex;
  }

  .ck-compact-header .header-actions .mobile-search::after {
    content: '検索';
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
  }

  .ck-header-paw-trail > span {
    width: 13px;
    height: 13px;
  }
}

@media (max-width: 540px) {
  .ck-compact-header .brand-mark {
    --ck-cat-image-left: calc(-19 * 100% / 41);
    --ck-cat-image-top: calc(-8 * 100% / 41);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .ck-header-paw-trail {
    display: none;
  }
}
