/* HTNS v302 r87 production-baseline alignment hardening.
   Safe, structural rules only: no application logic and no feature hiding. */
#mainApp,#mainApp *,#modal,#modal *{box-sizing:border-box;}
#mainApp main{overflow-x:hidden;}
#mainApp .top{isolation:isolate;}
#mainApp .top > *,#mainApp .who,#mainApp .who > *,#mainApp .top-menu-wrap{min-width:0;}
#mainApp .top-menu-wrap{align-self:center;}
#mainApp .app-menu-panel{max-height:min(70vh,520px);overflow-y:auto;overscroll-behavior:contain;}
#mainApp .tabs button{min-width:0;}
#mainApp .tabs button svg{flex:0 0 auto;}
#mainApp .tabs button span{max-width:100%;line-height:1.15;text-align:center;}
#mainApp :is(.simple-team-tab,.simple-schedule-row,.simple-team-editor-head,.resource-list-group summary,.event-page-card) > *{min-width:0;}
#mainApp .simple-team-tab{overflow:hidden;}
#mainApp :is(button,summary,[role="button"]){-webkit-tap-highlight-color:transparent;}
#mainApp svg{shape-rendering:geometricPrecision;}

/* Empty-state add marks. Keep native selects and their original event handlers.
   The repeated IDs intentionally outrank the existing reference-theme layers;
   every new rule is limited to the opt-in htns-add-* classes. */
html.htns-theme-v234 body :is(.htns-add-placeholder,.htns-add-select){
  --htns-add-ink:#237FB8;
  --htns-add-tint:#E8F5FF;
  --htns-add-border:#BCDDF1;
  --htns-add-surface:#FCFEFF;
  --htns-add-option-ink:#12365C;
  --htns-add-art:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14.5' fill='%23E8F5FF' stroke='%23BCDDF1'/%3E%3Cpath d='M16 9v14M9 16h14' fill='none' stroke='%23237FB8' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  --htns-add-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23237FB8' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html.htns-theme-v234 body :is(.htns-add-placeholder,.htns-add-select).is-worship{
  --htns-add-ink:#8035BC;
  --htns-add-tint:#F1E7FC;
  --htns-add-border:#D9C3ED;
  --htns-add-art:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14.5' fill='%23F1E7FC' stroke='%23D9C3ED'/%3E%3Cpath d='M16 9v14M9 16h14' fill='none' stroke='%238035BC' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  --htns-add-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%238035BC' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html.htns-theme-v234 body :is(#mainApp#mainApp#mainApp#mainApp#mainApp,#modal#modal#modal#modal#modal) .htns-add-placeholder{
  display:inline-flex !important;
  position:relative !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 26px !important;
  width:26px !important;
  min-width:26px !important;
  max-width:26px !important;
  height:26px !important;
  min-height:26px !important;
  max-height:26px !important;
  padding:0 !important;
  margin:0 !important;
  border:1px solid var(--htns-add-border) !important;
  border-radius:50% !important;
  background:linear-gradient(155deg,var(--htns-add-surface),var(--htns-add-tint)) !important;
  color:var(--htns-add-ink) !important;
  box-shadow:0 1px 2px rgb(25 71 108 / 6%),inset 0 1px 0 rgb(255 255 255 / 55%) !important;
  line-height:1 !important;
  vertical-align:middle !important;
  pointer-events:none !important;
}
html.htns-theme-v234 body :is(#mainApp#mainApp#mainApp#mainApp#mainApp,#modal#modal#modal#modal#modal) .htns-add-placeholder > svg{
  display:block !important;
  flex:0 0 16px !important;
  width:16px !important;
  height:16px !important;
  min-width:16px !important;
  min-height:16px !important;
  margin:0 !important;
  color:inherit !important;
  fill:none !important;
  stroke:currentColor !important;
}
/* The closed control shows the plus. Its native picker keeps readable option
   labels, including a selectable empty option for clearing an assignment.
   Without :has support, the localized plus-text option is a safe fallback. */
html.htns-theme-v234 body :is(#mainApp#mainApp#mainApp#mainApp#mainApp,#modal#modal#modal#modal#modal) select.htns-add-select:has(option[value=""]:checked){
  color:transparent !important;
  -webkit-text-fill-color:transparent !important;
  text-shadow:none !important;
  background-color:var(--htns-add-surface) !important;
  background-image:var(--htns-add-art),var(--htns-add-chevron) !important;
  background-repeat:no-repeat !important;
  background-size:26px 26px,18px 18px !important;
  background-position:left 7px center,right 8px center !important;
  border-color:var(--htns-add-border) !important;
  appearance:none !important;
  -webkit-appearance:none !important;
  cursor:pointer !important;
}
html.htns-theme-v234 body :is(#mainApp#mainApp#mainApp#mainApp#mainApp,#modal#modal#modal#modal#modal) select.htns-add-select option{
  color:var(--htns-add-option-ink) !important;
  -webkit-text-fill-color:var(--htns-add-option-ink) !important;
  background:var(--htns-add-surface) !important;
}
/* Avoid a second arrow from the original schedule wrapper. */
html.htns-theme-v234 body #mainApp#mainApp#mainApp#mainApp#mainApp .simple-schedule-select-wrap:has(> select.htns-add-select option[value=""]:checked)::after{
  content:none !important;
}
html.htns-theme-v234 body :is(#mainApp#mainApp#mainApp#mainApp#mainApp,#modal#modal#modal#modal#modal) select.htns-add-select:focus-visible{
  outline:2px solid var(--htns-add-ink) !important;
  outline-offset:2px !important;
}
@media (hover:hover){
  html.htns-theme-v234 body :is(#mainApp#mainApp#mainApp#mainApp#mainApp,#modal#modal#modal#modal#modal) select.htns-add-select:has(option[value=""]:checked):hover{
    border-color:var(--htns-add-ink) !important;
  }
}
html.htns-theme-v234[data-theme="dark"] body :is(.htns-add-placeholder,.htns-add-select){
  --htns-add-ink:#9ED5FF;
  --htns-add-tint:#213E5B;
  --htns-add-border:#496D8C;
  --htns-add-surface:#142C43;
  --htns-add-option-ink:#E4F2FF;
  --htns-add-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%239ED5FF' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html.htns-theme-v234[data-theme="dark"] body :is(.htns-add-placeholder,.htns-add-select).is-worship{
  --htns-add-ink:#D6B2F8;
  --htns-add-tint:#3D2957;
  --htns-add-border:#775491;
  --htns-add-surface:#271D3B;
  --htns-add-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23D6B2F8' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (forced-colors:active){
  html.htns-theme-v234 body :is(#mainApp#mainApp#mainApp#mainApp#mainApp,#modal#modal#modal#modal#modal) select.htns-add-select:has(option[value=""]:checked){
    color:CanvasText !important;
    -webkit-text-fill-color:CanvasText !important;
    background-image:none !important;
    appearance:auto !important;
    -webkit-appearance:auto !important;
  }
  html.htns-theme-v234 body :is(#mainApp#mainApp#mainApp#mainApp#mainApp,#modal#modal#modal#modal#modal) :is(.htns-add-placeholder,select.htns-add-select option){
    color:CanvasText !important;
    -webkit-text-fill-color:CanvasText !important;
    border-color:CanvasText !important;
    background:Canvas !important;
  }
}
