:root {
  --green-950: #102018;
  --green-900: #183326;
  --green-800: #244d3b;
  --green-650: #426a52;
  --gold: #b99652;
  --gold-soft: #d9c18a;
  --ivory: #fffaf0;
  --paper: #f7efe1;
  --wood: #8c5b35;
  --blue: #6f9fbd;
  --ink: #1e241d;
  --muted: #667062;
  --line: rgba(94, 72, 41, 0.18);
  --shadow: 0 24px 70px rgba(24, 32, 24, 0.16);
  --print-page-margin: 8mm;
  --print-sheet-gap: 8mm;
  --print-cols: 3;
  --print-layout-rows: 2;
  --print-note-rows: 14;
  --print-name-size: 17px;
  --print-name-font: Georgia, "Times New Roman", serif;
  --print-title-size: 24px;
  --print-ornament-size: 16px;
  --print-cross-size: 34px;
  --print-preview-scale: 1;
  --print-sheet-preview-width: 210mm;
  --print-sheet-preview-height: 297mm;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: linear-gradient(180deg, var(--ivory), #f4ead9);
  font-family: Georgia, "Times New Roman", serif;
}
a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.94);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 13px; min-width: 285px; }
.brand-emblem {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #355f49, var(--green-950));
  box-shadow: inset 0 0 0 2px rgba(217, 193, 138, 0.6), 0 10px 24px rgba(16, 32, 24, 0.18);
}
.brand-emblem svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: var(--gold-soft);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-emblem circle { stroke: rgba(217, 193, 138, 0.78); }
.brand-emblem .water { stroke: var(--blue); }
.brand-text strong, .brand-text small { display: block; line-height: 1.15; }
.brand-text strong { color: var(--green-950); font-size: 18px; }
.brand-text small { color: var(--muted); font-size: 13px; }
.main-nav { display: flex; gap: 20px; color: var(--muted); font-size: 15px; }
.main-nav a:hover { color: var(--green-900); }

.header-cta, .button, .copy-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
}
.button.primary, .header-cta {
  color: var(--ivory);
  background: linear-gradient(135deg, var(--green-900), var(--green-650));
  box-shadow: 0 10px 24px rgba(24, 51, 38, 0.22);
}
.button.secondary, .copy-button {
  color: var(--green-900);
  border-color: var(--line);
  background: rgba(255, 250, 240, 0.82);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--green-950);
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.03);
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 32, 24, 0.92), rgba(16, 32, 24, 0.62), rgba(16, 32, 24, 0.2)),
    linear-gradient(0deg, rgba(16, 32, 24, 0.58), transparent 46%);
}
.hero-content {
  position: relative;
  max-width: 760px;
  padding: 150px clamp(22px, 6vw, 80px) 95px;
  color: var(--ivory);
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-size: clamp(48px, 7vw, 92px); line-height: 0.96; letter-spacing: -0.01em; }
h2 { margin-bottom: 18px; font-size: clamp(32px, 4.2vw, 58px); line-height: 1.06; }
h3 { font-size: 26px; line-height: 1.15; }
.hero-subtitle { max-width: 640px; color: rgba(255, 250, 240, 0.86); font-size: 21px; line-height: 1.55; }
.hero-actions, .form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-card {
  position: absolute;
  right: clamp(20px, 6vw, 76px);
  bottom: 72px;
  width: min(285px, calc(100% - 40px));
  padding: 22px;
  color: var(--ivory);
  border: 1px solid rgba(217, 193, 138, 0.45);
  border-radius: 8px;
  background: rgba(16, 32, 24, 0.66);
  backdrop-filter: blur(14px);
}
.hero-card span, .hero-card small { display: block; color: rgba(255, 250, 240, 0.76); }
.hero-card strong { display: block; margin: 8px 0; color: var(--gold-soft); font-size: 28px; }

.intro-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.intro-band div { padding: 28px clamp(20px, 4vw, 48px); background: linear-gradient(180deg, #fffaf0, #f5ead7); }
.intro-band strong, .intro-band span { display: block; }
.intro-band span { margin-top: 8px; color: var(--muted); line-height: 1.5; }

.text-section, .gallery-section, .video-section, .notes-section, .donate-section, .contacts-section, .skete-section, .spring-section {
  padding: 92px clamp(20px, 6vw, 76px);
}
.two-column { display: grid; grid-template-columns: minmax(260px, 0.8fr) minmax(300px, 1.2fr); gap: clamp(34px, 7vw, 92px); }
.story p, .section-heading p, .skete-copy p, .spring-copy p, .donate-section p, .pastoral-note {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}
.ornament-top { position: relative; }
.ornament-top::before {
  content: "✦  ✠  ✦";
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(185, 150, 82, 0.65);
  letter-spacing: 0.35em;
}

.skete-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 28px;
  background: linear-gradient(135deg, #f3ead7, #fffaf0);
}
.quiet-list { padding: 0; margin: 24px 0 0; list-style: none; }
.quiet-list li { padding: 14px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.skete-photos { display: grid; grid-template-columns: 0.88fr 1.12fr; gap: 14px; align-items: stretch; }
.skete-photos img, .spring-media img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.spring-section {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(280px, 0.8fr);
  gap: clamp(30px, 6vw, 72px);
  align-items: center;
  background: linear-gradient(135deg, var(--green-950), var(--green-800));
  color: var(--ivory);
}
.spring-copy p { color: rgba(255, 250, 240, 0.8); }

.section-heading { max-width: 850px; margin-bottom: 34px; }
.section-heading.centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-heading.light h2, .section-heading.light p { color: var(--ivory); }
.masonry-gallery { width: 100%; columns: 3 260px; column-gap: 16px; }
.masonry-gallery figure {
  break-inside: avoid;
  position: relative;
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: translateZ(0);
}
.masonry-gallery img { width: 100%; height: auto; backface-visibility: hidden; }
.masonry-gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 16px 14px;
  color: var(--ivory);
  background: linear-gradient(0deg, rgba(16, 32, 24, 0.78), transparent);
}
.feast-gallery { background: #f1e5d0; }
.nature-gallery { background: #fffaf0; }

.video-section { background: linear-gradient(180deg, #f8efe0, #efe0c8); }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 18px; }
.video-card {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.86);
  box-shadow: var(--shadow);
}
.video-card video, .video-card iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0;
  background: var(--green-950);
}
.video-card div { padding: 20px; }
.video-card p { color: var(--muted); line-height: 1.55; }

.notes-section {
  background: radial-gradient(circle at top left, rgba(111, 159, 189, 0.18), transparent 32%), linear-gradient(145deg, var(--green-950), var(--green-800));
  color: var(--ivory);
}
.memo-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr); gap: 24px; align-items: start; }
.memo-form, .memo-preview {
  padding: clamp(20px, 3vw, 32px);
  color: var(--ink);
  border: 1px solid rgba(217, 193, 138, 0.35);
  border-radius: 8px;
  background: linear-gradient(rgba(255, 250, 240, 0.97), rgba(255, 250, 240, 0.97)), repeating-linear-gradient(0deg, transparent 0 35px, rgba(185, 150, 82, 0.12) 36px);
  box-shadow: var(--shadow);
}
.memo-form { display: grid; gap: 16px; }
.memo-step {
  position: relative;
  padding: 18px 18px 18px 58px;
  border: 1px solid rgba(94, 72, 41, 0.13);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.74);
}
.step-number {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--ivory);
  border-radius: 50%;
  background: var(--green-900);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
}
fieldset { padding: 0; margin: 0; border: 0; }
legend, label {
  display: block;
  margin-bottom: 10px;
  color: var(--green-900);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
}
.memo-type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.segmented.service-kind, .psalter-options, .form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.segmented label { margin: 0; }
.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.segmented span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  text-align: center;
}
.memo-type-grid span { min-height: 76px; text-align: left; }
.memo-type-grid strong, .memo-type-grid small { display: block; }
.memo-type-grid strong { color: inherit; font-size: 15px; line-height: 1.25; }
.memo-type-grid small { margin-top: 5px; color: inherit; opacity: 0.78; font-size: 12px; line-height: 1.3; }
.segmented input:checked + span { color: var(--ivory); border-color: var(--green-900); background: linear-gradient(135deg, var(--green-900), var(--green-650)); }
input, select, textarea {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}
textarea { resize: vertical; }
.field-hint {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
  color: var(--muted);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13px;
}
.field-hint button {
  padding: 0;
  color: var(--green-900);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}
.checkbox-line { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); line-height: 1.4; }
.checkbox-line input { width: auto; margin-top: 2px; }
.preview-paper {
  min-height: 500px;
  padding: 34px 30px;
  border: 1px solid var(--line);
  background:
    linear-gradient(#fffdf8, #fffdf8),
    repeating-linear-gradient(180deg, transparent 0 34px, rgba(185, 150, 82, 0.12) 35px);
}
.preview-cross {
  width: 36px;
  height: 48px;
  margin: 0 auto 8px;
  position: relative;
}
.preview-cross::before, .preview-cross::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 4px;
  background: var(--gold);
}
.preview-cross::before { top: 0; width: 6px; height: 48px; }
.preview-cross::after { top: 14px; width: 34px; height: 6px; }
.preview-kicker, .preview-term, .preview-paper small { color: var(--muted); }
.preview-kicker { margin-bottom: 4px; text-align: center; text-transform: uppercase; letter-spacing: 0.12em; font-family: "Segoe UI", Arial, sans-serif; font-size: 12px; font-weight: 800; }
.preview-paper h3 { margin: 0 0 8px; color: var(--green-900); text-align: center; }
.preview-term { text-align: center; }
.preview-paper pre { white-space: pre-wrap; min-height: 150px; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.65; }
.submit-status {
  margin-top: 16px;
  padding: 14px;
  color: var(--green-900);
  border: 1px solid rgba(66, 106, 82, 0.3);
  border-radius: 8px;
  background: rgba(66, 106, 82, 0.12);
  outline: none;
  font-weight: 700;
}
.submit-status.success {
  color: #0f2f20;
  border-color: rgba(28, 95, 56, 0.42);
  background: rgba(66, 140, 82, 0.16);
}
.submit-status.error {
  color: #642c22;
  border-color: rgba(142, 65, 47, 0.38);
  background: rgba(180, 89, 63, 0.12);
}
.copy-button { width: 100%; margin-top: 14px; }
.preview-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pastoral-note { max-width: 920px; margin: 24px auto 0; color: #000; }

.print-constructor-block,
.online-notes-block {
  margin-top: 34px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(217, 193, 138, 0.34);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.94);
  box-shadow: var(--shadow);
}
.print-constructor-block { margin-top: 0; }
.online-notes-block {
  margin-top: 28px;
  background: linear-gradient(rgba(255, 250, 240, 0.96), rgba(255, 250, 240, 0.96)), repeating-linear-gradient(0deg, transparent 0 35px, rgba(185, 150, 82, 0.1) 36px);
}
.print-constructor-intro {
  max-width: 900px;
  margin-bottom: 24px;
  color: var(--ink);
}
.print-constructor-intro h3 {
  margin-bottom: 10px;
  color: var(--green-950);
  font-size: clamp(28px, 3vw, 42px);
}
.print-constructor-intro p:last-child {
  max-width: 820px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}
.unified-notes-layout {
  display: grid;
  grid-template-columns: minmax(330px, 520px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.unified-note-form,
.unified-preview-stack {
  min-width: 0;
}
.unified-preview-stack {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 94px;
  align-self: start;
}
.unified-preview-stack .memo-preview {
  position: static;
}
.unified-actions {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 10px;
}
.unified-actions .button {
  width: 100%;
  min-height: 48px;
}
.unified-toolbar {
  justify-content: space-between;
}
.memo-step h4 {
  margin: 0 0 13px;
  color: var(--green-950);
  font-size: 19px;
}
.print-constructor-layout {
  display: grid;
  grid-template-columns: minmax(310px, 420px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.print-controls,
.print-preview-column {
  min-width: 0;
}
.print-controls {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 94px;
  align-self: start;
}
.print-panel {
  padding: 16px;
  color: var(--ink);
  border: 1px solid rgba(94, 72, 41, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
}
.print-panel h4,
.print-preview-head h4 {
  margin: 0 0 13px;
  color: var(--green-950);
  font-size: 19px;
}
.print-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.print-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.print-option-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.print-option-grid span {
  min-height: 52px;
  display: grid;
  place-items: center;
  padding: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  text-align: center;
}
.print-option-grid input:checked + span {
  color: var(--ivory);
  border-color: var(--green-900);
  background: linear-gradient(135deg, var(--green-900), var(--green-650));
}
.print-font-range span {
  float: right;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.print-check-line {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0 0;
  color: var(--muted);
}
.print-check-line input {
  width: auto;
  margin: 0;
}
.print-names-toolbar,
.print-voice-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.print-names-toolbar span,
#printVoiceStatus {
  color: var(--muted);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13px;
}
.print-names-toolbar button,
.print-voice-box button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(66, 106, 82, 0.28);
  border-radius: 999px;
  color: var(--green-900);
  background: #fffdf8;
  cursor: pointer;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
}
.print-voice-box {
  padding: 13px;
  border: 1px dashed rgba(66, 106, 82, 0.32);
  border-radius: 8px;
  background: rgba(66, 106, 82, 0.07);
}
.print-voice-box div { flex: 1 1 190px; }
.print-voice-box strong {
  color: var(--green-900);
  font-family: "Segoe UI", Arial, sans-serif;
}
.print-voice-box p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.print-voice-box label { flex: 0 0 130px; }
.print-actions-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.print-actions-panel .button {
  width: 100%;
  min-height: 46px;
}
.print-preview-column {
  padding: 16px;
  border: 1px solid rgba(94, 72, 41, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.8);
  overflow: hidden;
}
.memo-preview {
  position: sticky;
  top: 94px;
  align-self: start;
}
.print-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}
.print-preview-head h4 { margin-bottom: 0; }
.print-preview-head p:last-child {
  margin: 0;
  color: var(--muted);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}
.print-area {
  display: grid;
  gap: 18px;
  justify-items: center;
  overflow: auto;
  min-height: 620px;
  padding: clamp(14px, 2vw, 24px);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(16, 32, 24, 0.08), rgba(185, 150, 82, 0.1));
}
.print-sheet-frame {
  position: relative;
  width: var(--print-sheet-preview-width);
  height: var(--print-sheet-preview-height);
  overflow: hidden;
}
.print-sheet {
  width: 210mm;
  height: 297mm;
  display: grid;
  grid-template-columns: repeat(var(--print-cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--print-layout-rows), minmax(0, 1fr));
  gap: var(--print-sheet-gap);
  padding: var(--print-page-margin);
  background: white;
  border: 1px solid rgba(94, 72, 41, 0.16);
  box-shadow: 0 16px 48px rgba(24, 32, 24, 0.18);
  transform: scale(var(--print-preview-scale));
  transform-origin: top left;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.print-note-card {
  --print-note-color: #aa5551;
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: 6.8mm 5.2mm 4.8mm;
  color: var(--print-note-color);
  border: 1.7px solid currentColor;
  background: #fff;
  overflow: hidden;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.print-note-card::before {
  content: "";
  position: absolute;
  inset: 3.2mm;
  border: 0.7px solid currentColor;
  pointer-events: none;
}
.print-note-ornament {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 66%;
  color: currentColor;
  font-size: var(--print-ornament-size);
  line-height: 1;
  text-align: center;
  background: #fff;
}
.print-note-ornament.top { top: 1.3mm; }
.print-note-ornament.bottom { bottom: 1.2mm; transform: translateX(-50%) rotate(180deg); }
.print-side-ornament {
  position: absolute;
  top: 47%;
  color: currentColor;
  font-size: var(--print-ornament-size);
  line-height: 1;
  opacity: 0.82;
}
.print-side-ornament.left { left: 0.8mm; }
.print-side-ornament.right { right: 0.8mm; transform: scaleX(-1); }
.print-cross {
  min-height: calc(var(--print-cross-size) * 1.12);
  width: 100%;
  display: block;
  justify-self: stretch;
  margin: 0 0 1mm;
  color: currentColor;
  font-family: "Segoe UI Symbol", "Arial Unicode MS", Georgia, "Times New Roman", serif;
  font-size: var(--print-cross-size);
  font-weight: 700;
  line-height: 1;
  text-align: center;
}
.print-note-title {
  justify-self: center;
  width: 100%;
  max-width: calc(100% - 5mm);
  margin: 0 0 3mm;
  padding: 0 1mm 1mm;
  border-bottom: 0.4mm solid currentColor;
  color: currentColor;
  font-family: "Arial Narrow", "Segoe UI", Arial, sans-serif;
  font-size: var(--print-title-size);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  overflow: hidden;
}
.print-note-title.single-line-title {
  white-space: nowrap;
  word-break: keep-all;
}
.print-note-title.long-title {
  white-space: normal;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.print-title-line {
  display: block;
  width: 100%;
  text-align: center;
  white-space: nowrap;
}
.print-note-lines {
  justify-self: center;
  width: calc(100% - 4.8mm);
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(var(--print-note-rows), minmax(0, 1fr));
  gap: 0;
}
.print-name-row {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  border-bottom: 0.2mm solid color-mix(in srgb, currentColor 48%, transparent);
  font-family: var(--print-name-font);
  font-size: var(--print-name-size);
  font-weight: 700;
  line-height: 1.04;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: normal;
}
.print-name-row span {
  display: block;
  max-width: 100%;
}
.print-note-footer {
  margin-top: 2.4mm;
  color: color-mix(in srgb, currentColor 70%, #fff);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: clamp(10px, 1.15vw, 15px);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
}

.donate-section {
  display: block;
}
.donate-intro {
  max-width: 860px;
  margin-bottom: 32px;
}
.donate-intro h2 { max-width: 700px; }
.donate-intro p { max-width: 820px; }
.donate-section > *, .requisites, .requisites > div, .copy-row { min-width: 0; }
.requisites { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 14px; }
.requisites > div { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 250, 240, 0.72); }
.requisites .bank-details { grid-column: 1 / -1; }
.requisites .crypto-details { grid-column: 1 / -1; }
.requisites span, .requisites small, .contact-grid span { display: block; color: var(--muted); }
.requisites small + small { margin-top: 7px; }
.requisites strong { display: block; margin: 10px 0 8px; color: var(--green-900); font-family: "Segoe UI", Arial, sans-serif; font-size: clamp(18px, 2vw, 24px); }
.requisite-card .copy-row strong {
  flex: 1 1 auto;
  max-width: 100%;
  margin-bottom: 8px;
  white-space: nowrap;
  font-size: clamp(24px, 1.45vw, 31px);
  line-height: 1.1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.requisites .copy-status {
  grid-column: 1 / -1;
  padding: 0;
  min-height: 22px;
  color: var(--green-650);
  border: 0;
  background: transparent;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}
.copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.requisites .copy-row { display: flex; padding: 0; border: 0; background: transparent; }
.copy-row.compact {
  margin-top: 10px;
  align-items: flex-start;
}
.copy-row.compact span { overflow-wrap: anywhere; }
.crypto-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 20px;
  align-items: center;
}
.crypto-details img {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
}
.wallet-row {
  margin-top: 16px;
  align-items: flex-start;
}
.wallet-value {
  max-width: 100%;
  color: var(--green-900);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.copy-requisite {
  flex: 0 0 auto;
  max-width: 100%;
  min-height: 36px;
  padding: 0 13px;
  color: var(--green-900);
  border: 1px solid rgba(66, 106, 82, 0.26);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.88);
  cursor: pointer;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}
.copy-requisite:hover { border-color: rgba(185, 150, 82, 0.55); background: #fffdf8; }

.contacts-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.58fr) minmax(420px, 1.42fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: start;
  background: linear-gradient(135deg, #f4e8d3, #fffaf0);
}
.contacts-section h2 {
  max-width: 520px;
  font-size: clamp(34px, 3.1vw, 48px);
  line-height: 1.12;
  letter-spacing: 0;
}
.contact-grid { display: grid; gap: 14px; }
.contact-grid a, .contact-grid span {
  padding: 22px 24px;
  color: var(--green-900);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: clamp(17px, 1.3vw, 22px);
  line-height: 1.35;
  letter-spacing: 0;
}
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px clamp(20px, 6vw, 76px); color: rgba(255, 250, 240, 0.74); background: var(--green-950); }

@media (max-width: 980px) {
  .main-nav { display: none; }
  .intro-band, .two-column, .skete-section, .spring-section, .memo-layout, .donate-section, .contacts-section { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .hero-card { position: relative; right: auto; bottom: auto; margin: -56px 20px 34px; }
  .contacts-section h2 { max-width: 720px; }
}
@media (max-width: 1180px) {
  .memo-layout { grid-template-columns: 1fr; }
  .unified-notes-layout { grid-template-columns: 1fr; }
  .print-constructor-layout { grid-template-columns: 1fr; }
  .print-controls,
  .unified-preview-stack,
  .memo-preview {
    position: static;
  }
}
@media (max-width: 640px) {
  .site-header { align-items: flex-start; }
  .brand { min-width: 0; }
  .brand-emblem { width: 48px; height: 48px; }
  .header-cta { display: none; }
  .hero { min-height: 760px; }
  .hero-content { padding-top: 140px; }
  .intro-band, .segmented, .memo-type-grid, .segmented.service-kind, .psalter-options, .form-grid, .requisites, .preview-actions, .print-form-grid, .print-option-grid, .print-actions-panel, .unified-actions { grid-template-columns: 1fr; }
  .memo-step { padding: 16px; }
  .step-number { position: static; margin-bottom: 10px; }
  .print-constructor-block { padding: 14px; }
  .online-notes-block { padding: 14px; }
  .print-preview-column { padding: 10px; }
  .print-area { min-height: 420px; }
  .print-voice-box label { flex: 1 1 100%; }
  .requisites .bank-details { grid-column: auto; }
  .requisites .crypto-details { grid-column: auto; }
  .requisites .copy-status { grid-column: auto; }
  .copy-row { align-items: flex-start; flex-direction: column; }
  .copy-row.compact { gap: 10px; }
  .requisite-card .copy-row strong {
    white-space: nowrap;
    font-size: clamp(22px, 7vw, 30px);
  }
  .crypto-details { grid-template-columns: 1fr; }
  .crypto-details img { width: 180px; height: 180px; }
  .skete-photos { grid-template-columns: 1fr; }
  .skete-photos img, .spring-media img { min-height: 0; height: clamp(320px, 78vw, 480px); }
  .masonry-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    columns: initial;
  }
  .masonry-gallery figure { margin: 0; break-inside: auto; }
  .contacts-section h2 { font-size: 34px; }
  .contact-grid a, .contact-grid span { padding: 16px 18px; font-size: 16px; }
  .site-footer { flex-direction: column; }
}

@page { size: A4 portrait; margin: 0; }
@media print {
  body.printing-notes {
    width: 210mm;
    min-width: 0;
    margin: 0;
    background: white;
    overflow: visible;
  }
  body.printing-notes .site-header,
  body.printing-notes main > section:not(.notes-section),
  body.printing-notes .notes-section > .section-heading,
  body.printing-notes .online-notes-block,
  body.printing-notes .memo-layout,
  body.printing-notes .unified-note-form,
  body.printing-notes .memo-preview,
  body.printing-notes .pastoral-note,
  body.printing-notes .print-constructor-intro,
  body.printing-notes .print-controls,
  body.printing-notes .print-preview-head,
  body.printing-notes .site-footer {
    display: none !important;
  }
  body.printing-notes .notes-section,
  body.printing-notes .print-constructor-block,
  body.printing-notes .unified-notes-block,
  body.printing-notes .unified-notes-layout,
  body.printing-notes .unified-preview-stack,
  body.printing-notes .print-constructor-layout,
  body.printing-notes .print-preview-column,
  body.printing-notes .print-area {
    display: block;
    padding: 0;
    margin: 0;
    border: 0;
    background: white;
    box-shadow: none;
    overflow: visible;
  }
  body.printing-notes main,
  body.printing-notes .unified-preview-stack,
  body.printing-notes .print-preview-column {
    width: 210mm;
    max-width: 210mm;
    min-width: 0;
    position: static;
  }
  body.printing-notes .notes-section {
    min-height: 0;
  }
  body.printing-notes .print-sheet-frame {
    width: 210mm;
    height: 297mm;
    overflow: visible;
    break-after: page;
    page-break-after: always;
  }
  body.printing-notes .print-sheet {
    width: 210mm;
    height: 297mm;
    border: 0;
    box-shadow: none;
    transform: none;
  }
  body.printing-notes .print-sheet-frame:last-child {
    break-after: auto;
    page-break-after: auto;
  }
}
