/* 팔복 이스터에그 "여덟 매듭의 복"(beatitudes.js): 화면 전체, 테마색을 따른다. 공동체 화면과 기도 노트가 함께 쓴다 */
html.bt-open { overflow: hidden; }
/* 끈 화면은 누를 때마다 넘어가니, 빠르게 눌러도 확대되지 않게(아이폰) */
.bt, .bt-gift { touch-action: manipulation; }
.bt { position: fixed; inset: 0; z-index: 130; background: var(--page); color: var(--ink); display: flex; flex-direction: column; }
.bt-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 4px; }
.bt-title { font-family: var(--f-display); font-weight: 700; color: var(--accent); }
.bt-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.bt-x svg { width: 22px; height: 22px; }
.bt-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px 16px; overflow-y: auto; cursor: pointer; }
.bt-body { width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.bt-cord { width: 100%; max-width: 560px; height: auto; overflow: visible; }
.bt-end, .bt-seg path { fill: none; stroke-width: 3; stroke-linecap: round; }
.bt-end { stroke: var(--line-strong); }
.bt-seg .loose { stroke: var(--line-strong); transition: opacity .5s; }
.bt-seg .taut { stroke: var(--accent); opacity: 0; transition: opacity .5s; }
.bt-seg.on .loose { opacity: 0; } .bt-seg.on .taut { opacity: 1; }
.bt-slot { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 3 3; }
.bt-k.tied .bt-slot { stroke-dasharray: none; stroke: var(--accent-mid); }
.bt-k.sel .bt-slot { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: none; }
.bt-k text { fill: var(--ink-2); font-size: 11px; }
.bt-k.sel text { fill: var(--accent); font-weight: 700; }
.bt-k { cursor: pointer; }
.bt-kn { opacity: 0; }
.bt-k.tied .bt-kn { opacity: 1; }
.bt-kn path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.bt-kbg { fill: var(--accent-soft); }
.bt.taut .bt-kbg { fill: var(--accent); }
.bt.taut .bt-kn path { stroke: var(--on-accent); }
.bt-kn.fresh { transform-box: fill-box; transform-origin: center; animation: bt-pop .7s cubic-bezier(.3, 1.6, .5, 1); }
.bt-line { min-height: 11em; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.bt-ref { margin: 0; color: var(--accent); font-size: .85rem; font-weight: 600; }
.bt-text { margin: 0; font-family: var(--f-display); font-size: clamp(1.3rem, 4.4vw, 1.8rem); line-height: 1.55; word-break: keep-all; text-wrap: balance; }
.bt-plain { margin: 0; color: var(--ink-2); font-size: 1rem; line-height: 1.6; word-break: keep-all; text-wrap: balance; }
.bt-hint { margin: 0; font-family: var(--f-display); font-size: 1.2rem; color: var(--ink-2); }
.bt-fin { padding-top: 14px; border-top: 1px solid var(--line); width: 100%; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.bt-fin[hidden] { display: none; }
.bt-fin.fresh { animation: bt-rise .9s cubic-bezier(.2, .7, .3, 1); }
.bt-light { margin: 0; font-family: var(--f-display); font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 700; color: var(--accent); }
.bt-foot { margin: 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom, 0px)); text-align: center; color: var(--ink-2); font-size: .92rem; line-height: 1.6; }
.bt-foot small { font-size: .8rem; opacity: .85; }
/* 기도한 날이 8의 배수가 된 날 한 번 뜨는 작은 카드 */
.bt-gift { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 40; width: min(420px, calc(100% - 32px)); box-sizing: border-box;
  padding: 16px; border: 1px solid var(--accent-mid); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 10px 30px var(--shadow);
  display: flex; flex-direction: column; gap: 6px; text-align: center; animation: bt-gift .6s cubic-bezier(.2, .7, .3, 1); }
.bt-g-day { margin: 0; font-weight: 700; }
.bt-gift .bt-text { font-size: 1.15rem; }
.bt-gift .bt-plain { font-size: .9rem; }
.bt-g-full { color: var(--accent); }
.bt-g-btns { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
/* 로고를 세 번 이상 이어 누르면 매듭 모양이 살짝 흔들려요(숨은 힌트) */
.brand-mark.bt-wig { animation: bt-wig .7s ease-in-out; }
@keyframes bt-pop { 0% { opacity: 0; transform: scale(.3) rotate(-40deg); } 100% { opacity: 1; transform: none; } }
@keyframes bt-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes bt-gift { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes bt-wig { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 45% { transform: rotate(11deg); } 70% { transform: rotate(-6deg); } }
@media (max-height: 560px) { .bt-line { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .bt *, .bt-gift, .brand-mark.bt-wig { animation: none !important; transition-duration: 1ms !important; } }
