@font-face {
  font-family: StudyHand;
  src: url("fonts/Caveat.ttf") format("truetype");
  font-weight: 400 700;
  font-display: block;
}
:root {
  --green: #2e7033;
  --blue: #1764ad;
  --red: #b83c36;
  --gold: #a7750d;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: #fff;
}
.frame {
  width: 100%;
  max-width: 1426px;
  aspect-ratio: 1426 / 532;
  position: relative;
  margin: 0 auto;
}
.sheet {
  width: 1426px;
  height: 532px;
  position: absolute;
  inset: 0 auto auto 0;
  background: #fff;
  transform-origin: top left;
  color: #111;
}
h1 {
  position: absolute;
  left: 8px;
  top: 0;
  margin: 0;
  font:
    400 44px/56px Georgia,
    serif;
}
.scripture {
  font:
    400 29px/38px Georgia,
    serif;
}
.scripture p {
  position: absolute;
  left: 8px;
  right: 8px;
  margin: 0;
}
.line {
  display: block;
  white-space: pre;
}
.indent {
  padding-left: 28px;
}
.opening {
  top: 74px;
}
.isaiah {
  top: 210px;
}
.trust {
  top: 384px;
}
.psalm {
  top: 444px;
}
.citation {
  position: absolute;
  right: 8px;
  top: 482px;
  margin: 0;
  font:
    italic 29px/38px Georgia,
    serif;
}
.note {
  position: absolute;
  margin: 0;
  font:
    500 29px/1.12 StudyHand,
    "Bradley Hand",
    cursive;
  white-space: pre-line;
}
.life-sequence {
  left: 322px;
  top: 6px;
  color: var(--green);
  transform: rotate(-0.3deg);
}
.life-meaning {
  left: 325px;
  top: 39px;
  color: var(--green);
  font-size: 27px;
  transform: rotate(-0.8deg);
}
.community {
  left: 1125px;
  top: 195px;
  color: var(--blue);
  font-size: 27px;
}
.community-detail {
  left: 1126px;
  top: 228px;
  color: var(--blue);
  font-size: 23px;
}
.foundation {
  left: 520px;
  top: 214px;
  color: var(--gold);
  transform: rotate(-0.8deg);
}
.honor {
  left: 600px;
  top: 252px;
  color: var(--gold);
  transform: rotate(0.5deg);
}
.frame-note {
  left: 1080px;
  top: 292px;
  color: var(--red);
  font-size: 29px;
  transform: rotate(-0.6deg);
}
.vindication {
  left: 493px;
  top: 453px;
  color: var(--gold);
  font-size: 28px;
  transform: rotate(-0.4deg);
}
.offering {
  left: 1140px;
  top: 403px;
  color: var(--blue);
  font-size: 27px;
  transform: rotate(-1deg);
  text-align: center;
}
.hand-arrow {
  font-family: Georgia, serif;
  font-size: 0.9em;
  font-weight: 400;
}
.ink {
  position: absolute;
  inset: 0;
  width: 1426px;
  height: 532px;
  pointer-events: none;
  overflow: visible;
}
.ink path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media print {
  @page {
    size: 7.5in 2.79804in;
    margin: 0;
  }
  .frame {
    width: 7.5in;
    margin: 0;
  }
  body {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

body {
  background: #f3f4f3;
  font-family: system-ui, sans-serif;
}
.editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: #fff;
  border-bottom: 1px solid #ddd;
  font-size: 13px;
}
.editor-toolbar strong {
  margin-right: 8px;
  font-size: 15px;
}
.editor-toolbar button,
.editor-toolbar input,
.preview-return {
  font: inherit;
}
.editor-toolbar button,
.preview-return {
  border: 1px solid #c9cecb;
  border-radius: 6px;
  background: #fff;
  padding: 7px 11px;
  color: #243c30;
  cursor: pointer;
}
.editor-toolbar button:disabled {
  opacity: 0.4;
  cursor: default;
}
.editor-toolbar button.primary {
  background: #285b3c;
  color: white;
  border-color: #285b3c;
}
.editor-toolbar label {
  display: flex;
  align-items: center;
  gap: 5px;
}
.editor-toolbar input[type="number"] {
  width: 65px;
  padding: 5px;
  border: 1px solid #c9cecb;
  border-radius: 5px;
}
.editor-toolbar input[type="color"] {
  width: 30px;
  height: 30px;
  padding: 1px;
  border: 1px solid #c9cecb;
  background: white;
  border-radius: 5px;
}
.editor-toolbar .spacer {
  flex: 1;
}
.editor-hint {
  margin: 12px 18px;
  color: #53605a;
  font-size: 13px;
}
.editor-status {
  font-size: 12px;
  color: #53605a;
}
.editor-stage {
  padding: 12px 20px 40px;
}
.frame {
  box-shadow: 0 2px 14px #00000010;
}
[contenteditable="true"] {
  cursor: text;
  outline: none;
}
[contenteditable="true"]:focus {
  outline: none;
}
.text-flow {
  white-space: pre-line;
  overflow-wrap: anywhere;
  overflow: visible;
}
.text-flow .line {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.overflow-hint {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 9px;
  padding: 3px 6px;
  background: #fff4d8;
  color: #72520b;
  font:
    12px/1.3 system-ui,
    sans-serif;
  white-space: nowrap;
  pointer-events: none;
}
body[data-mode="edit"] .movable.selected {
  outline: none;
}
.resize-box {
  position: absolute;
  z-index: 6;
  border: 1px dashed #6c99b7;
  pointer-events: none;
}
.resize-handle {
  position: absolute;
  display: block;
  padding: 0;
  margin: 0;
  min-width: 0;
  min-height: 0;
  pointer-events: auto;
  touch-action: none;
}
.resize-edge {
  border: 0;
  background: transparent;
}
.resize-n,
.resize-s {
  left: 0;
  width: 100%;
  height: var(--resize-hit);
  cursor: ns-resize;
  transform: translateY(-50%);
}
.resize-n {
  top: 0;
}
.resize-s {
  top: 100%;
}
.resize-e,
.resize-w {
  top: 0;
  height: 100%;
  width: var(--resize-hit);
  cursor: ew-resize;
  transform: translateX(-50%);
}
.resize-e {
  left: 100%;
}
.resize-w {
  left: 0;
}
.resize-corner {
  width: var(--resize-knob);
  height: var(--resize-knob);
  border: 1px solid #507f9e;
  background: white;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}
.resize-nw {
  left: 0;
  top: 0;
  cursor: nwse-resize;
}
.resize-ne {
  left: 100%;
  top: 0;
  cursor: nesw-resize;
}
.resize-sw {
  left: 0;
  top: 100%;
  cursor: nesw-resize;
}
.resize-se {
  left: 100%;
  top: 100%;
  cursor: nwse-resize;
}
.resize-handle:focus-visible {
  outline: 2px solid #1764ad;
}
body.resizing,
body.resizing * {
  cursor: var(--resize-cursor) !important;
  user-select: none !important;
}
.drag-handles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
body[data-handles="hidden"] .drag-handles {
  display: none;
}
.drag-handle {
  position: absolute;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #c0d0da;
  border-radius: 4px;
  background: #f5f9fc;
  color: #47677e;
  font: 17px/18px system-ui;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  opacity: 0.65;
}
.drag-handle:hover,
.drag-handle:focus-visible {
  opacity: 1;
  background: #dfeef8;
}
.drag-handle[data-selected="true"] {
  background: #cee4f4;
  opacity: 1;
}
body.dragging,
body.dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}
body[data-mode="edit"] .ink .ink-hit {
  pointer-events: stroke;
  cursor: grab;
}
.ink .ink-hit {
  stroke: transparent !important;
  stroke-width: 14 !important;
  fill: none;
}
.ink .selection-box {
  stroke: #6c99b7;
  stroke-dasharray: 5 4;
  stroke-width: 1;
  fill: none;
}
.preview-return {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  box-shadow: 0 2px 10px #0002;
  font: 14px system-ui;
}
body[data-mode="preview"] {
  background: white;
}
body[data-mode="preview"] .editor-toolbar,
body[data-mode="preview"] .editor-hint,
body[data-mode="preview"] .drag-handles {
  display: none;
}
body[data-mode="preview"] .editor-stage {
  padding: 0;
}
body[data-mode="preview"] .frame {
  box-shadow: none;
}
body[data-mode="preview"] .preview-return {
  display: none;
}
body[data-mode="preview"] .selected {
  outline: none;
}
body[data-mode="preview"] .selection-box,
body[data-mode="preview"] .resize-box {
  display: none;
}
@media print {
  .editor-toolbar,
  .editor-hint,
  .preview-return,
  .drag-handles,
  .selection-box,
  .resize-box {
    display: none !important;
  }
  .editor-stage {
    padding: 0;
  }
  .frame {
    box-shadow: none;
  }
  .movable.selected,
  [contenteditable="true"]:focus {
    outline: none !important;
  }
  body {
    background: white;
  }
}

.page-settings {
  margin: 0 18px 12px;
  color: #53605a;
  font:
    13px/1.5 system-ui,
    sans-serif;
}
.page-settings summary {
  cursor: pointer;
  width: fit-content;
}
.page-settings p {
  max-width: 850px;
}
.page-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.page-options input {
  width: 80px;
}
.page-options input,
.page-options button,
.editor-toolbar select,
dialog input,
dialog textarea,
dialog button {
  font: inherit;
  border: 1px solid #c9cecb;
  border-radius: 5px;
  padding: 6px;
  background: #fff;
  color: #243c30;
}
.editor-toolbar select {
  max-width: 80px;
}
dialog {
  width: min(620px, calc(100% - 32px));
  border: 1px solid #ccd4ce;
  border-radius: 12px;
  padding: 24px;
  color: #243c30;
}
dialog::backdrop {
  background: #16322366;
}
dialog h2 {
  margin: 0 0 12px;
  font-size: 22px;
}
dialog label {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
}
dialog textarea {
  width: 100%;
  resize: vertical;
}
dialog p {
  font-size: 14px;
  line-height: 1.5;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.dialog-actions button {
  cursor: pointer;
  padding: 8px 16px;
}
.dialog-actions [type="submit"] {
  background: #285b3c;
  color: #fff;
}
body[data-mode="preview"] .page-settings {
  display: none;
}
@media print {
  .page-settings,
  dialog,
  .overflow-hint {
    display: none !important;
  }
}
