/* Site-wide cookie consent UI; independent of individual page styles. */
.ns-consent,
.ns-consent__preferences {
  box-sizing: border-box;
  font-family: Inter, "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ns-consent *,
.ns-consent__preferences { box-sizing: border-box; }

.ns-consent[hidden],
.ns-consent__preferences[hidden] { display: none !important; }

.ns-consent {
  position: fixed;
  inset: auto 16px 16px;
  margin-inline: auto;
  width: min(640px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  z-index: 10000;
  padding: 22px 24px;
  color: #18253a;
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  box-shadow: 0 14px 60px rgba(15, 35, 65, .22);
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
}

.ns-consent h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: #112d50;
}

.ns-consent p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.7;
  color: #40516a;
}

.ns-consent__privacy {
  display: inline-block;
  margin: 0 0 16px;
  color: #1a5fb4;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 13px;
}

.ns-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ns-consent__button {
  appearance: none;
  flex: 1 1 190px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #1a5fb4;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1.5;
  transition: background-color 120ms ease, color 120ms ease;
}

.ns-consent__button--primary {
  color: #ffffff;
  background-color: #1a5fb4;
}

.ns-consent__button--primary:hover { background-color: #0d3b7a; }

.ns-consent__button--secondary {
  color: #1a5fb4;
  background-color: #ffffff;
}

.ns-consent__button--secondary:hover { background-color: #eff5ff; }

.ns-consent__preferences {
  appearance: none;
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9999;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid #bacbdf;
  border-radius: 999px;
  background: #ffffff;
  color: #244a79;
  box-shadow: 0 3px 12px rgba(15, 35, 65, .14);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.ns-consent__preferences:hover { background: #f0f6ff; }

.ns-consent__button:focus-visible,
.ns-consent__preferences:focus-visible,
.ns-consent__privacy:focus-visible {
  outline: 3px solid #4da6e8;
  outline-offset: 3px;
}

@media (max-width: 560px) {
  .ns-consent {
    bottom: 10px;
    width: calc(100% - 20px);
    padding: 18px;
  }

  .ns-consent__actions { flex-direction: column; }
  .ns-consent__button { flex-basis: auto; width: 100%; }
  .ns-consent__preferences { left: 10px; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .ns-consent__button { transition: none; }
}
