/* Shared, normalized 2D stage. Container query units scale typography with the whole slide. */
.slide-stage {
  width: 100%;
  min-width: 0;
  display: block;
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  overflow: hidden;
  text-align: initial;
  color-scheme: light;
}
.slide-stage .stage-node {
  position: absolute;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: block;
  background: transparent;
  letter-spacing: normal;
  line-height: 1.14;
  cursor: inherit;
  box-shadow: none;
}
.slide-stage .stage-text { display: flex; align-items: start; }
.slide-stage .stage-text span { display: block; width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; pointer-events: none; }
.slide-stage .stage-image img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  display: block;
}
.slide-stage .stage-logo {
  width: 22%;
  height: 15%;
  object-fit: contain;
  display: block;
  position: absolute;
  top: 7%;
  left: 7%;
  pointer-events: none;
  user-select: none;
}
.slide-stage.stage-editable button.stage-node {
  cursor: move;
  touch-action: none;
  outline: 1px dashed transparent;
  outline-offset: -1px;
}
.slide-stage.stage-editable button.stage-node:hover { outline-color: #6a8f99; }
.slide-stage.stage-editable button.stage-node.stage-selected,
.slide-stage.stage-editable button.stage-node:focus-visible {
  outline: 2px solid #087a9d;
  outline-offset: -2px;
}
.stage-resize-box { position: absolute; z-index: 1; pointer-events: none; }
.stage-resize-box[hidden] { display: none; }
.editor-resize-handle { position: absolute; z-index: 2; display: grid; place-items: center; pointer-events: auto; touch-action: none; }
.editor-resize-handle::before { content: ""; width: 8px; height: 8px; border: 1px solid #075778; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1px #001a3029; }
.editor-resize-handle:hover::before, .editor-resize-handle:active::before { background: #a8e2f2; }
.editor-resize-handle:is([data-edge=n],[data-edge=s]) { left: 9px; right: 9px; height: 14px; cursor: ns-resize; }
.editor-resize-handle:is([data-edge=w],[data-edge=e]) { top: 9px; bottom: 9px; width: 14px; cursor: ew-resize; }
.editor-resize-handle:is([data-edge=nw],[data-edge=ne],[data-edge=sw],[data-edge=se]) { width: 18px; height: 18px; z-index: 3; }
.editor-resize-handle:is([data-edge=nw],[data-edge=se]) { cursor: nwse-resize; }
.editor-resize-handle:is([data-edge=ne],[data-edge=sw]) { cursor: nesw-resize; }
.editor-resize-handle[data-edge=n] { top: -6px; }
.editor-resize-handle[data-edge=s] { bottom: -6px; }
.editor-resize-handle[data-edge=w] { left: -6px; }
.editor-resize-handle[data-edge=e] { right: -6px; }
.editor-resize-handle:is([data-edge=nw],[data-edge=ne]) { top: -8px; }
.editor-resize-handle:is([data-edge=sw],[data-edge=se]) { bottom: -8px; }
.editor-resize-handle:is([data-edge=nw],[data-edge=sw]) { left: -8px; }
.editor-resize-handle:is([data-edge=ne],[data-edge=se]) { right: -8px; }
.slide-stage .stage-node.stage-slot {
  box-shadow: inset 0 0 0 1px #3387a6, inset 0 0 0 2px #fff8;
  background: #2087b114;
}
.slide-stage .stage-slot span { opacity: .78; }
.slide-stage .stage-node-inline-active { visibility: hidden; }
.slide-stage:has(.stage-inline-text) .stage-resize-box { visibility: hidden; }
.slide-stage textarea.stage-inline-text {
  position: absolute;
  z-index: 4;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 0 0 2px #087a9d;
  outline: none;
  resize: none;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  letter-spacing: normal;
  line-height: 1.14;
}
.slide-stage textarea.stage-inline-text::placeholder { color: inherit; opacity: .7; }
.app-shell .page.editor-page {
  width: 100%;
  padding-inline: clamp(10px, 1.2vw, 22px);
}
.presentation-editor {
  --ed-ink: #123948;
  --ed-border: #dfe7e9;
  --ed-muted: #536b76;
  --ed-subtle: #f6f9f9;
  --ed-primary: var(--cm-primary, var(--primary, #003b4d));
  --ed-accent: var(--accent, #dd753e);
  color: var(--ed-ink);

}
.presentation-editor button,
.presentation-editor input,
.presentation-editor select,
.presentation-editor textarea { font-family: inherit; }
.presentation-editor h1,.presentation-editor h2,.presentation-editor h3,
.presentation-editor p { margin: 0; }
.editor-top { display: grid; gap: 12px; margin-bottom: 22px; }
.editor-intro { display: flex; align-items: center; gap: 14px; }
.editor-intro .editor-btn { margin-left: -7px; }
.editor-tag { color: #a74721; font-weight: 750; font-size: 10px; letter-spacing: .15em; }
.editor-headline { display: flex; width: 100%; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 12px; }
.editor-titles { min-width: 0; display: grid; gap: 5px; }
.editor-titles h1 { color: var(--ed-ink); font-size: clamp(1.9rem, 3vw, 2.7rem); letter-spacing: -.052em; line-height: 1.08; overflow-wrap: anywhere; }
.editor-titles { max-width: 100%; flex: 1 1 16rem; }
.editor-rename {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 0;
  color: inherit; background: transparent; border: 0; border-radius: 4px;
  font: inherit; letter-spacing: inherit; text-align: left;
}
.editor-rename span { min-width: 0; }
.editor-rename svg { width: 18px; height: 18px; color: var(--ed-muted); }
.editor-rename:hover svg, .editor-rename:focus-visible svg { color: var(--cm-warm); }
.editor-titles input.editor-title-input { font: inherit; letter-spacing: inherit; padding: 2px 6px; }
.editor-titles [hidden] { display: none; }
.editor-save-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.editor-save-status .editor-btn { min-height: 28px; padding-inline: 6px; margin-block: -4px; }
.editor-state { display: flex; align-items: baseline; gap: 7px; color: var(--ed-muted); font-size: .84rem; }
.editor-state[data-state]::before {
  content: ""; inline-size: 6px; block-size: 6px; border-radius: 50%; flex: none;
  align-self: center; background: currentColor;
}
.editor-state[data-state=saved]::before { background: #3b8b70; }
.editor-state[data-state=saving]::before,
.editor-state[data-state=pending]::before { background: var(--cm-accent); }
.editor-unsaved { color: #9d4925; }
.editor-top-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; flex-shrink: 0; max-width: 100%; }
.editor-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 35px;
  border-radius: 8px;
  border: 1px solid var(--ed-border);
  padding: 0 10px;
  color: var(--ed-ink);
  background: #fff;
  font-size: 12px;
  font-weight: 690;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
}
.editor-btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.editor-btn:hover:not(:disabled) { background: #edf4f6; border-color: #c9dde3; }
.editor-btn:disabled { opacity: .48; cursor: default; }
.editor-btn[hidden] { display: none; }
.editor-btn-primary { color: white; background: var(--ed-primary); border-color: var(--ed-primary); }
.editor-btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--ed-primary), #000 17%); border-color: var(--ed-primary); }
.editor-btn-quiet { background: transparent; border-color: transparent; }
.editor-btn-danger { color: #963d38; }
.editor-btn-danger:hover:not(:disabled) { background: #faeeed; border-color: #f0dad9; }
.editor-btn:focus-visible,.editor-slide:focus-visible,.editor-details summary:focus-visible { outline: 2px solid #127699; outline-offset: 2px; }
.editor-download { position: relative; }
.editor-download summary { list-style: none; user-select: none; }
.editor-download summary::-webkit-details-marker { display: none; }
.editor-download-options { position: absolute; top: calc(100% + 5px); right: 0; z-index: 9; padding: 5px; min-width: 155px; display: grid; gap: 4px; border: 1px solid var(--ed-border); border-radius: 9px; background: white; box-shadow: 0 10px 25px #1239481d; }
.editor-download-options .editor-btn { justify-content: start; }
.editor-conflict { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; border: 1px solid #efd3be; padding: 9px 12px; border-radius: 8px; background: #fff1e8; color: #814221; font-size: .87rem; }
.editor-conflict[hidden] { display: none; }
.editor-grid { display: grid; grid-template-columns: clamp(155px, 16vw, 208px) minmax(0, 1fr) clamp(220px, 22vw, 285px); gap: 12px; align-items: stretch; }
.layout-editor .editor-grid { grid-template-columns: minmax(0,1fr) clamp(220px, 25vw, 330px); }
.layout-editor .editor-layout-note { color: var(--ed-muted); font-size: .85rem; }
.editor-layout-requirement { border-left: 2px solid var(--ed-accent); padding-left: 7px; color: #894728; font-size: .74rem; }
.editor-panel { background: white; min-width: 0; border: 1px solid var(--ed-border); border-radius: 13px; box-shadow: 0 1px 2px #1239480a; }
.editor-panel-head { min-height: 47px; display: flex; justify-content: space-between; align-items: center; gap: 5px; padding: 9px 12px; border-bottom: 1px solid #e9eef0; color: var(--ed-ink); }
.editor-panel-head h2 { font-size: .9rem; font-weight: 770; letter-spacing: -.012em; }
.editor-count { display: grid; place-content: center; min-width: 21px; height: 21px; background: #edf4f6; color: #355c6b; border-radius: 99px; font-size: .72rem; }
.editor-add-slide { padding: 8px; display: grid; grid-template-columns: minmax(0,1fr) 35px; gap: 5px; }
.editor-add-slide select { padding: 4px 5px; min-width: 0; font-size: .78rem; }
.editor-list { display: flex; flex-direction: column; }
.editor-slide-list { list-style: none; margin: 0; padding: 0 8px 8px; display: grid; grid-template-columns: minmax(0,1fr); gap: 7px; min-width: 0; max-height: 66vh; overflow-x: hidden; overflow-y: auto; align-content: start; flex: 1; }
.editor-slide-list li { min-width: 0; max-width: 100%; }
.editor-slide {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 4px 5px;
  background: white;
  border: 1px solid var(--ed-border);
  border-radius: 8px;
  text-align: start;
  color: var(--ed-ink);
  cursor: pointer;
}
.editor-slide .stage-thumbnail { width: min(100%, var(--thumbnail-width-limit)); margin-inline: auto; border-radius: 4px; }
.editor-slide:hover { background: #f6fafa; }
.editor-slide-active { border-color: var(--ed-accent); box-shadow: 0 0 0 1px var(--ed-accent); background: #fff9f4; }
.editor-slide-meta { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 2px 1px; }
.editor-slide-meta strong { flex: 1 1 0; font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.editor-slide-count { flex: none; font-size: .65rem; font-variant-numeric: tabular-nums; color: #617985; font-weight: 620; }
.editor-slide-mobile { flex: none; display: inline-grid; place-items: center; color: #185d71; }
.editor-slide-mobile[hidden] { display: none; }
.editor-slide-mobile svg { width: 12px; height: 12px; }
.editor-sharing { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; min-width: 0; padding: 8px 10px; border: 1px solid var(--ed-border); border-radius: 9px; background: #fff; }
.editor-sharing-details { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 7px; min-width: 0; color: var(--ed-ink); font-size: .81rem; }
.editor-sharing-details svg { flex: none; width: 15px; height: 15px; color: #185d71; }
.editor-sharing-count { color: var(--ed-muted); font-variant-numeric: tabular-nums; }
.editor-sharing-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.editor-sharing-actions .editor-btn { min-height: 30px; }
.editor-order-actions { display: flex; justify-content: space-between; gap: 4px; padding: 8px; border-top: 1px solid #e9eef0; }
.editor-order-actions .editor-btn { width: 100%; min-width: 0; padding: 0 3px; }
.editor-workspace { display: flex; flex-direction: column; }
.editor-canvas-meta { color: var(--ed-muted); font-size: .75rem; white-space: nowrap; }
.editor-stage-toolbar { display: flex; flex-wrap: wrap; gap: 5px; padding: 9px; border-bottom: 1px solid #e9eef0; }
.editor-stage-toolbar[hidden] { display: none; }
.editor-stage-toolbar .editor-btn { min-height: 32px; }
.editor-stage-toolbar .editor-btn-quiet { margin-left: auto; }
.editor-stage-hint { padding: 5px 10px; border-bottom: 1px solid #e9eef0; background: #f5fafb; color: var(--ed-muted); font-size: .75rem; }
.editor-stage-hint[hidden] { display: none; }
.editor-slot-tools { display: flex; align-items: stretch; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.editor-slot-tools select {
  border: 1px solid var(--ed-border);
  border-radius: 7px;
  background: white;
  color: var(--ed-ink);
  padding: 3px 5px;
  font-size: .78rem;
}
.editor-canvas-wrap {
  display: grid;
  align-content: center;
  flex: 1;
  min-height: 330px;
  padding: clamp(9px,1vw,16px);
  border-radius: 0 0 12px 12px;
  background: radial-gradient(circle, #aec4ca66 1px, transparent 1px) 0 0 / 14px 14px, #eef4f5;
}
.editor-canvas-wrap > .slide-stage { box-shadow: 0 6px 24px #003b4d24, 0 0 0 1px #a5bfc7; }
.editor-canvas-empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 25px 8px; }
.editor-canvas-empty p { color: var(--ed-muted); font-size: .86rem; }
.editor-properties { display: grid; gap: 8px; align-content: start; padding: 8px; overflow-y: auto; max-height: 72vh; }
.editor-details { border: 1px solid #e5edef; border-radius: 8px; background: #fbfdfd; padding: 7px; min-width: 0; }
.editor-details > summary { color: var(--ed-ink); font-size: .82rem; font-weight: 770; cursor: pointer; }
.editor-details[open] > summary { margin-bottom: 8px; }
.editor-field { display: grid; gap: 3px; min-width: 0; margin-bottom: 7px; }
.editor-field-label { font-weight: 690; }
.editor-field-label,.editor-check,.editor-field small,.editor-hint { font-size: .72rem; color: var(--ed-muted); }
.editor-field input:not([type=checkbox]),.editor-field textarea,.editor-field select,.editor-add-slide select {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  min-height: 33px;
  border: 1px solid #d7e3e7;
  border-radius: 7px;
  color: var(--ed-ink);
  background: white;
  font-size: .79rem;
}
.editor-field input:not([type=checkbox]),.editor-field textarea,.editor-field select { padding: 3px 6px; }
.editor-field input[type=color] { max-width: 72px; padding: 3px; }
.editor-field textarea { resize: vertical; }
.editor-crop { width: min(620px,calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: clamp(12px,3vw,22px); border: 1px solid var(--ed-border); border-radius: 14px; color: var(--ed-ink); background: #fff; }
.editor-crop::backdrop { background: #092c398c; }
.editor-crop-head, .editor-crop-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.editor-crop-head { justify-content: space-between; margin-bottom: 6px; }
.editor-crop-actions { justify-content: flex-end; }
.editor-crop-body { display: grid; gap: 12px; margin-top: 12px; }
.editor-crop-preview { position: relative; isolation: isolate; margin: auto; width: min(100%,calc(43dvh * var(--crop-ratio,1))); overflow: hidden; aspect-ratio: var(--crop-ratio,1); background: repeating-conic-gradient(#eef2f3 0 25%,#fff 0 50%) 0/14px 14px; }
.editor-crop-preview img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; pointer-events: none; }
.editor-crop-window { position: absolute; outline: 1px solid #fff; outline-offset: -1px; box-shadow: 0 0 0 9999px #0a263498; cursor: move; touch-action: none; }
.editor-crop-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.editor-crop-fields .editor-field { margin: 0; }
.editor-crop-status:not(:empty) { margin-top: 8px; font-size: .85rem; }
@media(max-width:480px) { .editor-crop-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.editor-check { display: flex; align-items: start; gap: 5px; font-weight: 720; margin-top: 6px; }
.editor-check input { margin: 2px 0 0; accent-color: var(--ed-primary); }
.editor-hint { display: block; margin-top: 4px; }
.editor-mobile-settings { min-width: 0; margin: 8px 0 0; padding: 6px 7px 7px; border: 1px solid #e0ebee; border-radius: 7px; }
.editor-mobile-settings legend { padding-inline: 3px; }
.editor-mobile-settings .editor-field { margin-bottom: 6px; }
.editor-mobile-settings .editor-field small { margin-top: 0; }
.editor-library { width: min(680px, calc(100% - 24px)); max-height: min(750px, calc(100dvh - 32px)); padding: 15px; border: 1px solid var(--ed-border); border-radius: 13px; color: var(--ed-ink); background: #fff; box-shadow: 0 18px 50px #163a4944; }
.editor-library::backdrop { background: #002f3e75; }
.editor-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 10px; }
.editor-library-heading h2 { font-size: 1.15rem; }
.editor-library .editor-library-position { color: var(--ed-muted); font-size: .83rem; margin: 0 0 12px; overflow-wrap: anywhere; }
.editor-library-fields { display: grid; grid-template-columns: minmax(0,.65fr) minmax(0,.65fr) minmax(0,1.2fr) auto; align-items: end; gap: 7px; }
.editor-library-fields[data-kind="text"] { grid-template-columns: minmax(0,.65fr) minmax(0,1.85fr) auto; }
.editor-library-fields[data-kind="bible"] { grid-template-columns: minmax(0,1fr) minmax(0,1.65fr) minmax(0,1.2fr); }
.editor-library-fields[data-kind="bible"] .editor-library-query,
.editor-library-fields .bible-reference { grid-column: 1/-1; }
.editor-library-fields[data-kind="bible"] [type="submit"] { grid-column: 1/-1; justify-self: start; }
.editor-library-fields .editor-library-search-mode { white-space: normal; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.editor-library-fields .bible-reference-field :is(input,select) { min-height: 36px; padding: 3px 6px; }
.editor-library-fields .editor-field { margin: 0; }
.editor-library-fields [hidden], .editor-library-availability[hidden], .editor-library-availability [hidden] { display: none; }
.editor-library-availability { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; padding: 5px 8px; border-radius: 7px; background: #edf4f6; color: #355c6b; font-size: .78rem; }
.editor-library-unavailable { background: #fff1e8; color: #814221; }
.editor-library-availability .editor-btn { min-height: 26px; color: inherit; }
.editor-library-settings { text-decoration: underline; text-underline-offset: 2px; font-weight: 750; }
.editor-library-status { color: var(--ed-muted); margin-top: 10px !important; font-size: .82rem; }
.editor-library-results { display: grid; gap: 6px; padding: 0; margin: 8px 0 0; list-style: none; }
.editor-library-result { display: flex; align-items: start; justify-content: space-between; gap: 8px; padding: 8px; border: 1px solid #e0ebee; border-radius: 8px; }
.editor-library-information { display: grid; min-width: 0; gap: 2px; overflow-wrap: anywhere; font-size: .82rem; }
.editor-library-information small { color: var(--ed-muted); }
.editor-geometry { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px 6px; margin-top: 5px; }
.editor-element-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.editor-element-actions .editor-btn { font-size: .65rem; padding-inline: 5px; }
.editor-element-actions .editor-btn svg { width: 14px; height: 14px; }
@media (max-width:1120px) {
  .editor-grid { grid-template-columns: minmax(126px,.32fr) minmax(0,1fr); }
  .editor-inspector { grid-column: 1/-1; }
  .editor-properties { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: none; }
  .layout-editor .editor-inspector { grid-column: auto; }
  .layout-editor .editor-properties { grid-template-columns: minmax(0,1fr); }
}
@media (max-width:840px) {
  .layout-editor .editor-grid { grid-template-columns: minmax(0,1fr); }
  .layout-editor .editor-workspace { grid-row: 1; }
  .layout-editor .editor-inspector { grid-row: 2; }
  .editor-slot-tools { margin-left: 0; }
}
@media (max-width:650px) {
  .editor-grid { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .editor-top { margin-bottom: 10px; }
  .editor-workspace { grid-row: 1; }
  .editor-list { grid-row: 2; }
  .editor-inspector { grid-row: 3; }
  .editor-properties { grid-template-columns: minmax(0,1fr); }
  .editor-slide-list { display: flex; overflow-x: auto; overflow-y: hidden; }
  .editor-slide-list li { flex: 0 0 115px; }
  .editor-add-slide { grid-template-columns: minmax(0,1fr) 40px; }
  .editor-canvas-wrap { min-height: 190px; }
  .editor-stage-toolbar .editor-btn-quiet { margin-left: 0; }
  .editor-stage-toolbar .editor-btn { min-height: 38px; }
  .presentation-editor .editor-btn { min-height: 38px; }
  .editor-library-fields, .editor-library-fields[data-kind="text"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .editor-library-fields[data-kind="bible"] { grid-template-columns: minmax(0,1fr) minmax(0,1.35fr); }
  .editor-library-search-mode { grid-column: 1/-1; justify-self: start; }
  .editor-library-query { grid-column: 1/-1; }
  .editor-library-result { flex-wrap: wrap; }
}
