/* Only real public service popups. Homepage and catalogue cards are untouched. */
.service-dialog.dialog-character-surface {
  position:relative;
  isolation:isolate;
  background:#0a0c10!important;
  padding:0!important;
  display:flex;
  flex-direction:column;
  overflow:hidden!important;
  max-height:calc(var(--dialog-character-window-height,100dvh) - 50px)!important;
}
.service-dialog.dialog-character-surface>.service-panel {
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  max-height:inherit;
  padding:38px;
  background:transparent;
}
.service-overlay:has(>.service-dialog.dialog-character-surface) {
  top:var(--dialog-character-window-top,0px);
  bottom:auto;
  height:var(--dialog-character-window-height,100dvh);
  padding-block:25px!important;
  align-items:center;
  overflow:hidden;
}
.service-overlay[data-report-step]>.service-dialog>.service-panel,
.service-overlay[data-report-step]>.service-dialog.dialog-character-surface>.dialog-character-paper {
  display:block!important;
}
.service-overlay[data-report-step] .service-panel>:not(.report-sheet) {
  display:none!important;
}
.service-dialog .report-sheet {
  background:transparent!important;
}
.service-dialog .report-sheet:has(>.report-form) :is(
  .service-dialog-header h2, .service-description, .service-field>span:not([aria-hidden]),
  .report-image-choice, .report-help, .report-message, .report-purpose
) {
  width:fit-content;
  max-width:100%;
  background-color:#10141b;
  border-radius:3px;
  box-shadow:0 0 0 3px #10141b,0 0 9px 4px #10141b99;
}
.service-dialog .report-form .service-field:has(>input[type="file"]:disabled) {
  background-color:#10141b;
}
.interaction-nav-panel.dialog-character-surface,
.catalog-category-options.dialog-character-surface,
.menu-open #main-nav.dialog-character-surface {
  isolation:isolate;
  background:#0a0c10!important;
}
.menu-open #main-nav.dialog-character-surface .interaction-nav-panel {
  background:transparent!important;
}
.dialog-character-surface>.dialog-character-paper {
  position:absolute;
  inset:0 0 auto;
  height:var(--dialog-character-height,100%);
  transform:translateY(var(--dialog-character-scroll,0px));
  overflow:hidden;
  border-radius:inherit;
  z-index:-1;
  pointer-events:none!important;
  user-select:none;
}
.dialog-character-paper>canvas {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none!important;
}
/* Existing controls, result states, photos and QR backgrounds keep their own
   layers and positions. No generic child-position or foreground-color rules. */
@media(prefers-reduced-motion:reduce) {
  .service-dialog.dialog-character-surface {animation:none!important}
}
@media(max-width:600px) {
  .service-dialog.dialog-character-surface {
    max-height:calc(var(--dialog-character-window-height,100dvh) - 28px)!important;
  }
  .service-dialog.dialog-character-surface>.service-panel {padding:27px 23px}
  .service-overlay:has(>.service-dialog.dialog-character-surface) {padding-block:14px!important}
}
