/* 업데이트 2 「흔적을 나누다」: 감사 나누기·감사의 벽 목록·함께 기도해 주세요·함께 기도해요.
   스펙 specs/2026-11-18-online-church-update2/design.md. 지금 앱의 창·단추 결(app.css)을 따른다. 누르는 곳 44px 이상, 본문 16px 이상 */

/* ---------- 감사 노트: 교회와 나누기 ---------- */
#share-box .check { min-height: 48px; }      /* 통합판 검수 하13 */
#share-box { margin-top: 12px; padding-top: 4px; border-top: 1px solid rgba(61, 33, 15, 0.16); }
#share-box[hidden], #share-help[hidden] { display: none; }
#thanks #share-note { font-size: 16px; line-height: 1.5; opacity: 1; color: var(--ink-2); }
#thanks #share-count { font-size: 14px; opacity: 1; color: var(--ink-2); }
#thanks #share-count.over { color: #A63A22; font-weight: 700; }
#share-help { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #FFF1E2; border: 2px solid #E9A23B; }
#share-help p { margin: 0; font-size: 16px; line-height: 1.55; word-break: keep-all; }
#share-help p + p { margin-top: 6px; }
#share-help a.tel { display: inline-block; min-width: 48px; text-align: center; padding: 13px 8px; margin: -13px 0; font-weight: 800; color: #A63A22; }      /* 줄 간격은 그대로, 누르는 곳은 44px */
#thanks .others { margin-top: 12px; background: #FBF4E4; border: 2px solid var(--line); }

/* ---------- 감사의 벽 목록 창 ---------- */
#thanks-wall { width: min(440px, calc(100% - 32px)); max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; }
#thanks-wall .eyebrow { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: #B5482E; }
#thanks-wall h2 { margin: 0 0 8px; font-family: "MaruBuri", "AppleMyungjo", "Noto Serif KR", serif; font-size: 28px; }
#thanks-wall > .small { font-size: 14px; opacity: 1; color: var(--ink-2); }
#thanks-wall .state { margin: 16px 0 4px; font-size: 17px; line-height: 1.55; word-break: keep-all; }
#thanks-wall .state[hidden] { display: none; }
#thanks-wall-list { margin: 12px 0 0; padding: 0; list-style: none; }
#thanks-wall-list li { padding: 14px 0 10px; border-top: 1px solid rgba(61, 33, 15, 0.2); }
#thanks-wall-list .who { margin: 0; font-size: 15px; color: var(--ink-2); }
#thanks-wall-list .text { margin: 4px 0 8px; font-size: 18px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
#thanks-wall-list .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#thanks-wall-list .acts button { display: inline-flex; align-items: center; width: auto; margin: 0; min-height: 48px; }      /* 통합판 검수 하13: 48px */
#thanks-wall-list .amen { padding: 0 20px; background: #F0DDB4; border: 2px solid var(--line); font-size: 16px; }
#thanks-wall-list .amen[aria-disabled="true"] { background: transparent; border-color: rgba(61, 33, 15, 0.55); color: var(--ink-2); cursor: default; }
#thanks-wall-list .down { padding: 0 8px; background: transparent; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
#thanks-wall-list .down[hidden] { display: none; }
#thanks-wall-list .down-note { margin: 6px 0 0; font-size: 15px; font-weight: 600; color: var(--ink-2); }      /* 재검수 R10 */

/* ---------- 기도 카드: 함께 기도해 주세요 ---------- */
#ask-box { margin-top: 12px; }
#ask-box[hidden], #ask-pick[hidden] { display: none; }
#btn-ask { background: #FBF4E4; border: 2px solid var(--line); }
#ask-pick .lead, #ask-pray .lead { margin: 4px 0 4px; font-size: 17px; font-weight: 700; line-height: 1.5; word-break: keep-all; }
#ask-pick .small { font-size: 14px; opacity: 1; color: var(--ink-2); }
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.topic-grid button { margin: 0; white-space: normal; line-height: 1.3; padding: 6px 10px; word-break: keep-all; background: #F0DDB4; }
.topic-grid button.asked { background: transparent; border: 2px dashed rgba(61, 33, 15, 0.45); color: var(--ink-2); }

/* ---------- 기도 칸: 함께 기도하기 ---------- */
#btn-askpray { width: 100%; margin-top: 8px; white-space: normal; line-height: 1.25; font-size: 14px; padding: 4px 10px; background: #FBF4E4; border: 2px solid var(--line); }

/* ---------- 함께 기도해요 창 ---------- */
#ask-pray { width: min(400px, calc(100% - 32px)); max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; }
#ask-pray > .small { font-size: 14px; opacity: 1; color: var(--ink-2); }
#ask-pray-list[hidden], #ask-pray-ok[hidden] { display: none; }
#ask-pray .ask-row { display: grid; grid-template-columns: 44px 1fr; grid-template-areas: 'fruit name' 'fruit why'; align-items: center; column-gap: 12px; row-gap: 0; text-align: left; white-space: normal; padding: 8px 16px; border-radius: 14px; background: #F0DDB4; }
/* 열두 번째 묶음: 주제 픽토그램을 품은 열매(기도나무와 같은 그림). 익을수록 그림 안에서 커진다. 부탁이 없는 주제는 빈 점선 동그라미 */
#ask-pray .fruit { display: block; width: 44px; height: 44px; }
#ask-pray .fruit svg { display: block; width: 100%; height: 100%; }
#ask-pray .ask-row .fruit { grid-area: fruit; }
#ask-pray .ask-row:disabled .fruit { width: 28px; height: 28px; margin: 8px; border: 2px dashed rgba(61, 33, 15, 0.45); border-radius: 50%; box-sizing: border-box; }
#my-fruit { margin: 12px 0 4px; padding: 12px 16px; border-radius: 14px; background: #FBF4E4; border: 2px solid rgba(61, 33, 15, 0.22); }
#my-fruit[hidden] { display: none; }
#my-fruit h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--line); }
#my-fruit .mine-row { display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; align-items: center; min-height: 56px; }
#my-fruit .mine-row .fruit { width: 56px; height: 56px; }
#my-fruit p { margin: 0; font-size: 16px; line-height: 1.45; word-break: keep-all; }
#my-fruit p.small { font-size: 14px; opacity: 1; color: var(--ink-2); }
#ask-pray .ask-row .name { grid-area: name; font-size: 17px; font-weight: 700; line-height: 1.35; }
#ask-pray .ask-row .why { grid-area: why; margin: 0; font-size: 14px; font-weight: 600; line-height: 1.35; opacity: 1; color: var(--ink-2); }
#ask-pray .ask-row:disabled { background: transparent; border: 1px solid rgba(61, 33, 15, 0.22); cursor: default; }
#ask-pray .ask-row:disabled .name { color: var(--ink-2); font-weight: 600; }
#ask-pray .go { background: #E9A23B; box-shadow: 0 3px 0 var(--line); }
.lamp { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(61, 33, 15, 0.7);      /* 꺼진 등도 테두리 3:1 이상(2026-11-18 검수) */ background: transparent; }
.lamp[data-level="1"] { border-color: #C98A1E; background: rgba(242, 181, 68, 0.45); }
.lamp[data-level="2"] { border-color: #C98A1E; background: rgba(242, 181, 68, 0.8); box-shadow: 0 0 6px rgba(242, 181, 68, 0.7); }
.lamp[data-level="3"] { border-color: #C98A1E; background: #F2B544; box-shadow: 0 0 10px 2px rgba(242, 181, 68, 0.85); }

/* 재검수 R14: 낮은 화면(큰 글자 320×700 등)에서 나누기를 켜도 [감사 적기]가 첫 화면에 — 글 칸을 두 줄 높이로 시작하고 안내 간격을 줄인다 */
@media (max-height: 760px) {
  #thanks:has(#share-on:checked) #thanks-text { height: calc(1.5em * 2 + 20px); min-height: 0; }
  #thanks:has(#share-on:checked) .eyebrow { display: none; }
  #thanks:has(#share-on:checked) #share-box { margin-top: 8px; }
  #thanks:has(#share-on:checked) #share-note { margin-top: 2px; line-height: 1.4; }
}

@media (max-height: 620px) {      /* 아주 낮은 화면(320×568 큰 글자): 글 칸 한 줄, 창 안쪽 여백을 줄인다 */
  #thanks:has(#share-on:checked) { padding-top: 16px; padding-bottom: 16px; }
  #thanks:has(#share-on:checked) #thanks-text { height: calc(1.5em + 20px); }
  #thanks:has(#share-on:checked) h2 { margin-bottom: 4px; font-size: 24px; }
  #thanks:has(#share-on:checked) #share-note { font-size: 15px; }
}

/* ---------- 움직임: 등장 expo-out, transform·opacity만. 움직임 줄이기면 없음 ---------- */
@media (prefers-reduced-motion: no-preference) {
  #thanks-wall[open], #ask-pray[open] { animation: tr-in 240ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  #thanks-wall-list li:nth-child(-n + 3) { animation: tr-in 240ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  #thanks-wall-list li:nth-child(2) { animation-delay: 40ms; }
  #thanks-wall-list li:nth-child(3) { animation-delay: 80ms; }
  #ask-pick:not([hidden]), #ask-pray-ok:not([hidden]), #share-help:not([hidden]) { animation: tr-in 240ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  #thanks-wall-list .amen.just { animation: tr-press 160ms cubic-bezier(0.16, 1, 0.3, 1); }
}
@keyframes tr-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes tr-press { from { transform: scale(0.96); } }

/* ---------- 로비 필경대 주보(2026-11-19): 링크만 건네는 작은 창 ---------- */
#bulletin { width: min(360px, calc(100% - 32px)); }
#bulletin .eyebrow { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: #B5482E; }
#bulletin h2 { margin: 0 0 8px; font-family: "MaruBuri", "AppleMyungjo", "Noto Serif KR", serif; font-size: 26px; }
#bulletin .which { margin: -8px 0 16px; font-size: 16px; font-weight: 700; color: var(--ink-2); }
#bulletin .which[hidden] { display: none; }
#bulletin .lead { margin: 0 0 16px; font-size: 17px; line-height: 1.55; word-break: keep-all; }
#bulletin a.go { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 999px; background: #E9A23B; box-shadow: 0 3px 0 var(--line); color: var(--ink); font-size: 17px; font-weight: 800; text-decoration: none; }
#bulletin a.go:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#bulletin > .small { margin: 8px 0 0; font-size: 14px; opacity: 1; color: var(--ink-2); text-align: center; }
@media (prefers-reduced-motion: no-preference) { #bulletin[open] { animation: tr-in 240ms cubic-bezier(0.16, 1, 0.3, 1) both; } }

/* ---------- 기도나무 이름표(화면 위 단추, 재검수 Q3): 나무 꼭대기를 따라가되 화면 가장자리 안쪽에 머문다 ---------- */
#tree-tag { position: fixed; left: 0; top: 0; z-index: 5; display: grid; justify-items: center; gap: 0; min-height: 48px; min-width: 48px; padding: 4px 12px;
  border: 2px solid rgba(61, 33, 15, 0.55); border-radius: 14px; background: rgba(251, 246, 236, 0.92); color: #5A3A1E; line-height: 1.2; white-space: nowrap; will-change: transform; }
#tree-tag[hidden] { display: none; }
#tree-tag .nm { font-size: 17px; font-weight: 800; }
#tree-tag .sub { font-size: 13px; font-weight: 700; color: #8A5A2B; }
#tree-tag:focus { outline: none; }
#tree-tag:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }      /* 키보드일 때만 */
:root[data-text="large"] #tree-tag { min-height: 56px; padding: 6px 14px; }      /* 큰 글자: 54px 넘게, 글자도 크게 */
:root[data-text="large"] #tree-tag .nm { font-size: 20px; }
:root[data-text="large"] #tree-tag .sub { font-size: 15px; }
/* 함께 기도해요 창 [닫기]를 늘 보이게(재검수 Q4, 예배 카드와 같은 꼴) */
#ask-pray > form:last-of-type { position: sticky; bottom: -24px; margin: 8px -24px -24px; padding: 4px 24px 16px; background: #FBF4E4; border-top: 2px solid rgba(61, 33, 15, 0.15); }
:root[data-text="large"] #ask-pray > form:last-of-type { margin: calc(8px / 1.125) calc(-24px / 1.125) calc(-24px / 1.125); padding: 4px calc(24px / 1.125) calc(16px / 1.125); bottom: calc(-24px / 1.125); }      /* 큰 글자 확대(1.125배)가 음수 여백도 키워 가로 3px 넘쳤다 */

/* 열두 번째 묶음: 교회 기도 제목 목록의 불빛 점 → 작은 열매(뜻은 그대로 이번 주 아멘 단계. 0도 풋열매로 "기다려요"). 색만이 아니라 크기도 달라진다 */
#topics-list button[data-topic-id] { grid-template-columns: 28px 1fr; }
#topics-list .lamp, #topics-list button[data-lamp] .lamp { width: 28px; height: 28px; border: 0; border-radius: 0; box-shadow: none; background: center / contain no-repeat; }
#topics-list button[data-lamp="0"] .lamp { background-image: url("data:image/svg+xml,<svg viewBox='-3 -3 70 70' xmlns='http://www.w3.org/2000/svg'><path d='M32 27 Q33 19 36 16' stroke='%233D210F' stroke-width='2.4' fill='none' stroke-linecap='round'/><circle cx='32' cy='38' r='16.6' fill='%23FFFBF2'/><circle cx='32' cy='38' r='13' fill='%23D8EE7A' stroke='%233D210F' stroke-width='2.2'/><path d='M33 22 q10 -10 18 -4 q-8 10 -18 4z' fill='%234E8A3A' stroke='%233D210F' stroke-width='1.6' stroke-linejoin='round'/></svg>"); }
#topics-list button[data-lamp="1"] .lamp { background-image: url("data:image/svg+xml,<svg viewBox='-3 -3 70 70' xmlns='http://www.w3.org/2000/svg'><path d='M32 23 Q33 15 36 12' stroke='%233D210F' stroke-width='2.4' fill='none' stroke-linecap='round'/><circle cx='32' cy='38' r='20.6' fill='%23FFFBF2'/><circle cx='32' cy='38' r='17' fill='%23F2D64B' stroke='%233D210F' stroke-width='2.2'/><path d='M33 18 q10 -10 18 -4 q-8 10 -18 4z' fill='%234E8A3A' stroke='%233D210F' stroke-width='1.6' stroke-linejoin='round'/></svg>"); }
#topics-list button[data-lamp="2"] .lamp { background-image: url("data:image/svg+xml,<svg viewBox='-3 -3 70 70' xmlns='http://www.w3.org/2000/svg'><path d='M32 19 Q33 11 36 8' stroke='%233D210F' stroke-width='2.4' fill='none' stroke-linecap='round'/><circle cx='32' cy='38' r='24.6' fill='%23FFFBF2'/><circle cx='32' cy='38' r='21' fill='%23F0A23A' stroke='%233D210F' stroke-width='2.2'/><path d='M33 14 q10 -10 18 -4 q-8 10 -18 4z' fill='%234E8A3A' stroke='%233D210F' stroke-width='1.6' stroke-linejoin='round'/></svg>"); }
#topics-list button[data-lamp="3"] .lamp { background-image: url("data:image/svg+xml,<svg viewBox='-3 -3 70 70' xmlns='http://www.w3.org/2000/svg'><path d='M32 15 Q33 7 36 4' stroke='%233D210F' stroke-width='2.4' fill='none' stroke-linecap='round'/><circle cx='32' cy='38' r='28.6' fill='%23FFFBF2'/><circle cx='32' cy='38' r='25' fill='%23A62A1C' stroke='%233D210F' stroke-width='2.2'/><path d='M33 10 q10 -10 18 -4 q-8 10 -18 4z' fill='%234E8A3A' stroke='%233D210F' stroke-width='1.6' stroke-linejoin='round'/></svg>"); }

/* ---------- 열네 번째 묶음: 마당 성탄 장면 말씀 창 ---------- */
/* 2026-11-25 기획자 "폰트가 너무 크다": 앱 공통 크기(제목 20 · 본문 17 · 보조 16 · 작은 글 14, 주요 단추 56)로 맞춤 */
#nativity { width: min(400px, calc(100% - 32px)); max-height: calc(100% - 48px); overflow-y: auto; overscroll-behavior: contain; }
#nativity .eyebrow { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: #B5482E; }
#nativity h2 { margin: 0 0 12px; font-family: "MaruBuri", "AppleMyungjo", "Noto Serif KR", serif; font-size: 20px; line-height: 1.4; word-break: keep-all; }
#nativity .nat-verse { margin: 0 0 16px; padding: 16px; border-radius: 14px; background: #FFF1D6; border: 2px solid #E9A23B; }
#nativity .nat-text { margin: 0; font-size: 17px; line-height: 1.75; font-weight: 500; word-break: keep-all; }
#nativity .nat-ref { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
#nativity .nat-love { margin: 0 0 4px; font-size: 17px; font-weight: 700; }
#nativity .nat-church { margin: 0 0 16px; font-size: 16px; line-height: 1.55; word-break: keep-all; color: var(--ink-2); }
#nativity a.nat-go { display: flex; align-items: center; justify-content: center; min-height: 56px; margin-bottom: 4px; }
#nativity a.nat-go[hidden] { display: none; }
:root[data-text="large"] #nativity > * { zoom: 1.125; }
@media (prefers-reduced-motion: no-preference) {
  #nativity[open] { animation: tr-in 240ms cubic-bezier(0.16, 1, 0.3, 1) both; }
}

/* 로비 중보기도함 갈림 단추 아래 설명 한 줄(모체 UX 점검 U2 2026-11-25) */
#ask-lobby .ask-lobby-note { margin: 4px 0 16px; font-size: 14px; text-align: center; color: var(--ink-2); }
#ask-lobby .ask-lobby-note[hidden] { display: none; }
