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

.preef-consent {
  color: #253248;
  font-family: "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

.preef-consent--banner {
  position: fixed;
  z-index: 2147483000;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 18px;
  margin: 0 auto;
  max-height: min(90vh, 760px);
  overflow: auto;
  max-width: 980px;
  padding: 20px;
  border: 1px solid rgba(78, 112, 157, 0.2);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 20px 60px rgba(34, 54, 80, 0.22);
  backdrop-filter: blur(18px);
}

.preef-consent__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
}

.preef-consent strong,
.preef-consent h2 {
  display: block;
  margin: 0 0 6px;
  color: #1f2a3b;
  font-size: 1.05rem;
}

.preef-consent h2 {
  font-size: 1.55rem;
}

.preef-consent p {
  margin: 0;
  color: #59677b;
  font-size: 0.9rem;
}

.preef-consent__details {
  max-width: 760px;
  margin-top: 12px;
  color: #59677b;
  font-size: 0.82rem;
}

.preef-consent__details summary {
  color: #435167;
  cursor: pointer;
  font-weight: 800;
  text-underline-offset: 3px;
}

.preef-consent__details ul {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding-left: 20px;
}

.preef-consent__details li {
  padding-left: 2px;
}

.preef-consent__details strong {
  display: inline;
  color: #35435a;
  font-size: inherit;
}

.preef-consent__details code {
  padding: 1px 4px;
  border-radius: 4px;
  color: #35435a;
  background: #f1f4fa;
  font-size: 0.9em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.preef-consent__details p {
  margin-top: 9px;
  font-size: inherit;
}

.preef-consent a {
  display: inline-block;
  margin-top: 8px;
  color: #5262c8;
  font-size: 0.86rem;
  font-weight: 700;
  text-underline-offset: 3px;
}

.preef-consent__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.preef-consent__button,
.preef-consent__close {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.preef-consent__button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
}

.preef-consent__button--primary {
  color: #fff;
  background: linear-gradient(135deg, #6a6de8, #9664d9);
  box-shadow: 0 9px 22px rgba(93, 94, 202, 0.22);
}

.preef-consent__button--secondary {
  color: #35435a;
  border: 2px solid #5262c8;
  background: #fff;
  box-shadow: 0 9px 22px rgba(82, 98, 200, 0.1);
}

.preef-consent__button:focus-visible,
.preef-consent__close:focus-visible,
[data-preef-privacy-settings]:focus-visible {
  outline: 3px solid rgba(82, 98, 200, 0.35);
  outline-offset: 3px;
}

.preef-consent--overlay {
  position: fixed;
  z-index: 2147483001;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(19, 29, 43, 0.48);
}

.preef-consent__modal {
  position: relative;
  width: min(100%, 560px);
  max-height: min(90vh, 760px);
  overflow: auto;
  padding: 30px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(15, 26, 41, 0.28);
}

.preef-consent__modal .preef-consent__actions {
  margin-top: 22px;
}

.preef-consent__eyebrow {
  color: #6b68cb;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.preef-consent__status {
  margin-top: 14px !important;
  padding: 10px 12px;
  border-radius: 12px;
  color: #4f5b71 !important;
  background: #f1f4fa;
  font-weight: 700;
}

.preef-consent__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #5c687a;
  background: #f0f3f7;
  font-size: 1.4rem;
}

@media (max-width: 720px) {
  .preef-consent--banner {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    padding: 18px;
    border-radius: 19px;
  }

  .preef-consent__content {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .preef-consent__actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .preef-consent__button {
    width: 100%;
  }

  .preef-consent__modal {
    max-height: calc(100vh - 28px);
    padding: 28px 20px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preef-consent * {
    scroll-behavior: auto !important;
  }
}
