:root {
  --order-ink: #1d4ea6;
  --order-deep: #163d86;
  --order-paper: #fff;
  --order-wash: #eef3fb;
  --font-ui: "Noto Sans KR", "Malgun Gothic", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

.worship-body {
  min-height: 100vh;
  overflow-x: clip;
  word-break: keep-all;
  overflow-wrap: anywhere;
  color: var(--order-ink);
  font-family: var(--font-ui);
  background:
    radial-gradient(80% 50% at 50% -10%, rgb(29 78 166 / 0.08), transparent 62%),
    var(--order-wash);
}

.order {
  width: min(860px, calc(100% - 24px));
  margin: 0 auto;
  padding: 8px 0 12px;
}

.order__viewport {
  min-height: 0;
}

.order-sheet {
  background: var(--order-paper);
  min-height: min(92vh, 1100px);
  padding: 48px 68px 28px;
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgb(22 61 134 / 0.06),
    0 18px 40px rgb(22 61 134 / 0.12);
}

.order-sheet[hidden] {
  display: none !important;
}

.order-sheet__kicker {
  margin: 0 0 18px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.order-sheet h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.04em;
}

.order-sheet__bar {
  margin: 28px 0 8px;
  text-align: center;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.order-sheet__bar::before,
.order-sheet__bar::after {
  content: "|";
  margin: 0 10px;
  font-weight: 500;
}

.order-tri {
  width: min(340px, 100%);
  margin: 28px auto 36px;
}

.order-tri svg {
  display: block;
  width: 100%;
  height: auto;
}

.order-sheet__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-top: auto;
}

.order-sheet__foot p {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.order-sheet__foot a {
  color: inherit;
  text-decoration: none;
}

.hc-logo {
  text-align: right;
  color: #222;
  flex: 0 0 auto;
}

.hc-logo__en {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hc-logo__en b {
  color: #c1272d;
  margin: 0 2px;
  font-size: 22px;
}

.hc-logo__sub {
  margin: 2px 0 4px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #666;
}

.hc-logo__ko {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.order-sheet__end {
  margin: 36px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: #5d7ab8;
}

.order-sheet__title {
  margin: 8px 0 28px;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.order-sheet__title::before,
.order-sheet__title::after {
  content: "|";
  margin: 0 10px;
  font-weight: 500;
}

.order-checks {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.order-checks li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.order-checks li::before {
  content: "✓";
  display: inline-flex;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--order-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.order-block {
  padding: 8px 0 8px;
}

.order-block h3 {
  display: inline-block;
  margin: 0 0 14px;
  padding-top: 16px;
  border-top: 3px solid var(--order-ink);
  min-width: 220px;
  font-size: 18px;
  font-weight: 700;
}

.order-block p {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: -0.03em;
}

.order-churches {
  margin: 0;
  padding: 0 0 0 1.8em;
  columns: 2;
  column-gap: 2.5em;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: -0.03em;
}

.order-churches li {
  break-inside: avoid;
  padding-left: 0.2em;
}

.order-churches li::marker {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.order-notes {
  margin: 0;
  padding: 0 0 0 1.1em;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: -0.03em;
}

.order-notes > li {
  margin: 0 0 10px;
}

.order-notes ul {
  margin: 8px 0 0;
  padding: 0 0 0 1.15em;
  list-style: circle;
}

.order-notes a {
  color: inherit;
}

.order__dir {
  position: fixed;
  top: calc(50% + 28px);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.55);
  background: rgb(29 78 166 / 0.38);
  color: #fff;
  font-size: 0;
  text-decoration: none;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgb(22 61 134 / 0.12);
}

.order__dir:hover,
.order__dir:focus-visible {
  background: rgb(29 78 166 / 0.7);
}

.order__dir.is-prev {
  left: max(10px, calc(50% - min(430px, calc(50% - 12px)) + 8px));
}

.order__dir.is-next {
  right: max(10px, calc(50% - min(430px, calc(50% - 12px)) + 8px));
}

.order__dir::before {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
}

.order__dir.is-prev::before {
  transform: rotate(135deg);
  margin-left: 4px;
}

.order__dir.is-next::before {
  transform: rotate(-45deg);
  margin-right: 4px;
}

.order__dir.is-off {
  opacity: 0.42;
  box-shadow: none;
  pointer-events: none;
}

.order__pager {
  margin: 0;
  padding: 0;
}

@media (max-width: 720px) {
  .order {
    width: 100%;
    padding: 0 0 max(20px, env(safe-area-inset-bottom));
  }

  .order-sheet {
    min-height: 0;
    padding: 24px 52px 28px;
    border-radius: 0;
    box-shadow: none;
  }

  .order-sheet h1 {
    font-size: clamp(22px, 7vw, 28px);
  }

  .order-sheet__kicker {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .order-sheet__bar {
    margin: 18px 0 4px;
    font-size: 16px;
  }

  .order-tri {
    width: min(260px, 100%);
    margin: 16px auto 24px;
  }

  .order-sheet__title {
    margin: 4px 0 18px;
    font-size: 22px;
  }

  .order-sheet__foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .order-sheet__foot p {
    font-size: 13px;
  }

  .hc-logo {
    text-align: left;
  }

  .order-checks li {
    align-items: flex-start;
    font-size: 15px;
    gap: 10px;
  }

  .order-block h3 {
    min-width: 0;
    font-size: 16px;
  }

  .order-block p,
  .order-notes,
  .order-churches {
    font-size: 14px;
  }

  .order-sheet__end {
    font-size: 11px;
    margin-top: 24px;
  }

  .order__dir {
    width: 40px;
    height: 40px;
    top: 50%;
  }

  .order__dir.is-prev {
    left: max(6px, env(safe-area-inset-left));
  }

  .order__dir.is-next {
    right: max(6px, env(safe-area-inset-right));
  }
}

@media print {
  .worship-body {
    background: #fff;
  }

  .order__dir,
  .order__pager {
    display: none !important;
  }

  .order-sheet[hidden] {
    display: none !important;
  }

  .order,
  .order__viewport,
  .order-sheet {
    width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
    min-height: 0;
  }
}
