.profile-body.hospital-body { overflow-x: clip; overflow-y: visible; }
.profile-body.hospital-body .my-app-shell { padding: 0 0 calc(42px + env(safe-area-inset-bottom)); overflow: clip; }
.profile-body.hospital-body .my-module-header { position: sticky; left: auto; transform: none; width: 100%; }
.profile-body.hospital-body .profile-shell { padding: 24px var(--app-shell-gutter) 0; }
#hospital-app { padding: 20px var(--app-shell-gutter) 28px; }
.hospital-heading { margin-bottom: 20px; }
.hospital-heading h1 { margin: 4px 0 8px; font-size: 26px; }
.hospital-heading p { margin: 0; color: var(--color-text-secondary); }
.hospital-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.hospital-filters button { min-height: 44px; border: 1px solid var(--color-border); border-radius: 24px; padding: 8px 18px; background: var(--color-surface); color: var(--color-text-primary); font: inherit; }
.hospital-filters button[aria-pressed="true"] { background: var(--color-text-primary); color: var(--color-surface); border-color: var(--color-text-primary); }
.hospital-workspace { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--color-border); border-radius: var(--radius-card); overflow: clip; background: var(--color-surface); }
.hospital-map-frame { min-height: clamp(260px, 46dvh, 380px); position: relative; background: var(--color-surface-soft); }
#hospital-map { position: absolute; inset: 0; isolation: isolate; }
.hospital-welcome { position: relative; z-index: 1; min-height: clamp(260px, 46dvh, 380px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 16px; background: var(--color-surface-soft); }
.hospital-welcome[hidden], [hidden] { display: none !important; }
.hospital-hero-icon { width: 64px; height: 64px; fill: none; stroke: var(--color-text-primary); stroke-width: 2; margin-bottom: 18px; }
.hospital-welcome h2 { font-size: 23px; margin: 0 0 12px; }
.hospital-welcome p { color: var(--color-text-secondary); margin: 0 0 24px; line-height: 1.8; }
.hospital-map-tools { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.hospital-map-tools button { pointer-events: auto; box-shadow: 0 2px 8px #0001; }
.hospital-results { padding: 16px; min-width: 0; }
.hospital-map-interaction { position: absolute; bottom: 78px; left: 12px; z-index: 2; }
.hospital-result-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hospital-result-heading h2 { margin: 0; font-size: 20px; }
.hospital-result-heading span, #hospital-status { font-size: 14px; color: var(--color-text-secondary); line-height: 1.6; }
.profile-body.hospital-body .hospital-list-item { width: 100%; text-align: left; padding: 16px 0; border: 0; border-top: 1px solid var(--color-border); background: transparent; color: var(--color-text-primary); font: inherit; display: grid; gap: 6px; }
.profile-body.hospital-body .hospital-list-item strong { font-size: 16px; line-height: 1.5; }
.profile-body.hospital-body .hospital-list-item span { color: var(--color-text-secondary); font-size: 13px; line-height: 1.6; }
.profile-body.hospital-body .hospital-list-item .hospital-evidence { color: var(--color-primary-strong); font-weight: 600; }
.profile-body.hospital-body .hospital-list-item[data-emphasis="weak"] strong { font-weight: 500; }
.hospital-recovery { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.hospital-disclaimer { color: var(--color-text-secondary); font-size: 12px; line-height: 1.75; margin-top: 18px; }
.hospital-disclaimer p { margin: 4px 0; }
.hospital-dialog { color: var(--color-text-primary); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); width: min(var(--app-shell-width), calc(100% - 32px)); max-height: 85dvh; padding: 24px; overflow-y: auto; overscroll-behavior: contain; box-shadow: var(--shadow-overlay); }
.hospital-dialog::backdrop { background: #2227; }
.hospital-dialog h2 { font-size: 23px; line-height: 1.5; margin: 0 24px 16px 0; }
.hospital-dialog p { line-height: 1.75; }
.hospital-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hospital-dialog-actions > button { flex: 1; }
.hospital-muted { color: var(--color-text-secondary); font-size: 13px; }
.profile-body.hospital-body .hospital-close { float: right; margin: -12px -12px 0 0; min-width: 44px; min-height: 44px; border: 0; background: transparent; color: inherit; font-size: 28px; }
.hospital-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin: 16px 0 24px; }
.hospital-stat { border-top: 1px solid var(--color-border); padding: 14px 0; display: grid; gap: 4px; }
.hospital-stat span { color: var(--color-text-secondary); font-size: 13px; }
.hospital-species-options { display: grid; gap: 10px; margin: 24px 0; }
.hospital-species-options label { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; border: 1px solid var(--color-border); border-radius: 16px; cursor: pointer; }
.hospital-species-options input { width: 22px; height: 22px; accent-color: var(--color-primary); }
.hospital-body button, .hospital-body a { touch-action: manipulation; }
.hospital-body button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hospital-body button:active { opacity: .75; }
.hospital-body button:disabled { cursor: wait; opacity: .6; }
.hospital-body :focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.doctor-hub-options { display: grid; gap: 16px; grid-template-columns: minmax(0,1fr); margin-top: 28px; }
.doctor-hub-option { color: var(--color-text-primary); text-decoration: none; border: 1px solid var(--color-border); padding: 28px; border-radius: 24px; background: var(--color-surface); }
.doctor-hub-option svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.doctor-hub-option p { color: var(--color-text-secondary); line-height: 1.8; }
.hospital-body .doctor-quiet-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); color: var(--color-text-secondary); font-size: 12px; }
.hospital-body .doctor-quiet-footer a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; }
@media (hover:hover) and (pointer:fine) { .profile-body.hospital-body .hospital-list-item:hover, .doctor-hub-option:hover { background: var(--color-surface-soft); } }
@media (max-width: 760px) {
  #hospital-app { padding-top: 16px; }
  .hospital-filters { gap: 6px; }
  .hospital-filters button { padding: 8px 13px; font-size: 14px; }
  .hospital-detail-sheet { margin: auto auto 0; width: min(100%, var(--app-shell-width)); max-width: var(--app-shell-width); border-radius: 24px 24px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); max-height: 78dvh; }
  .hospital-dialog { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .doctor-hub-options { grid-template-columns: 1fr; }
  .hospital-heading h1 { font-size: 26px; }
}

@media (any-pointer: coarse) {
  /* The SDK's drag mode is opt-in so a normal one-finger swipe can scroll the page. */
  #hospital-map:not([data-dragging="true"]), #hospital-map:not([data-dragging="true"]) * { touch-action: pan-y pinch-zoom !important; pointer-events: none !important; }
}

.profile-body.hospital-body .hospital-list-item { white-space: normal; border-radius: 0; box-shadow: none; }
.profile-body.hospital-body .hospital-close { color: var(--color-text-primary); background: transparent; padding: 0; }
.profile-body.hospital-body .secondary-button { color: var(--color-text-primary); background: var(--color-surface); border: 1px solid var(--color-border); }
.profile-body.hospital-body .hospital-dialog .main-button { white-space: normal; }
