.analytics-consent {
  --analytics-ink: #173b35;
  --analytics-surface: #fff;
  --analytics-border: #648c82;
  position: fixed;
  z-index: 10000;
  inset: auto 12px 76px;
  max-width: 540px;
  max-height: 65vh;
  overflow: auto;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid var(--analytics-border);
  border-radius: 12px;
  background: var(--analytics-surface);
  color: var(--analytics-ink);
  box-shadow: 0 4px 24px #0002;
  font: 15px/1.7 "Yu Gothic", sans-serif;
}

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

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

.analytics-consent a {
  color: var(--analytics-ink);
  text-decoration: underline;
}

.analytics-consent__actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.analytics-consent__button {
  flex: 1;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--analytics-border);
  border-radius: 6px;
  background: var(--analytics-surface);
  color: var(--analytics-ink);
  font: inherit;
  cursor: pointer;
}

.analytics-settings {
  display: block;
  margin: 16px auto;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid currentColor;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.analytics-consent__button:focus-visible,
.analytics-settings:focus-visible {
  outline: 3px solid #07846f;
  outline-offset: 3px;
}

.demo-ribbon .analytics-settings {
  flex-shrink: 0;
  margin: 0;
}

/* スマホで1280pxの管理デモを縮小表示しても同意ボタンは読める大きさに保つ。 */
.demo-admin--pc-preview .analytics-consent {
  box-sizing: border-box;
  inset: auto 5vw 14vw;
  max-width: none;
  padding: 4vw;
  font-size: 4vw;
}

.demo-admin--pc-preview .analytics-consent__button {
  min-height: 12vw;
}
