/* ============================================================
   Limerick Press — Doorway warning splash (STOP / GO edition).
   First-visit overlay served on the homepage, the capsule/
   slideshow page, and the book-download page. Once the visitor
   taps GO the 'lp_doorway_ack' cookie is set for 90 days and
   the doorway never appears again on any page.

   Layout values dialed in via /tune/stopgo.html (2026-07-07 v2):
     TITLE-SIZE 33.5px  BODY-SIZE 22px
     TITLE-Y -9px       COPY-Y 0px
     STOP-X -29px  STOP-Y 20px    GO-X 23px  GO-Y 24px
     STOP arc text 20px  gap 0px below ball  (arc endpoints y=131)
     GO   arc text 20px  gap 0px above ball  (arc endpoints y=66)
   ============================================================ */
.lp-doorway {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 20px;
  background: rgba(26, 22, 20, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: lp-doorway-fade 200ms ease-out;
}
.lp-doorway.is-open { display: flex; }

.lp-doorway-card {
  position: relative;
  background: #f3eada;
  color: #1a2348;
  max-width: 420px;
  width: 100%;
  border-radius: 14px;
  padding: 26px 22px 26px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Never taller than the visible viewport (minus the overlay's 24px top/bottom
     padding). If Safari's aA text zoom (or a short phone) makes the content
     overflow, the card itself scrolls instead of spilling past the screen
     edges with no way to reach the buttons. 100dvh tracks the shrinking
     Safari toolbar; 100vh is the fallback. */
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.lp-doorway-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  font-size: 30px;                   /* TITLE-SIZE (was 33.5 — trimmed 2026-08-13 so the card fits under iOS aA text zoom) */
  text-align: center;
  margin: 0 0 10px;
  line-height: 1.15;
  color: #b3261e;
  transform: translateY(-9px);       /* TITLE-Y */
}

.lp-doorway-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  font-size: 20px;                   /* BODY-SIZE (was 22 — trimmed 2026-08-13) */
  line-height: 1.4;
  text-align: left;
  margin: 0 0 10px;
  color: #1a2348;
  transform: translateY(0px);        /* COPY-Y */
}
.lp-doorway-body strong { font-weight: 700; }

/* Inline GO-button dot inside the body paragraph */
.lp-doorway-inline-go {
  display: inline-block;
  width: 1.4em;
  height: 1.4em;
  vertical-align: -0.32em;
  margin: 0 0.1em;
}
.lp-doorway-inline-go svg { display: block; width: 100%; height: 100%; }

/* STOP / GO row */
.lp-doorway-stopgo {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  margin: 36px 0 48px;               /* trimmed from 56/32 on 2026-08-13; bottom must stay >=44px so the
                                        transformed STOP arc text paints inside the card's clip box */
}
.lp-doorway-cell {
  position: relative;
  width: 132px;
  height: 132px;
}
.lp-doorway-cell.stop { transform: translate(-29px, 20px); }  /* STOP-X, STOP-Y */
.lp-doorway-cell.go   { transform: translate(23px, 24px); }   /* GO-X,   GO-Y   */

.lp-doorway-btn {
  all: unset;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  inset: 0;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 800;
  font-size: 32px;
  letter-spacing: 0.08em;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
  cursor: pointer;
}
.lp-doorway-btn.stop { background: #c8102e; color: #ffffff; }
.lp-doorway-btn.go   { background: #24b400; color: #000000; }
.lp-doorway-btn:focus-visible {
  outline: 3px solid rgba(26, 35, 72, 0.55);
  outline-offset: 2px;
}

.lp-doorway-arc {
  position: absolute;
  top: -24px;
  left: -24px;
  width: 180px;
  height: 180px;
  overflow: visible;
  pointer-events: none;
}
.lp-doorway-arc text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
  fill: #1a2348;
}
.lp-doorway-arc.stop text { font-size: 20px; }     /* STOP-TEXT-SIZE */
.lp-doorway-arc.go   text { font-size: 20px; }     /* GO-TEXT-SIZE */

.lp-doorway-farewell {
  display: none;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: #1a2348;
  padding: 8px 4px;
}
.lp-doorway-farewell p { margin: 0; }
.lp-doorway-farewell-lead { font-size: 24.5px; font-weight: 900; line-height: 1.3; }
.lp-doorway-farewell-accident { margin-top: 29px !important; }
.lp-doorway-farewell-promise { margin-top: 16px !important; }

/* Green GO chip on the farewell screen — inline with the accident copy,
   reading as part of the sentence ("...you can still tap [go] to visit..."). */
.lp-doorway-farewell-go {
  all: unset;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 2px;
  vertical-align: 0px;
  border-radius: 50%;
  background: #24b400;
  color: #000000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 800;
  font-size: 15.5px;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
}
.lp-doorway-farewell-go:focus-visible {
  outline: 3px solid rgba(26, 35, 72, 0.55);
  outline-offset: 2px;
}
.lp-doorway.is-farewell .lp-doorway-title,
.lp-doorway.is-farewell .lp-doorway-body,
.lp-doorway.is-farewell .lp-doorway-stopgo { display: none; }
.lp-doorway.is-farewell .lp-doorway-farewell { display: block; }

@keyframes lp-doorway-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Prevent body scroll while doorway is open */
body.lp-doorway-open { overflow: hidden; }
