.cookie-banner[hidden] { display: none; }

.cookie-banner, .cookie-dialog {
  color: #221551;
  background: #fff;
  border: 1px solid #ded9e9;
  border-radius: 14px;
  box-shadow: 0 12px 44px rgba(34, 21, 81, 0.2);
  font-family: "LINE Seed JP", sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
}

.cookie-banner {
  position: fixed;
  z-index: 2000;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.cookie-banner__copy { flex: 1; }
.cookie-banner h2, .cookie-dialog h2 {
  margin: 0 0 8px;
  color: #221551;
  font-size: 1.2rem;
  line-height: 1.4;
}
.cookie-banner p, .cookie-dialog p { margin: 0 0 10px; }
.cookie-banner a, .cookie-dialog a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cookie-banner > .cookie-consent__actions { flex: 0 0 280px; }

.cookie-consent__button {
  flex: 1 1 auto;
  padding: 11px 16px;
  border: 1px solid #221551;
  border-radius: 8px;
  background: #221551;
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}
.cookie-consent__button:hover { background: #440099; border-color: #440099; }
.cookie-consent__button--secondary { background: #fff; color: #221551; }
.cookie-consent__button--secondary:hover { background: #f6f4fb; }
.cookie-banner .cookie-consent__button { flex-basis: 100%; }

.cookie-dialog {
  width: min(600px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 28px;
  overflow-y: auto;
}
.cookie-dialog::backdrop { background: rgba(34, 21, 81, 0.55); }
.cookie-dialog__heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.cookie-dialog__close {
  border: 0;
  padding: 0 4px;
  background: transparent;
  color: inherit;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.cookie-consent__category { padding: 16px 0; border-top: 1px solid #ded9e9; }
.cookie-consent__category label { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-weight: 700; cursor: pointer; }
.cookie-consent__category label span { font-size: 0.8rem; font-weight: 400; }
.cookie-consent__category input { width: 18px; height: 18px; accent-color: #440099; }
.cookie-consent__category p { margin: 8px 0 0 28px; }

.cookie-settings-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.cookie-settings-link:hover { text-decoration: underline; }
.cookie-banner :focus-visible, .cookie-dialog :focus-visible, .cookie-settings-link:focus-visible {
  outline: 3px solid #0857c3;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .cookie-banner { bottom: 12px; left: 12px; right: 12px; padding: 18px; display: block; max-height: calc(100dvh - 24px); overflow-y: auto; }
  .cookie-banner > .cookie-consent__actions { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; }
  .cookie-banner .cookie-consent__button--secondary { grid-column: 1 / -1; }
  .cookie-banner h2, .cookie-dialog h2 { font-size: 1.2rem !important; }
  .cookie-dialog { padding: 22px; }
}

@media print {
  .cookie-banner, .cookie-dialog, .cookie-settings-link { display: none !important; }
}
