/* Consent owns a native modal top-layer, outside the scaled game canvas. */
.consent-root:not([open]),
.consent-banner[hidden],
.consent-overlay[hidden] { display: none !important; }
.consent-root {
  position: fixed;
  inset: auto;
  left: var(--consent-viewport-left, 0px);
  top: var(--consent-viewport-top, 0px);
  width: var(--consent-viewport-width, 100vw);
  height: var(--consent-viewport-height, 100dvh);
  max-width: none;
  max-height: none;
  min-width: 0;
  min-height: 0;
  margin: 0;
  border: 0;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  box-sizing: border-box;
  overflow: hidden;
  background: transparent;
  color: var(--ui-text, #eee9dd);
  font-family: inherit;
  zoom: 1;
}
.consent-root[open] { display: grid; place-items: end center; }
.consent-root::backdrop { background: rgba(4, 6, 8, .62); }
.consent-banner,
.consent-dialog {
  color: var(--ui-text, #eee9dd);
  font-family: inherit;
  box-sizing: border-box;
  border: 1px solid var(--mg-border-muted, #626367);
  border-radius: 4px;
  background: var(--mg-surface-window, #1b1e22);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .62);
}
.consent-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
  width: min(860px, 100%);
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  touch-action: pan-y;
}
.consent-banner-copy { flex: 3 1 360px; min-width: 0; }
.consent-eyebrow {
  margin: 0 0 8px;
  color: var(--mg-brass, #c1b68f);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.consent-banner h2,
.consent-dialog h2,
.consent-card h3 { margin: 0; overflow-wrap: anywhere; }
.consent-banner h2,
.consent-dialog h2 { font-size: clamp(20px, 4vw, 25px); line-height: 1.25; }
.consent-banner p:not(.consent-eyebrow),
.consent-dialog-subtitle,
.consent-card p { margin: 8px 0 0; color: #c9c9c7; line-height: 1.5; overflow-wrap: anywhere; }
.consent-actions,
.consent-dialog-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 10px;
  min-width: 0;
}
.consent-actions { flex: 1 1 220px; }
.consent-button {
  min-width: 0;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 3px;
  border: 1px solid #676660;
  background: #30343a;
  color: #eee9dd;
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  touch-action: manipulation;
}
.consent-button:hover { background-color: #3b4148; border-color: #a0a096; }
.consent-button:focus-visible,
.consent-card input:focus-visible { outline: 2px solid #c7bb8c; outline-offset: 2px; }
.consent-button.primary { color: #f0e5c4; background-color: #3b3c39; border-color: #a59a76; }
.consent-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: inherit; box-sizing: border-box; }
.consent-backdrop { position: absolute; inset: 0; }
.consent-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 18px;
}
.consent-dialog-head { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 12px; align-items: start; flex: 0 1 auto; max-height: 45%; min-height: 44px; overflow-y: auto; }
.consent-close { width: 44px; height: 44px; padding: 0; }
.consent-options { display: grid; gap: 12px; margin: 16px 0; min-height: 60px; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
.consent-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid #505358; border-radius: 3px; background: rgba(255, 255, 255, .025); }
.consent-card.toggle { cursor: pointer; }
.consent-pill { padding: 6px 8px; border-radius: 3px; border: 1px solid #787666; color: #d9d2b3; font-size: .75rem; font-weight: 700; }
.consent-card input { width: 44px; height: 30px; margin: 0; accent-color: #a79a72; cursor: pointer; }
.consent-dialog-actions { flex: 0 0 auto; }
body.consent-modal-open { overflow: hidden; }
