.protection-dialog {
  width: min(34rem, calc(100% - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  margin: auto;
  padding: clamp(1rem, 3vw, 1.8rem);
  border: 1px solid #ad8770;
  border-radius: 18px;
  color: #fbefe2;
  background: #2d2327;
  box-shadow: 0 24px 80px #130b10b0;
}

.protection-dialog::backdrop { background: #150e13d6; }

.protection-dialog h2 {
  margin: 0 3rem .25rem 0;
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  line-height: 1.12;
}

.protection-dialog form {
  position: absolute;
  inset: .55rem .55rem auto auto;
  margin: 0;
}

.protection-close {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #907067;
  border-radius: 10px;
  background: #3a2c33;
  color: #ffe8d1;
  font: 600 1.25rem/1 var(--sans);
  cursor: pointer;
}

.protection-dialog .protection-project, .protection-dialog .protection-note {
  margin: .4rem 0;
  color: #e3cfc7;
  font-size: .85rem;
}

.protection-choices {
  display: grid;
  gap: .55rem;
  margin: .9rem 0;
}

.protection-choice {
  display: grid;
  gap: .3rem;
  min-height: 44px;
  padding: .65rem .8rem;
  border: 1px solid #896863;
  border-radius: 11px;
  background: #392b31;
  color: #fff0e2;
  text-decoration: none;
  touch-action: manipulation;
}

.protection-choice:hover, .protection-choice:focus-visible {
  border-color: #f3cda8;
  background: #4b363d;
  text-decoration: none;
}

.protection-choice-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .1rem .65rem;
}

.protection-choice-head > span, .protection-total {
  color: #ffdbb4;
  font-size: .86rem;
  font-weight: 750;
}

.protection-description { color: #ead7cb; font-size: .84rem; line-height: 1.38; }

.inquiry-protection {
  padding: .8rem .9rem;
  border: 1px solid #895f57;
  border-radius: 12px;
  background: #291f24;
}

.inquiry-protection[hidden] { display: none; }
.inquiry-protection label { margin: 0; }
.inquiry-protection output { display: block; margin-top: .5rem; font-size: .9rem; color: #ffdbb4; }

/* The same labels and totals remain visible without relying on the tier colors. */
.protection-dialog { border-color: #a68ca4; background: linear-gradient(145deg, #292332, #211b28 80%); }
.protection-choice {
  --tier-tint: #313e38;
  --tier-base: #252c2b;
  --tier-accent: #b5dbca;
  border-color: color-mix(in srgb, var(--tier-accent) 45%, var(--tier-base));
  border-inline-start: 4px solid var(--tier-accent);
  background: linear-gradient(120deg, var(--tier-tint), var(--tier-base));
  box-shadow: 0 5px 12px #130e1770;
}
.protection-choice[data-protection-tier="plus"] {
  --tier-tint: #293c50;
  --tier-base: #232b3b;
  --tier-accent: #b9d9fe;
}
.protection-choice[data-protection-tier="premium"] {
  --tier-tint: #47333e;
  --tier-base: #322532;
  --tier-accent: #f4cba1;
}
.protection-choice:hover, .protection-choice:focus-visible {
  border-color: var(--tier-accent);
  background: var(--tier-tint);
}
.protection-choice-head > span, .protection-total { color: var(--tier-accent); }
.protection-choice-head > span {
  padding: .1rem .4rem;
  border: 1px solid currentColor;
  border-radius: 6px;
  white-space: nowrap;
}
.protection-choice:focus-visible,
.protection-close:focus-visible { outline: 2px solid #f9debb; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .protection-choice { transition: border-color .15s ease, transform .15s ease; }
  .protection-choice:active { transform: scale(.985); }
}
