.analytics-consent,
.analytics-settings {
  position: fixed;
  z-index: 100;
  box-sizing: border-box;
  color: #28342f;
  font-family: Arial, "Noto Sans TC", "PingFang TC", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.analytics-consent {
  left: 20px;
  bottom: 20px;
  width: 400px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid #b9cdc2;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 24px #142b2026;
}

.analytics-consent h2,
.analytics-consent h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.4;
}

.analytics-consent p {
  margin: 8px 0;
}

.analytics-consent a {
  color: #29483e;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analytics-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.analytics-consent-actions button,
.analytics-settings {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #526f60;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.analytics-consent-actions button {
  flex: 1 1 130px;
  min-width: 0;
  color: #29483e;
  background: #ffffff;
}

.analytics-consent-actions .analytics-accept {
  color: #ffffff;
  background: #29483e;
}

.analytics-consent-actions .analytics-reject {
  color: #29483e;
  background: #ffffff;
}

.analytics-settings {
  left: 20px;
  bottom: 20px;
  max-width: calc(100vw - 40px);
  background: #ffffff;
  box-shadow: 0 2px 10px #142b201a;
}

.analytics-consent a:focus-visible,
.analytics-consent-actions button:focus-visible,
.analytics-settings:focus-visible {
  outline: 3px solid #b18b34;
  outline-offset: 3px;
}

.analytics-consent[hidden],
.analytics-consent [hidden],
.analytics-settings[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .analytics-consent,
  .analytics-settings {
    left: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 24px);
  }

  .analytics-consent {
    right: 12px;
    width: auto;
    max-height: calc(100vh - 112px - env(safe-area-inset-bottom, 0px));
    padding: 16px;
  }
}
