.analytics-consent {
  --consent-ink: #17171a;
  --consent-paper: #fffdf8;
  --consent-blue: #2467f2;
  --consent-blue-dark: #0a286b;
  --consent-orange: #ff9d2e;
  position: fixed;
  z-index: 2147483647;
  right: 18px;
  bottom: 18px;
  left: 18px;
  width: min(980px, calc(100% - 36px));
  max-height: calc(100vh - 36px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 24px;
  box-sizing: border-box;
  padding: 20px;
  border: 3px solid var(--consent-ink);
  border-radius: 18px;
  color: var(--consent-ink);
  background: var(--consent-paper);
  box-shadow: 0 7px 0 var(--consent-ink);
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  pointer-events: auto;
  overflow: auto;
  word-break: keep-all;
}

.analytics-consent *,
.analytics-consent *::before,
.analytics-consent *::after {
  box-sizing: border-box;
}

.analytics-consent[hidden] {
  display: none;
}

.analytics-consent__copy strong,
.analytics-consent__copy p {
  display: block;
}

.analytics-consent__details {
  display: grid;
  gap: 3px;
  margin: 8px 0;
  padding-left: 18px;
  color: #403d39;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.analytics-consent__details strong {
  display: inline;
  margin-right: 4px;
  font-weight: 900;
}

.analytics-consent__details a {
  font-size: inherit;
}

.analytics-consent__copy strong {
  font-weight: 900;
  line-height: 1.4;
}

.analytics-consent__copy p {
  margin: 5px 0 4px;
  color: #403d39;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.analytics-consent__copy a {
  color: var(--consent-blue-dark);
  font-size: 12px;
  font-weight: 850;
  text-underline-offset: 3px;
}

.analytics-consent__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-width: 250px;
}

.analytics-consent__age {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.analytics-consent__age input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--consent-blue);
}

.analytics-consent .button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 2px solid var(--consent-ink);
  border-radius: 14px;
  color: var(--consent-ink);
  background: var(--consent-paper);
  box-shadow: 0 4px 0 var(--consent-ink);
  font: inherit;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.analytics-consent .button-primary {
  color: white;
  background: var(--consent-blue);
}

.analytics-consent .button:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--consent-ink);
}

.analytics-consent .button:active {
  transform: translateY(4px);
  box-shadow: none;
}

.analytics-consent .button:disabled {
  color: #77736d;
  background: #e8e4dc;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.analytics-consent .button:focus-visible,
.analytics-consent__age input:focus-visible,
.analytics-consent__copy a:focus-visible {
  outline: 4px solid var(--consent-orange);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .analytics-consent {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .analytics-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .analytics-consent .button {
    transition-duration: 0.01ms;
  }
}
