.customer-page,
.customer-page * {
  box-sizing: border-box;
}

body.customer-page {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  color: #171717;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
}

.customer-page .site-header {
  position: relative;
  inset: auto;
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
  transform: none;
  animation: none !important;
  box-shadow: 0 10px 28px rgba(162, 0, 39, 0.12);
}

.customer-page .site-header::after {
  display: none;
  content: none;
  animation: none;
}

.customer-page.embed .site-header,
.customer-page.embed .customer-heading {
  display: none;
}

.customer-page .customer-heading {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 20px 0;
  color: #171717;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-align: center;
}

.customer-page .customer-viewer {
  position: relative;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 220px;
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  touch-action: pan-y;
  animation: none;
  opacity: 1;
  filter: none;
}

.customer-page #viewer {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  touch-action: pan-y;
  cursor: grab;
}

.customer-page #viewer:active {
  cursor: grabbing;
}

.customer-page .viewer-controls[hidden] {
  display: none;
}

.customer-page .viewer-controls {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.customer-page .viewer-controls button {
  display: inline-flex;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #171717;
  cursor: pointer;
  transition: color 150ms ease;
}

.customer-page .viewer-controls button:hover:not(:disabled) {
  color: #b0002a;
}

.customer-page .viewer-controls button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.customer-page .viewer-controls svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.9));
}

.customer-page .viewer-controls button:focus-visible,
.customer-page #viewer:focus-visible {
  outline: 2px solid #b0002a;
  outline-offset: 2px;
}

.customer-page .map-attribution {
  display: block;
  flex: 0 0 auto;
  align-self: flex-end;
  max-width: calc(100% - 20px);
  margin: 2px 10px 0;
  padding: 0;
  background: transparent;
  color: #555;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  text-align: right;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.customer-page .map-attribution:focus-visible {
  outline: 2px solid #b0002a;
  outline-offset: 2px;
}

.customer-page #status {
  position: absolute;
  inset: 40% 20px auto;
  margin: 0;
  color: #171717;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}

.customer-page .customer-footer {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 16px 10px;
  background: #fff;
  color: #333;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.customer-page .customer-footer p {
  margin: 0;
}

.customer-page .customer-footer .legend {
  padding: 4px 8px;
  border: 1px solid rgba(23, 23, 23, 0.2);
  background: #fff;
  color: #171717;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.customer-page .credits {
  display: grid;
  row-gap: 2px;
  max-width: 100%;
  color: #666;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.customer-page .credits .credit-line {
  display: block;
}

.customer-page .credits a {
  color: #666;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.customer-page .credits a:focus-visible {
  outline: 2px solid #b0002a;
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .customer-page .customer-heading {
    padding: 8px 12px 0;
    font-size: 16px;
  }

  .customer-page .viewer-controls {
    top: 8px;
    right: 8px;
    gap: 2px;
  }

  .customer-page .customer-footer {
    gap: 6px;
    padding: 6px 10px 8px;
  }
}

@media (max-height: 480px) {
  .customer-page.embed .customer-viewer {
    min-height: 160px;
  }

  .customer-page:not(.embed) .customer-viewer {
    min-height: 0;
  }

  .customer-page .customer-footer {
    gap: 2px;
    padding: 2px 12px;
  }

  .customer-page .customer-footer .legend {
    padding: 2px 8px;
  }

  .customer-page .credits {
    row-gap: 0;
  }

  .customer-page .credits .credit-line {
    line-height: 1.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer-page .viewer-controls button {
    transition: none;
  }
}

.customer-page.embed.parent-attribution .credits {
  display: none;
}

.customer-page.embed.parent-attribution .customer-footer {
  gap: 0;
  padding: 4px 10px 6px;
}
