/* Residential collection control owner: Office contract 20261013-controls-v4
   with residential/office alignment supplement R-15 for form controls.
   Generic app/floorplan styles remain fallbacks for other consumers. This adapter
   owns material, states and control geometry here; page CSS owns placement.
   Excludes the liji workbench and APP pages. Result controls have their own screen adapter.
   Baseline and supplements: docs/office/residential-controls-alignment-20261014.md. */
#reportFormApp,
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp,
:is(body:has(#reportFormApp), body.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"])) .floorplan-room-picker,
body:has(#reportFormApp) #birthDatePicker {
  --residential-face: #fff;
  --residential-edge: #d8e9e7;
  --residential-base: #cee5df;
  --residential-ink: #20383b;
  --residential-depth: 3px;
  --residential-radius: 16px;
  --residential-field-height: 44px;
  --residential-pressed-face: #c3edf5;
  --residential-pressed-edge: #7dc4d3;
  --residential-pressed-base: #65b8c8;
  --residential-pressed-ink: #065d69;
  --residential-form-radius: 12px;
  --residential-form-edge: #d8e9e7;
  --residential-form-selected-face: #e7f5f5;
  --residential-form-selected-edge: #87bdc5;
  --residential-form-selected-ink: #065d69;
}

#reportFormApp :is(.page-form .button, .modal .button, .submit-dock .button, .collection-dialog-alternative, .resident-add, [data-entitlement-retry], [data-entitlement-membership-action], .segment-item, .additional-choice-grid button, .additional-floor-slider-button, .space-modal-grid button, .floorplan-upload-edit-icon-tool, .floorplan-upload-edit-slider-button):is(*, :hover, :focus-visible, :active, :disabled),
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp :is(.floorplan-final-actions .button, .floorplan-sector-add-menu button, .floorplan-zone-direction-menu button):is(*, :hover, :focus-visible, :active, :disabled),
:is(body:has(#reportFormApp), body.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"])) .floorplan-room-picker button:is(*, :hover, :focus-visible, :active, :disabled),
body:has(#reportFormApp) #birthDatePicker button:is(*, :hover, :focus-visible, :active, :disabled) {
  appearance: none;
  box-sizing: border-box;
  outline: none;
  text-decoration: none;
  border: 1px solid var(--residential-edge);
  border-radius: var(--residential-radius);
  background: var(--residential-face);
  color: var(--residential-ink);
  box-shadow: 0 var(--residential-depth) 0 -1px var(--residential-base),
              0 var(--residential-depth) 0 var(--residential-edge);
  transform: none;
  filter: none;
  opacity: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease, border-color 120ms ease,
              box-shadow 120ms ease, color 120ms ease;
}

/* R-08: one direct-entry card, one focus target. Layout lives in method-entry.css.
   The remembered school is not a persistent selected field on this entry page. */
#reportFormApp #pageMethod .method-card:is(*, :hover, :focus-visible, :active, .is-selected) {
  appearance: none;
  box-sizing: border-box;
  border: 1px solid var(--residential-edge);
  border-radius: 16px;
  background: var(--residential-face);
  color: var(--residential-ink);
  box-shadow: 0 3px 0 -1px var(--residential-base), 0 3px 0 var(--residential-edge);
  transform: none;
  filter: none;
  outline: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
#reportFormApp #pageMethod .method-card:active {
  --residential-face: var(--residential-pressed-face);
  --residential-edge: var(--residential-pressed-edge);
  --residential-base: var(--residential-pressed-base);
  --residential-ink: var(--residential-pressed-ink);
}
#reportFormApp #pageMethod .method-card:focus-visible :is(h3, .method-entry-hint) {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
@media (prefers-reduced-motion: reduce) {
  #reportFormApp #pageMethod .method-card { transition: none; }
}

/* R-15: a direction picker is a value field, like the birth-date input. Its
   full-row mobile hit target stays transparent around one compact flat face. */
#reportFormApp :is(.additional-direction-trigger, .spatial-field-action-pill) {
  --residential-radius: var(--residential-form-radius);
  --residential-depth: 0px;
  --residential-face: #fff;
  --residential-edge: var(--residential-form-edge);
  --residential-ink: #20383b;
  outline: none;
  color: var(--residential-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0;
  transform: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 1024px) {
  #reportFormApp :is(.additional-direction-trigger, .spatial-field-action-pill) {
    appearance: none;
    box-sizing: border-box;
    min-height: var(--residential-field-height);
    height: var(--residential-field-height);
    min-width: 128px;
    width: 128px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--residential-edge);
    border-radius: var(--residential-radius);
    background: var(--residential-face);
    box-shadow: none;
    cursor: pointer;
  }
}
@media (width < 1024px) {
  #reportFormApp :is(.additional-direction-trigger, .spatial-field-action-pill)::before {
    box-sizing: border-box;
    border: 1px solid var(--residential-edge);
    border-radius: var(--residential-radius);
    background: var(--residential-face);
    box-shadow: none;
  }
}

/* Step2 fields keep the same face on hover; the border signals editability. */
@media (hover: hover) {
  #reportFormApp .spatial-field-action-pill:hover:not(:disabled) {
    --residential-edge: var(--residential-form-selected-edge);
  }
}
/* Form fields stay neutral after a value is entered. Persistent selection is
   reserved for mutually exclusive options, never for a filled field. */
#reportFormApp .page-form[data-current-step="spaces-structure"] .birth-date-control {
  border: 1px solid var(--residential-form-edge);
  border-radius: var(--residential-form-radius);
  background: #fff;
  box-shadow: none;
}
#reportFormApp .page-form[data-current-step="spaces-structure"] .birth-date-control:focus-within {
  border-color: var(--residential-form-selected-edge);
  box-shadow: 0 0 0 2px rgb(7 111 127 / .14);
}
#reportFormApp .page-form[data-current-step="spaces-structure"] .birth-date-label.has-error .birth-date-control {
  border-color: #b95d53;
}

/* Form options and Step1 placement-menu options share flat faces. Only the chosen
   option carries the soft accent; unchosen icons do not claim attention. */
#reportFormApp .page-form[data-current-step="spaces-structure"] .segment-item,
#reportFormApp .page-form[data-current-step="advanced"] .additional-choice-grid button,
#reportFormApp #spaceDirectionModal .space-modal-grid button,
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp :is(.floorplan-sector-add-menu button, .floorplan-zone-direction-menu button),
:is(body:has(#reportFormApp), body.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"])) .floorplan-room-picker .floorplan-room-picker-directions button {
  --residential-radius: var(--residential-form-radius);
  --residential-depth: 0px;
  --residential-face: #fff;
  --residential-edge: var(--residential-form-edge);
  --residential-ink: #20383b;
  border-radius: var(--residential-form-radius);
  border: 1px solid var(--residential-edge);
  background: var(--residential-face);
  color: var(--residential-ink);
  box-shadow: none;
}
#reportFormApp .page-form[data-current-step="spaces-structure"] .segment-item.is-selected,
#reportFormApp .page-form[data-current-step="advanced"] .additional-choice-grid button.is-selected,
#reportFormApp #spaceDirectionModal .space-modal-grid button.is-selected,
:is(body:has(#reportFormApp), body.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"])) .floorplan-room-picker .floorplan-room-picker-directions button.is-selected {
  --residential-face: var(--residential-form-selected-face);
  --residential-edge: var(--residential-form-selected-edge);
  --residential-ink: var(--residential-form-selected-ink);
}
#reportFormApp .page-form[data-current-step="advanced"] .additional-choice-grid button i {
  border-radius: 6px;
  background: transparent;
  color: #076f7f;
}
#reportFormApp .page-form[data-current-step="advanced"] .additional-choice-grid button.is-selected i {
  background: #076f7f;
  color: #fff;
}

/* Geometry belongs to component type, not primary/secondary intent. */
#reportFormApp :is(.page-form .button, .modal .button, .submit-dock .button, .collection-dialog-alternative, [data-entitlement-retry], [data-entitlement-membership-action]):not(:where(.floorplan-upload-edit-icon-tool)),
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp .floorplan-final-actions .button {
  --residential-radius: 999px;
  --residential-depth: 4px;
  min-height: 48px;
  height: auto;
  padding: 10px 20px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0;
}

/* Adding a resident is a local secondary action, not another flow CTA. */
#reportFormApp .page-form[data-current-step="spaces-structure"] .resident-add {
  --residential-radius: var(--residential-form-radius);
  --residential-depth: 0px;
  --residential-face: #fff;
  --residential-edge: var(--residential-form-edge);
  --residential-ink: #076f7f;
  min-height: 48px;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  border: 1px solid var(--residential-edge);
  border-radius: var(--residential-form-radius);
  background: var(--residential-face);
  color: var(--residential-ink);
  box-shadow: none;
}

#reportFormApp :is(.segment-item, .additional-choice-grid button, .space-modal-grid button),
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp :is(.floorplan-sector-add-menu button, .floorplan-zone-direction-menu button),
:is(body:has(#reportFormApp), body.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"])) .floorplan-room-picker button {
  min-height: 44px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

/* Image edits are local tools; the confirmation below remains the primary CTA. */
#reportFormApp .page-form[data-current-step="floorplan"] .floorplan-upload-edit-tools :is(.floorplan-upload-edit-icon-tool, .floorplan-tool-grid .button, .floorplan-upload-edit-slider-button) {
  --residential-radius: var(--residential-form-radius);
  --residential-depth: 0px;
}
#reportFormApp .page-form[data-current-step="floorplan"] .floorplan-upload-edit-tools .floorplan-tool-grid .button {
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
}

#reportFormApp :is(.additional-floor-slider-button, .floorplan-upload-edit-slider-button),
#reportFormApp .space-direction-modal .space-modal-close,
:is(body:has(#reportFormApp), body.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"])) .floorplan-room-picker .floorplan-room-picker-close {
  --residential-radius: 16px;
  --residential-depth: 2px;
  --residential-ink: #587174;
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
}

/* Floor controls share the flat form radius; the range remains a range. */
#reportFormApp .page-form[data-current-step="advanced"] .additional-floor-slider-button {
  --residential-radius: var(--residential-form-radius);
  --residential-depth: 0px;
  --residential-face: #fff;
  --residential-edge: var(--residential-form-edge);
  border: 1px solid var(--residential-edge);
  border-radius: var(--residential-form-radius);
  background: var(--residential-face);
  box-shadow: none;
}

/* R-05: room-list add/remove are inline tools, with a 44px target but no
   raised face. Keep flow, field and standalone close/stepper materials above. */
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp :is(.floorplan-zone-card-add, .floorplan-zone-list-remove):is(*, :hover, :focus-visible, :active, :disabled) {
  appearance: none;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  color: var(--residential-inline-ink, #076f7f);
  opacity: 1;
  transform: none;
  filter: none;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp .floorplan-zone-list-remove { --residential-inline-ink: #587174; }
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp .floorplan-zone-card-add:active:not(:disabled) { --residential-inline-ink: #065d69; }
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp .floorplan-zone-list-remove:active:not(:disabled) { --residential-inline-ink: #8c2f28; }
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp :is(.floorplan-zone-card-add, .floorplan-zone-list-remove):disabled { --residential-inline-ink: #717b77; cursor: not-allowed; }
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp :is(.floorplan-zone-card-add, .floorplan-zone-list-remove):focus-visible .collection-icon { stroke-width: 3; color: currentColor; }

#reportFormApp .floorplan-upload-edit-slider-row {
  height: auto;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  padding: 0;
}

/* R-15 date choices are local form options, not raised flow actions. The
   calendar keeps its existing grid geometry and solar/lunar behavior. */
body:has(#reportFormApp) #birthDatePicker button {
  --residential-radius: var(--residential-form-radius);
  --residential-depth: 0px;
  min-height: 38px;
  padding: 4px;
  font-size: 13px;
  line-height: 20px;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0;
}

body:has(#reportFormApp) #birthDatePicker button:is(*, :hover, :focus-visible, :active, :disabled) {
  box-shadow: none;
}

body:has(#reportFormApp) #birthDatePicker .date-picker-foot button {
  --residential-radius: var(--residential-form-radius);
  --residential-depth: 0px;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 14px;
}

body:has(#reportFormApp) #birthDatePicker .date-picker-foot,
#reportFormApp .modal .modal-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  grid-template-columns: none;
  gap: 12px;
  padding-bottom: 6px;
}

#reportFormApp .modal .modal-actions .button {
  width: 100%;
  min-width: 0;
  white-space: normal;
}

/* Intent only assigns material. Existing destructive entries stay white. */
#reportFormApp :is(.page-form .button.primary, .modal .button.primary, .submit-dock .button.primary, [data-entitlement-membership-action]),
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp .floorplan-final-actions .button.primary {
  --residential-face: #076f7f;
  --residential-edge: #065d69;
  --residential-base: #065d69;
  --residential-ink: #fff;
  --residential-pressed-face: #075a66;
  --residential-pressed-edge: #04454e;
  --residential-pressed-base: #04454e;
  --residential-pressed-ink: #fff;
}

#reportFormApp :is(.button.secondary.danger, .resident-delete) {
  --residential-ink: #8c2f28;
}

#reportFormApp [data-tone="danger"] .button.primary {
  --residential-face: #8c2f28;
  --residential-edge: #68231e;
  --residential-base: #68231e;
  --residential-ink: #fff;
  --residential-pressed-face: #762921;
  --residential-pressed-edge: #551b17;
  --residential-pressed-base: #551b17;
  --residential-pressed-ink: #fff;
}

/* Entitlement explanation is a clickable action, not a selected field. */
#reportFormApp .button.primary.is-entitlement-blocked {
  --residential-face: #edf8f5;
  --residential-edge: #076f7f;
  --residential-base: #a9cfc5;
  --residential-ink: #065d69;
}

body:has(#reportFormApp) #birthDatePicker button.is-selected {
  --residential-face: var(--residential-form-selected-face);
  --residential-edge: var(--residential-form-selected-edge);
  --residential-ink: var(--residential-form-selected-ink);
}

#reportFormApp :is(.page-form .button, .modal .button, .submit-dock .button, .collection-dialog-alternative, .resident-add, [data-entitlement-retry], [data-entitlement-membership-action], .segment-item, .additional-choice-grid button, .additional-direction-trigger, .spatial-field-action-pill, .additional-floor-slider-button, .space-modal-grid button, .floorplan-upload-edit-icon-tool, .floorplan-upload-edit-slider-button):active:not(:disabled, [aria-disabled="true"], .is-disabled, :has(input:disabled)),
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp :is(.floorplan-final-actions .button, .floorplan-sector-add-menu button, .floorplan-zone-direction-menu button):active:not(:disabled, [aria-disabled="true"], .is-disabled, :has(input:disabled)),
:is(body:has(#reportFormApp), body.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"])) .floorplan-room-picker button:active:not(:disabled, [aria-disabled="true"], .is-disabled, :has(input:disabled)),
body:has(#reportFormApp) #birthDatePicker button:active:not(:disabled, [aria-disabled="true"], .is-disabled, :has(input:disabled)) {
  --residential-face: var(--residential-pressed-face);
  --residential-edge: var(--residential-pressed-edge);
  --residential-base: var(--residential-pressed-base);
  --residential-ink: var(--residential-pressed-ink);
}

#reportFormApp :is(.page-form .button, .modal .button, .submit-dock .button, .collection-dialog-alternative, .resident-add, [data-entitlement-retry], [data-entitlement-membership-action], .segment-item, .additional-choice-grid button, .additional-direction-trigger, .spatial-field-action-pill, .additional-floor-slider-button, .space-modal-grid button, .floorplan-upload-edit-icon-tool, .floorplan-upload-edit-slider-button):is(:disabled, [aria-disabled="true"], .is-disabled, :has(input:disabled)),
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp :is(.floorplan-final-actions .button, .floorplan-sector-add-menu button, .floorplan-zone-direction-menu button):is(:disabled, [aria-disabled="true"], .is-disabled, :has(input:disabled)),
:is(body:has(#reportFormApp), body.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"])) .floorplan-room-picker button:is(:disabled, [aria-disabled="true"], .is-disabled, :has(input:disabled)),
body:has(#reportFormApp) #birthDatePicker button:is(:disabled, [aria-disabled="true"], .is-disabled, :has(input:disabled)) {
  --residential-face: #e6eae8;
  --residential-edge: #c1c9c5;
  --residential-base: #c7cecb;
  --residential-ink: #717b77;
  cursor: not-allowed;
}

#reportFormApp :is(.page-form .button, .modal .button, .submit-dock .button, .collection-dialog-alternative, .resident-add, [data-entitlement-retry], [data-entitlement-membership-action], .segment-item, .additional-choice-grid button, .additional-direction-trigger, .spatial-field-action-pill, .additional-floor-slider-button, .space-modal-grid button, .floorplan-upload-edit-icon-tool, .floorplan-upload-edit-slider-button):focus-visible,
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp :is(.floorplan-final-actions .button, .floorplan-sector-add-menu button, .floorplan-zone-direction-menu button):focus-visible,
:is(body:has(#reportFormApp), body.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"])) .floorplan-room-picker button:focus-visible,
body:has(#reportFormApp) #birthDatePicker button:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

/* R-15 form focus follows the visible field/choice face, not its text. */
#reportFormApp .page-form[data-current-step="spaces-structure"] :is(.segment-item, .resident-add):focus-visible,
#reportFormApp .page-form[data-current-step="advanced"] :is(.additional-choice-grid button, .additional-floor-slider-button):focus-visible,
#reportFormApp .floorplan-upload-edit-tools :is(button, [role="button"]):focus-visible,
#reportFormApp #spaceDirectionModal .space-modal-grid button:focus-visible,
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp :is(.floorplan-sector-add-menu button, .floorplan-zone-direction-menu button):focus-visible,
:is(body:has(#reportFormApp), body.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"])) .floorplan-room-picker .floorplan-room-picker-directions button:focus-visible,
#reportFormApp :is(.additional-direction-trigger, .spatial-field-action-pill):focus-visible,
body:has(#reportFormApp) #birthDatePicker button:focus-visible {
  outline: 2px solid #4e9eaa;
  outline-offset: 2px;
  text-decoration: none;
}
@media (width < 1024px) {
  #reportFormApp :is(.additional-direction-trigger, .spatial-field-action-pill):focus-visible {
    outline: none;
  }
  #reportFormApp :is(.additional-direction-trigger, .spatial-field-action-pill):focus-visible::before {
    box-shadow: 0 0 0 2px #4e9eaa;
  }
}

#reportFormApp :is(.page-form .button, .modal .button, .submit-dock .button, .collection-dialog-alternative, .resident-add, [data-entitlement-retry], [data-entitlement-membership-action], .segment-item, .additional-choice-grid button, .additional-direction-trigger, .spatial-field-action-pill, .additional-floor-slider-button, .space-modal-grid button, .floorplan-upload-edit-icon-tool, .floorplan-upload-edit-slider-button):is(:disabled, [aria-disabled="true"], .is-disabled) .collection-icon,
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp :is(.floorplan-final-actions .button, .floorplan-sector-add-menu button, .floorplan-zone-direction-menu button):is(:disabled, [aria-disabled="true"], .is-disabled) .collection-icon,
:is(body:has(#reportFormApp), body.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"])) .floorplan-room-picker button:is(:disabled, [aria-disabled="true"], .is-disabled) .collection-icon,
body:has(#reportFormApp) #birthDatePicker button:is(:disabled, [aria-disabled="true"], .is-disabled) .collection-icon {
  color: inherit;
}

#reportFormApp :is(.page-form .button, .modal .button, .submit-dock .button, .collection-dialog-alternative, .resident-add, [data-entitlement-retry], [data-entitlement-membership-action], .segment-item, .additional-choice-grid button, .additional-direction-trigger, .spatial-field-action-pill, .additional-floor-slider-button, .space-modal-grid button, .floorplan-upload-edit-icon-tool, .floorplan-upload-edit-slider-button):is(:disabled, [aria-disabled="true"], .is-disabled) img,
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp :is(.floorplan-final-actions .button, .floorplan-sector-add-menu button, .floorplan-zone-direction-menu button):is(:disabled, [aria-disabled="true"], .is-disabled) img,
:is(body:has(#reportFormApp), body.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"])) .floorplan-room-picker button:is(:disabled, [aria-disabled="true"], .is-disabled) img,
body:has(#reportFormApp) #birthDatePicker button:is(:disabled, [aria-disabled="true"], .is-disabled) img {
  filter: grayscale(1);
  opacity: .6;
}

#reportFormApp .floorplan-entry-card:has(.floorplan-entry-action[aria-disabled="true"]) .floorplan-entry-art {
  filter: grayscale(1);
  opacity: .6;
}

#reportFormApp :is(.floorplan-upload-edit-icon-tool, .floorplan-upload-edit-slider-button, .additional-floor-slider-button, .space-modal-close):focus-visible .collection-icon,
:is(body:has(#reportFormApp), body.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"])) .floorplan-room-picker-close:focus-visible .collection-icon {
  stroke-width: 3;
  color: currentColor;
}

/* R-10: all residential direction pickers share one dialog shell.
   The placement board and the residential ruler remain their owning,
   semantically distinct compass artwork. */
#reportFormApp #spaceDirectionModal {
  background: rgb(0 0 0 / .24);
}
#reportFormApp #spaceDirectionModal .modal-card,
body:has(#reportFormApp) .floorplan-room-picker {
  box-sizing: border-box;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 20px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #dce7e4;
  border-radius: 20px;
  background: #fff;
  color: #20383b;
  box-shadow: 0 24px 70px rgb(18 34 32 / .24);
  font-family: "YuanChu Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
#reportFormApp #spaceDirectionModal .modal-card {
  position: fixed;
  inset: auto;
  left: 50vw;
  top: 50dvh;
  transform: translate(-50%, -50%);
}
@media (min-width: 1024px) {
  /* Desktop recompose forces Noto Sans on in-page nodes; its body-level
     native dialog must use that same face. */
  body:has(#reportFormApp .recompose-root) .floorplan-room-picker {
    font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  }
}
#reportFormApp #spaceDirectionModal [data-space-modal-title],
body:has(#reportFormApp) .floorplan-room-picker h2 {
  margin: 0;
  font-size: 18px;
  line-height: 26px;
  font-weight: 700;
}
#reportFormApp #spaceDirectionModal [data-space-modal-copy],
body:has(#reportFormApp) .floorplan-room-picker-copy {
  margin: 8px 0 12px;
  color: #587174;
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
}
body:has(#reportFormApp) .floorplan-room-picker-head {
  align-items: flex-start;
  margin-bottom: 0;
}
body:has(#reportFormApp) .floorplan-room-picker-heading {
  min-width: 0;
  padding-right: 12px;
}
#reportFormApp #spaceDirectionModal .space-modal-grid,
body:has(#reportFormApp) .floorplan-room-picker-directions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
#reportFormApp #spaceDirectionModal .spatial-modal-ruler {
  position: relative;
  display: block;
  grid-column: 1 / -1;
  width: min(264px, 34dvh, 100%);
  aspect-ratio: 1;
  margin: 0 auto 4px;
}
#reportFormApp #spaceDirectionModal .spatial-modal-ruler img {
  display: block;
  width: 100%;
  height: 100%;
}
#reportFormApp #spaceDirectionModal .spatial-modal-ruler svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#reportFormApp #spaceDirectionModal .spatial-modal-highlight {
  pointer-events: none;
  fill: rgb(var(--collection-primary-rgb) / .18);
  stroke: rgb(var(--collection-primary-rgb) / .35);
  stroke-width: .5;
}
#reportFormApp #spaceDirectionModal .spatial-modal-hit {
  fill: transparent;
  cursor: pointer;
  pointer-events: all;
}
body:has(#reportFormApp) .floorplan-room-picker-board {
  width: min(264px, 34dvh, 100%);
}
#reportFormApp #spaceDirectionModal .space-modal-grid button,
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp :is(.floorplan-sector-add-menu button, .floorplan-zone-direction-menu button),
body:has(#reportFormApp) .floorplan-room-picker-directions button {
  min-height: 44px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

/* Feedback keeps the same semantic states and focus/positioning controller. */
#reportFormApp .modal .modal-card {
  border: 1px solid #dce7e4;
  border-radius: 20px;
  background: var(--app-surface);
  box-shadow: 0 24px 70px rgb(18 34 32 / .24);
}
#reportFormApp .space-direction-modal .space-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
}
#reportFormApp .space-direction-modal :is([data-space-modal-title], [data-space-modal-copy]) {
  padding-right: 44px;
}
#reportFormApp .modal .modal-card h2 { font-size: 18px; line-height: 1.4; font-weight: 700; }
#reportFormApp .toast { border-radius: 16px; border-color: var(--app-line); }
#reportFormApp .toast[data-tone="warn"],
#reportFormApp .toast.warn { color: #8c2f28; background: #fff1ee; border-color: #dfb9b3; }
#reportFormApp :is(.resident-error, .date-error, .recompose-field-error) { color: #8c2f28; }
#reportFormApp .recompose-invalid { outline-color: #8c2f28; }
#reportFormApp .floorplan-recognizing-card {
  border: 1px solid #dce7e4;
  border-radius: 20px;
  background: var(--app-surface);
  box-shadow: 0 24px 70px rgb(18 34 32 / .24);
}
#reportFormApp .floorplan-recognizing-steps li.is-active {
  background: var(--app-primary-soft);
  border-color: #a9cfc5;
  box-shadow: none;
}
#reportFormApp :is(.floorplan-recognizing-progress > span, .floorplan-recognizing-steps li.is-active > span) {
  background: var(--app-primary);
}
@media (prefers-reduced-motion: reduce) {
#reportFormApp :is(.page-form .button, .modal .button, .submit-dock .button, .collection-dialog-alternative, .resident-add, [data-entitlement-retry], [data-entitlement-membership-action], .segment-item, .additional-choice-grid button, .additional-direction-trigger, .spatial-field-action-pill, .additional-floor-slider-button, .space-modal-grid button, .floorplan-upload-edit-icon-tool, .floorplan-upload-edit-slider-button),
.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"]) #floorplanApp :is(.floorplan-final-actions .button, .floorplan-sector-add-menu button, .floorplan-zone-direction-menu button),
:is(body:has(#reportFormApp), body.floorplan-embedded-page:is([data-floorplan-mode="review"], [data-floorplan-mode="applied"])) .floorplan-room-picker button,
body:has(#reportFormApp) #birthDatePicker button {
  transition: none;
}

}

/* Step 3 member list: progressive disclosure without changing submitted slots. */
#reportFormApp .resident-page-card { position: relative; }
#reportFormApp .resident-required { position: absolute; right: 24px; top: 20px; }
#reportFormApp .resident-card-list:not(:has(.resident-card:not([hidden]))) { margin: 0; }
#reportFormApp .resident-card-list { display: grid; gap: 16px; margin-top: 16px; }
#reportFormApp .resident-card { display: flex; flex-direction: column; gap: 12px; min-height: 0; height: auto; padding: 16px 0; border: 0; border-top: 1px solid #d8e9e7; background: transparent; border-radius: 0; box-shadow: none; }
#reportFormApp .resident-card[hidden], #reportFormApp .resident-card [hidden], #reportFormApp .resident-add[hidden], #reportFormApp .residents-empty[hidden], #reportFormApp [data-owner-error][hidden] { display: none !important; }
#reportFormApp .resident-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#reportFormApp .resident-card-head strong { font-size: 14px; color: #20383b; }
/* Report form auxiliary action supplement R-02: local member removal has no
   commit step and does not compete with the flow CTA. Same rule is handed back
   to Office; destructive confirmation dialogs still use danger material. */
#reportFormApp .resident-text-action {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 8px;
  font: inherit; font-size: 14px; font-weight: 500; line-height: 20px;
  color: #587174; border: 0; background: transparent; box-shadow: none;
  border-radius: 0; outline: none; transform: none; cursor: pointer;
}
#reportFormApp .resident-text-action:active { color: #8c2f28; }
#reportFormApp .resident-text-action:focus-visible { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
#reportFormApp .resident-add { display: block; width: 100%; margin-top: 12px; font-family: inherit; }
#reportFormApp .residents-empty { color: #587174; font-size: 14px; line-height: 1.6; margin: 12px 0 0; }
#reportFormApp .resident-error { color: #8c2f28; font-size: 13px; line-height: 1.6; margin: 4px 0; }
@media (min-width: 1024px) {
  .page-form:not(.recompose-root):not(.recompose-scope)[data-current-step="spaces-structure"] .resident-page-card--others { height: auto; max-height: 360px; overflow-y: auto !important; }
}
