/* 로그인 전 앱 첫 화면 (2026-10 리디자인) — 움직이는 첫 화면 · 흐르는 띠 · Our Sunday
   색은 공용 토큰(/ui/lux.css)을 그대로 씁니다: 어두운 화면 주황 · 밝은 화면 청록 */
:is(#lock, .lpx-host) .lpx, :is(#lock, .lpx-host) .lpx-sun { --lpx-ease: cubic-bezier(.2,.8,.2,1); }
:is(#lock, .lpx-host) .lpx {
  --lpx-orb1: rgba(210,81,31,.55); --lpx-orb2: rgba(30,138,148,.30);
  --lpx-band: #D2511F; --lpx-band-ink: #0D0C0B; --lpx-alt: #187780; --lpx-grain: .07;
  position: relative; isolation: isolate; overflow: hidden; margin-top: -4px;
}
html[data-theme="light"] :is(#lock, .lpx-host) .lpx {
  --lpx-orb1: rgba(70,189,198,.42); --lpx-orb2: rgba(242,107,33,.20);
  --lpx-band: #0E7882; --lpx-band-ink: #FFFFFF; --lpx-alt: #C24A1C; --lpx-grain: .05;
}

/* 배경 — 떠다니는 빛 · 결 · 격자 · 로고 선 */
:is(#lock, .lpx-host) .lpx-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
:is(#lock, .lpx-host) .lpx-orb { position: absolute; border-radius: 50%; filter: blur(64px); }
:is(#lock, .lpx-host) .lpx-orb.a { width: 420px; height: 420px; right: -160px; top: -120px; background: radial-gradient(circle, var(--lpx-orb1), transparent 68%); animation: lpx-drift-a 18s ease-in-out infinite alternate; }
:is(#lock, .lpx-host) .lpx-orb.b { width: 340px; height: 340px; left: -180px; top: 380px; background: radial-gradient(circle, var(--lpx-orb2), transparent 68%); animation: lpx-drift-b 22s ease-in-out infinite alternate; }
@keyframes lpx-drift-a { from { transform: translate(0,0) scale(1); } to { transform: translate(-70px,60px) scale(1.18); } }
@keyframes lpx-drift-b { from { transform: translate(0,0) scale(1.1); } to { transform: translate(80px,-40px) scale(.9); } }
:is(#lock, .lpx-host) .lpx-grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: var(--lpx-grain); mix-blend-mode: overlay; }
:is(#lock, .lpx-host) .lpx-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--lx-line) 1px, transparent 1px), linear-gradient(90deg, var(--lx-line) 1px, transparent 1px); background-size: 64px 64px; opacity: .5;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 75% 30%, #000, transparent 75%); mask-image: radial-gradient(ellipse 80% 55% at 75% 30%, #000, transparent 75%); }
:is(#lock, .lpx-host) .lpx-mark { position: absolute; right: -90px; top: 24px; width: 380px; height: auto; opacity: .45; color: var(--lx-acc-ink); animation: lpx-float 9s ease-in-out infinite alternate; }
:is(#lock, .lpx-host) .lpx-mark path, :is(#lock, .lpx-host) .lpx-mark line { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: lpx-draw 2.8s var(--lpx-ease) .35s forwards; }
:is(#lock, .lpx-host) .lpx-mark line { animation-delay: 1.4s; animation-duration: 1.6s; }
@keyframes lpx-draw { to { stroke-dashoffset: 0; } }
@keyframes lpx-float { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-14px) rotate(1deg); } }

/* 글 */
:is(#lock, .lpx-host) .lpx-in { padding-top: 28px; padding-bottom: 8px; }
:is(#lock, .lpx-host) .lpx-pill { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 6px 13px 6px 11px; border-radius: 999px; border: 1px solid var(--lx-line-2); background: var(--lx-chrome); color: var(--lx-ink-2); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
:is(#lock, .lpx-host) .lpx-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--lx-acc-ink); flex: none; }
:is(#lock, .lpx-host) .lpx-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--lx-acc-ink); animation: lpx-ping 1.8s ease-out infinite; }
@keyframes lpx-ping { from { transform: scale(1); opacity: .7; } to { transform: scale(3.2); opacity: 0; } }
:is(#lock, .lpx-host) .lpx-k { margin: 24px 0 0; font-family: var(--lx-serif); font-style: italic; font-weight: 400; font-size: clamp(30px, 4.4vw, 52px); line-height: 1; letter-spacing: -0.01em; color: var(--lx-acc-ink); }
:is(#lock, .lpx-host) .lpx-head { display: block; margin-top: 10px; }
/* 제목 — 두 마디(언제 · 어디서)로 나눠, 각 마디는 단어 단위로만 줄바꿈 (폰 4줄 · 넓은 화면 2~3줄) */
:is(#lock, .lpx-host) .lpx-h1 { display: block; margin: 0; font-size: clamp(30px, 8.6vw, 54px); line-height: 1.17; letter-spacing: -0.05em; font-weight: 800; color: var(--lx-ink); word-break: keep-all; }
:is(#lock, .lpx-host) .lpx-h1 .l1 { display: block; text-wrap: balance; }
:is(#lock, .lpx-host) .lpx-h1 .l2 { display: block; text-wrap: balance; }
:is(#lock, .lpx-host) .lpx-h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
:is(#lock, .lpx-host) .lpx-h1 .w > span { display: inline-block; animation: lpx-rise 1.1s var(--lpx-ease) both; animation-delay: var(--d, 0s); }
:is(#lock, .lpx-host) .lpx-h1 .acc { color: var(--lx-acc-ink); }
@keyframes lpx-rise { from { transform: translateY(105%); opacity: 0; } to { transform: none; opacity: 1; } }
:is(#lock, .lpx-host) .lpx-fade { animation: lpx-fade 1.2s var(--lpx-ease) both; animation-delay: var(--d, 0s); }
@keyframes lpx-fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
:is(#lock, .lpx-host) .lpx-map { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 15px; margin-top: 16px; border-radius: 999px; border: 1px solid var(--lx-acc-line); background: var(--lx-acc-soft); color: var(--lx-acc-ink); text-decoration: none; font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; }
:is(#lock, .lpx-host) .lpx-map svg { width: 15px; height: 15px; flex: none; }

:is(#lock, .lpx-host) .lpx-sermon { display: grid; grid-template-columns: 28px 1fr; gap: 12px; margin-top: 26px; max-width: 640px; padding: 16px 0; border-top: 1px solid var(--lx-line-2); border-bottom: 1px solid var(--lx-line); }
:is(#lock, .lpx-host) .lpx-sermon > svg { width: 24px; height: 24px; color: var(--lx-acc-ink); margin-top: 2px; }
:is(#lock, .lpx-host) .lpx-sermon .k { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--lx-ink-3); }
:is(#lock, .lpx-host) .lpx-sermon .k em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--lx-acc-ink); background: var(--lx-acc-soft); border: 1px solid var(--lx-acc-line); padding: 1px 8px; border-radius: 999px; }
:is(#lock, .lpx-host) .lpx-sermon b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 19px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.35; color: var(--lx-ink); word-break: keep-all; }
:is(#lock, .lpx-host) .lpx-sermon .s { display: block; font-size: 13.5px; color: var(--lx-ink-2); }
:is(#lock, .lpx-host) .lpx-sermon .s:empty { display: none; }

:is(#lock, .lpx-host) .lpx-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; max-width: 500px; }
:is(#lock, .lpx-host) .lpx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 16px; border-radius: 16px; color: #FFFFFF !important; text-decoration: none; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255,255,255,.16); transition: transform .35s var(--lpx-ease), box-shadow .35s var(--lpx-ease); }
:is(#lock, .lpx-host) .lpx-btn svg { width: 18px; height: 18px; flex: none; }
:is(#lock, .lpx-host) .lpx-btn.acc { background: var(--lx-acc-fill); box-shadow: 0 18px 40px -18px var(--lpx-orb1), inset 0 1px 0 rgba(255,255,255,.18); }
:is(#lock, .lpx-host) .lpx-btn.alt { background: var(--lpx-alt); }
:is(#lock, .lpx-host) .lpx-btn:hover, :is(#lock, .lpx-host) .lpx-map:hover { transform: translateY(-2px); }
:is(#lock, .lpx-host) .lpx-btn:active, :is(#lock, .lpx-host) .lpx-map:active { transform: scale(.98); }

/* 흐르는 띠 */
:is(#lock, .lpx-host) .lpx-ribbon { position: relative; margin: 34px 0 0; padding: 6px 0 20px; }
:is(#lock, .lpx-host) .lpx-band { transform: rotate(-3deg); margin: 0 -40px; padding: 13px 0; overflow: hidden; background: var(--lpx-band); color: var(--lpx-band-ink); box-shadow: 0 20px 40px -20px var(--lpx-orb1); }
:is(#lock, .lpx-host) .lpx-band2 { transform: rotate(2deg); margin: -6px -40px 0; padding: 10px 0; overflow: hidden; background: var(--lx-bg-2, var(--lx-surface)); border-top: 1px solid var(--lx-line-2); border-bottom: 1px solid var(--lx-line-2); color: var(--lx-ink-2); }
:is(#lock, .lpx-host) .lpx-track { display: flex; align-items: center; gap: 24px; width: max-content; white-space: nowrap; animation: lpx-marq 32s linear infinite; }
:is(#lock, .lpx-host) .lpx-track > span { flex: none; }
:is(#lock, .lpx-host) .lpx-band .lpx-track { font-size: clamp(28px, 3.8vw, 46px); font-weight: 900; letter-spacing: -0.035em; line-height: 1.1; }
:is(#lock, .lpx-host) .lpx-band .lpx-track .it { font-family: var(--lx-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
:is(#lock, .lpx-host) .lpx-band2 .lpx-track { gap: 18px; font-size: 14px; font-weight: 700; letter-spacing: .02em; animation-direction: reverse; animation-duration: 40s; }
@keyframes lpx-marq { to { transform: translateX(-50%); } }

/* Our Sunday — 세 단계 (가로 스크롤 없이) */
:is(#lock, .lpx-host) .lpx-sun { padding-top: 28px; scroll-margin-top: 72px; }
:is(#lock, .lpx-host) .lpx-sun .eb { margin: 0; font-family: var(--lx-serif); font-style: italic; font-size: 24px; color: var(--lx-acc-ink); }
:is(#lock, .lpx-host) .lpx-sun h2 { margin: 4px 0 0; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.15; letter-spacing: -0.045em; font-weight: 800; color: var(--lx-ink); word-break: keep-all; }
:is(#lock, .lpx-host) .lpx-sun .lede { margin: 12px 0 0; max-width: 40ch; font-size: 15px; line-height: 1.7; color: var(--lx-ink-2); word-break: keep-all; }
:is(#lock, .lpx-host) .lpx-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
:is(#lock, .lpx-host) .lpx-step { position: relative; overflow: hidden; display: grid; grid-template-columns: 62px 1fr; column-gap: 14px; align-items: center; padding: 18px 20px; border-radius: 22px; background: var(--lx-surface); border: 1px solid var(--lx-edge); box-shadow: var(--lx-spec), var(--lx-drop); color: var(--lx-ink); transition: transform .45s var(--lpx-ease), border-color .3s; }
:is(#lock, .lpx-host) .lpx-step .n { grid-row: 1 / span 3; font-size: 46px; font-weight: 800; letter-spacing: -0.06em; line-height: 1; color: var(--lx-acc-ink); }
:is(#lock, .lpx-host) .lpx-step .t { font-size: 12.5px; font-weight: 700; color: var(--lx-acc-ink); }
:is(#lock, .lpx-host) .lpx-step b { display: block; margin-top: 1px; font-size: 18px; letter-spacing: -0.03em; line-height: 1.3; }
:is(#lock, .lpx-host) .lpx-step .d { font-size: 14px; color: var(--lx-ink-2); word-break: keep-all; }
:is(#lock, .lpx-host) .lpx-step .n { align-self: start; }
:is(#lock, .lpx-host) .lpx-step:hover { transform: translateY(-4px); border-color: var(--lx-acc-line); }

/* 머리말 오른쪽 위 「로그인」 — 로그인 전 화면에서만 */
.lp-hlogin { display: none; }
html body:has(#lock:not([style*="none"]):not(.lp-off)) .shell > header .lp-hlogin {
  position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 64px; z-index: 6;
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 15px; box-sizing: border-box;
  border-radius: 999px; border: 1px solid var(--lx-edge-2); background: var(--lx-surface); color: var(--lx-ink);
  font-size: 14px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; box-shadow: var(--lx-spec), var(--lx-drop);
  transition: transform .15s var(--lx-ease);
}
html body:has(#lock:not([style*="none"]):not(.lp-off)) .shell > header .lp-hlogin svg { width: 15px; height: 15px; transition: transform .3s; }
html body:has(#lock:not([style*="none"]):not(.lp-off)) .shell > header .lp-hlogin:hover svg { transform: translateX(3px); }
html body:has(#lock:not([style*="none"]):not(.lp-off)) .shell > header .lp-hlogin:active { transform: scale(.95); }

/* 새가족 등록 · 계정 연결 중에는 첫 화면을 숨김 */
#lock.lp-off .lpx, #lock.lp-off .lpx-sun { display: none !important; }

/* 아래 칸들 — 스크롤하면 떠오름 (지원하는 브라우저만) · 예배안내는 Our Sunday 가 대신 */
:is(#lock, .lpx-host) #worship { display: none !important; }
@supports (animation-timeline: view()) {
  :is(#lock, .lpx-host) .lpx-step, #lock .lp-more .h-sec > h2, #lock .lp-more .h-card, #lock .lp-more .h-give > details {
    animation: lpx-fade linear both; animation-timeline: view(); animation-range: entry 0% entry 45%;
  }
}

/* 넓은 화면 */
@media (min-width: 720px) {
  :is(#lock, .lpx-host) .lpx-in { padding-top: 56px; }
  :is(#lock, .lpx-host) .lpx-mark { right: max(-120px, calc(50% - 720px)); top: 70px; width: min(760px, 60vw); opacity: .5; }
  :is(#lock, .lpx-host) .lpx-orb.a { width: 620px; height: 620px; }
  :is(#lock, .lpx-host) .lpx-orb.b { width: 520px; height: 520px; top: 420px; }
  :is(#lock, .lpx-host) .lpx-map { min-height: 46px; padding: 0 18px; font-size: 15px; margin-top: 20px; }
  :is(#lock, .lpx-host) .lpx-sermon { margin-top: 36px; grid-template-columns: 32px 1fr; padding: 20px 0; }
  :is(#lock, .lpx-host) .lpx-sermon b { font-size: 22px; }
  :is(#lock, .lpx-host) .lpx-acts { grid-template-columns: auto auto; justify-content: start; margin-top: 30px; }
  :is(#lock, .lpx-host) .lpx-btn { min-height: 58px; padding: 0 28px; border-radius: 18px; }
  :is(#lock, .lpx-host) .lpx-ribbon { margin-top: 48px; }
  :is(#lock, .lpx-host) .lpx-band { transform: rotate(-2deg); padding: 18px 0; }
  :is(#lock, .lpx-host) .lpx-band2 { transform: rotate(1.4deg); padding: 12px 0; }
  :is(#lock, .lpx-host) .lpx-band2 .lpx-track { font-size: 17px; gap: 28px; }
  :is(#lock, .lpx-host) .lpx-band .lpx-track { gap: 36px; }
  :is(#lock, .lpx-host) .lpx-sun { padding-top: 56px; }
  :is(#lock, .lpx-host) .lpx-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
  :is(#lock, .lpx-host) .lpx-step { display: flex; flex-direction: column; align-items: flex-start; min-height: 280px; padding: 28px; border-radius: 28px; }
  :is(#lock, .lpx-host) .lpx-step .n { font-size: 88px; line-height: .85; color: var(--lx-line-2); margin-bottom: auto; }
  :is(#lock, .lpx-host) .lpx-step .t { margin-top: 24px; font-size: 13px; }
  :is(#lock, .lpx-host) .lpx-step b { font-size: 24px; margin-top: 6px; }
  :is(#lock, .lpx-host) .lpx-step .d { margin-top: 6px; font-size: 14.5px; }
  :is(#lock, .lpx-host) .lpx-step:hover .n { color: var(--lx-acc-ink); }
}

/* 움직임 줄이기 설정을 켠 분 */
@media (prefers-reduced-motion: reduce) {
  :is(#lock, .lpx-host) .lpx *, :is(#lock, .lpx-host) .lpx *::before, :is(#lock, .lpx-host) .lpx *::after, :is(#lock, .lpx-host) .lpx-sun * { animation: none !important; transition: none !important; }
  :is(#lock, .lpx-host) .lpx-mark path, :is(#lock, .lpx-host) .lpx-mark line { stroke-dashoffset: 0; }
}
