.policy-gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: clamp(0.75rem, 3vw, 2rem);
  overflow: auto;
  background:
    radial-gradient(
      circle at 18% 10%,
      rgba(225, 29, 46, 0.13),
      transparent 34%
    ),
    radial-gradient(
      circle at 90% 84%,
      rgba(240, 91, 102, 0.11),
      transparent 34%
    ),
    rgba(3, 4, 3, 0.86);
  animation: policyBackdropIn 220ms ease-out both;
}
.policy-gate-backdrop[hidden] {
  display: none;
}
body:has(.policy-gate-backdrop:not([hidden])),
html:has(.policy-gate-backdrop:not([hidden])) {
  overflow: hidden;
}
.policy-locked-content {
  user-select: none;
}
body:has(.policy-gate-backdrop:not([hidden])) .ambient-bg *,
body:has(.policy-page-shell) .ambient-bg * {
  animation-play-state: paused !important;
}
.policy-glass-card {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: 100%;
  max-width: 720px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(225, 29, 46, 0.25);
  border-radius: 24px;
  padding: clamp(1.1rem, 3vw, 1.75rem);
  color: #f8f7f4;
  background: linear-gradient(145deg, #151515, #050505);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.26);
}
.policy-gate-card {
  max-height: calc(100dvh - clamp(1.5rem, 6vw, 4rem));
  overflow-y: auto;
  animation: policyCardIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  scrollbar-width: thin;
  scrollbar-color: rgba(225, 29, 46, 0.42) transparent;
}
.policy-glow {
  position: absolute;
  z-index: -1;
  top: -110px;
  left: 12%;
  width: 300px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(225, 29, 46, 0.18),
    rgba(225, 29, 46, 0.07) 42%,
    transparent 74%
  );
  pointer-events: none;
}
.policy-actions,
.policy-header,
.policy-heading,
.policy-meta-row {
  display: flex;
  align-items: center;
}
.policy-header {
  justify-content: space-between;
  gap: 1rem;
}
.policy-heading {
  gap: 0.9rem;
  min-width: 0;
}
.policy-shield {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(225, 29, 46, 0.35);
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #f05b66, #e11d2e);
  box-shadow: 0 10px 28px rgba(225, 29, 46, 0.22);
}
.policy-kicker {
  display: block;
  margin-bottom: 0.18rem;
  color: #f05b66;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.policy-glass-card h1 {
  margin: 0;
  color: #f8f7f4;
  font-size: clamp(1.25rem, 4vw, 1.8rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.policy-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #b6b3b6;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  transition: 160ms ease;
}
.policy-close:hover {
  border-color: rgba(225, 29, 46, 0.35);
  color: #ff7b83;
  background: rgba(225, 29, 46, 0.08);
}
.policy-intro {
  margin: 1rem 0 1.1rem;
  color: #9c9a9c;
  font-size: 0.93rem;
  line-height: 1.55;
}
.policy-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.policy-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 15px;
  background: #151515;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}
.policy-item:hover {
  border-color: rgba(225, 29, 46, 0.2);
  background: #211012;
}
.policy-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #f05b66;
  background: rgba(225, 29, 46, 0.1);
}
.policy-svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.policy-svg--discord path {
  fill: currentColor;
  stroke: none;
}
.policy-shield .policy-svg {
  width: 22px;
  height: 22px;
}
.policy-text span,
.policy-text strong {
  display: block;
}
.policy-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.policy-text strong {
  margin: 0.05rem 0 0.23rem;
  color: #f8f7f4;
  font-size: 0.86rem;
}
.policy-text span {
  color: #9c9a9c;
  font-size: 0.76rem;
  line-height: 1.45;
}
.policy-meta-row {
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0.9rem 0;
  color: #777579;
  font-size: 0.73rem;
}
.policy-meta-row a {
  color: #f05b66;
  text-decoration: none;
}
.policy-form {
  padding-top: 0.9rem;
  border-top: 1px solid rgba(225, 29, 46, 0.14);
}
.policy-agree {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 0.65rem;
  margin: 0;
  padding: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #b6b3b6;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  line-height: 1.5;
  cursor: pointer;
}
.policy-agree input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.policy-check {
  margin-top: 0.05rem;
}
.policy-agree:has(input:focus-visible) {
  outline: 2px solid rgba(225, 29, 46, 0.5);
  outline-offset: 2px;
}
.policy-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}
.policy-submit-feedback {
  margin: 0.75rem 0 0;
  color: #ff7b83;
  font-size: 0.84rem;
  line-height: 1.45;
}
.policy-actions-readonly {
  padding-top: 0.9rem;
  border-top: 1px solid rgba(225, 29, 46, 0.14);
}
.policy-page-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 220px);
  padding: 1rem 0 2rem;
}
@keyframes policyBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes policyCardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (max-width: 660px) {
  .policy-gate-backdrop {
    align-items: start;
  }
  .policy-glass-card {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    margin-inline: auto;
  }
  .policy-list {
    grid-template-columns: 1fr;
  }
  .policy-meta-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .policy-actions .button {
    flex: 1 1 auto;
    justify-content: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .policy-gate-backdrop,
  .policy-gate-card {
    animation: none;
  }
}

/* --- Complete notice document (rendered on /policy) ---
   Same card language as the overlay dialog above. */
.policy-doc-wrap {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
}
.policy-doc {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(225, 29, 46, 0.14);
}
.policy-doc-section {
  box-sizing: border-box;
  padding: clamp(1rem, 2.6vw, 1.4rem);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  background: linear-gradient(145deg, #151515, #0a0a0a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.policy-doc-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}
.policy-doc-index {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  padding-inline: 0.45rem;
  border: 1px solid rgba(225, 29, 46, 0.35);
  border-radius: 10px;
  color: #f05b66;
  background: rgba(225, 29, 46, 0.1);
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.policy-doc h2 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  color: #f4f5f7;
}
.policy-doc p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(244, 245, 247, 0.82);
}
.policy-doc ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(244, 245, 247, 0.82);
}
.policy-doc code {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.84rem;
  color: rgba(244, 245, 247, 0.9);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.08rem 0.35rem;
}
