.consent-card {
  max-width: 680px;
  margin: 24px auto;
  padding: 24px;
}

.account-polish .consent-card--compact {
  grid-column: auto;
  display: block;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 2px 0 0;
  padding: 12px 14px;
  border: 1px solid #dce7f0;
  border-radius: 14px;
  background: #f7fafc;
}

.account-polish .consent-card--compact > h3 {
  display: none;
}

.account-polish .consent-card--compact .consent-status-row {
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: calc(var(--app-text-scale, 1) * 14px);
}

.account-polish .consent-card--compact .consent-note {
  margin: 6px 0 0;
}

.account-polish .consent-card--compact .consent-confirmation {
  width: 100%;
  box-sizing: border-box;
}

.consent-card > h2,
.consent-card > h3 {
  margin: 0 0 12px;
  color: #17324f;
  font-size: clamp(22px, 5vw, 27px);
  line-height: 1.2;
}

.consent-card .consent-intro,
.consent-card .consent-policy p,
.consent-card > p {
  line-height: 1.55;
}

.consent-policy {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dce7f0;
  border-radius: 14px;
  background: #f7fafc;
}

.consent-policy p:first-child { margin-top: 0; }
.consent-policy .hint { margin-bottom: 0; }

.consent-card .consent-privacy-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #9bbbd1;
  border-radius: 10px;
  background: #fff;
  color: #155a86;
  font-weight: 650;
  text-underline-offset: 3px;
}

.consent-card .consent-privacy-link:focus-visible,
.consent-card button:focus-visible {
  outline: 3px solid #1687bd;
  outline-offset: 3px;
}

.consent-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #dce7f0;
  border-radius: 14px;
  background: #fff;
  color: #17324f;
  font-weight: 650;
}

.consent-switch {
  display: inline-flex;
  width: 54px;
  min-width: 54px;
  min-height: 44px;
  align-items: center;
  justify-content: flex-start;
  padding: 5px;
  border: 1px solid #a9c5d9;
  border-radius: 999px;
  background: #eaf2f8;
  color: #315d7a;
  cursor: pointer;
  font: inherit;
}

.consent-switch-state { display: none; }

.consent-switch-track {
  position: relative;
  display: block;
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  border-radius: 999px;
  background: #a9bdcc;
}

.consent-switch-track i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #14253655;
  transition: transform .16s ease;
}

.consent-switch.is-enabled { background: #e4f1fb; }
.consent-switch.is-enabled .consent-switch-track { background: #3b80ae; }
.consent-switch.is-enabled .consent-switch-track i { transform: translateX(18px); }
.consent-switch.is-disabled .consent-switch-track { background: #a9bdcc; }
.consent-switch:focus-visible { outline: 3px solid #1687bd; outline-offset: 3px; }
.consent-expired-action {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #a93535;
  border-radius: 10px;
  background: #fff0f0;
  color: #8b2525;
  font: inherit;
  cursor: pointer;
}

.consent-confirmation {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #9bbbd1;
  border-radius: 14px;
  background: #f5faff;
  scroll-margin-block: 16px;
}

.consent-confirmation--withdraw {
  border-color: #d59a9a;
  background: #fff7f7;
}

.consent-confirmation h3,
.consent-confirmation h4 {
  margin: 0 0 8px;
  color: #17324f;
  font-size: calc(var(--app-text-scale, 1) * 18px);
}

.consent-confirmation p { line-height: 1.55; }
.consent-confirmation form { display: grid; gap: 12px; }
.consent-confirmation .checkbox { font-size: calc(var(--app-text-scale, 1) * 15px); line-height: 1.5; }
.consent-confirmation form button { min-height: 46px; }
.consent-confirmation .consent-danger { background: #a52c2c; border-color: #8c2525; color: #fff; }
.consent-bypass { margin-top: 12px; min-height: 44px; }
.consent-recorded,.consent-note { font-size: calc(var(--app-text-scale, 1) * 13px); color: #536b7c; }

@media (max-width: 600px) {
  .consent-card { padding: 20px 16px; }
  .consent-status-row { padding: 12px; }
  .consent-switch { width: 54px; min-width: 54px; }
  .consent-confirmation { padding: 16px; max-height: min(70dvh, 560px); overflow: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .consent-switch-track i { transition: none; }
}

/* Entry consent is one readable flow, with no expanding panel or nested scroll. */
.consent-entry{text-align:center;width:min(100%,540px);box-sizing:border-box;margin:12px auto;padding:20px}
.consent-entry>h2{text-align:center;border-radius:28px;background:#edf5fb;padding:12px;font-size:calc(var(--app-text-scale, 1) * 24px)}
.consent-entry>p{margin:12px 0;font-size:calc(var(--app-text-scale, 1) * 15px);line-height:1.45}
.consent-entry .consent-note{font-size:calc(var(--app-text-scale, 1) * 13px)}
.consent-entry form{display:grid;gap:12px;margin-top:16px}
.consent-entry .consent-entry-choice{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid #b8d7eb;border-radius:16px;background:#edf7fe;font-size:calc(var(--app-text-scale, 1) * 15px);line-height:1.45;cursor:pointer}
.consent-entry-choice input{flex:0 0 22px;width:22px;height:22px;margin:0;accent-color:#1678ba}
.consent-entry form>.primary,.consent-entry>.consent-bypass{width:100%;min-height:48px;margin:0}
.consent-entry>.consent-bypass{margin-top:10px}
.consent-submit-status{margin:0;color:#315d7a;font-size:calc(var(--app-text-scale, 1) * 14px)}.consent-submit-status:empty{display:none}

.consent-entry-choice span{flex:1;text-align:center}
.consent-entry form>.consent-privacy-link{justify-self:center;text-align:center}

.consent-entry form>.consent-privacy-link{font-size:calc(var(--app-text-scale, 1) * 13px);font-weight:400;padding:7px 12px;min-height:36px;background:#f4f7fa;border:1px solid #e1e8ee;box-shadow:none;border-radius:12px}
.consent-required-mark{display:inline-flex;align-items:center;justify-content:center;flex:0 0 20px;height:20px;border:1.5px solid #b23d50;border-radius:50%;color:#b23d50;font-size:calc(var(--app-text-scale, 1) * 14px);font-style:normal;font-weight:700}
.consent-entry-choice:has(input:checked) .consent-required-mark{visibility:hidden}
.consent-settings-info{grid-column:1/-1;margin:8px 0 0;font-size:calc(var(--app-text-scale, 1) * 13px);line-height:1.45;text-align:center}
.consent-card--compact [data-consent-status]{grid-column:1/-1;margin:0;text-align:center;font-size:calc(var(--app-text-scale, 1) * 13px)}
.consent-card--compact [data-consent-status]:empty{display:none}

.consent-entry-declaration{margin:0;padding:14px;background:#edf7fe;border:1px solid #b8d7eb;border-radius:16px;font-size:calc(var(--app-text-scale, 1) * 15px);line-height:1.45;text-align:center}
