:root {
  --ink: #0E2F2D;
  --paper: #F6F3EC;
  --accent: #125D59;
  --line: #3D210F;      /* 본당 외곽선과 같은 갈색 */

  /* 크기 기준: 샘물 디자인 시스템(원티드 기반, ~/Work/saemmool/project/tokens) 원본 값(2026-11-13 기획자 결정).
     색은 본당 고유 톤을 쓰고, 글자·높이·모서리·간격만 맞춘다. 큰 글자는 맨 아래 [data-text="large"] 절 */
  --t-hero: 24px;        /* 큰 제목(title-3) */
  --t-title: 20px;       /* 창 제목(heading) */
  --t-sub: 17px;         /* 단추·주요 글자(subtitle) */
  --t-body: 16px;        /* 본문(body) */
  --t-chip: 15px;        /* 고르는 칸 */
  --t-label: 14px;       /* 항목 이름(label) */
  --t-caption: 14px;     /* 안내 글 */
  --lh-body: 1.5;
  --h-btn: 48px;         /* 단추·칸 높이(누르는 곳 하한) */
  --h-cta: 56px;         /* 주요 동작 */
  --r-btn: 11px;         /* 단추 */
  --r-card: 16px;        /* 카드 */
  --r-sheet: 20px;       /* 아래에서 올라오는 창 */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --ink-2: #6B4F3A;      /* 보조 글자(바탕 #FBF4E4 대비 6.8:1). 흐림(opacity) 대신 쓴다 */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: "Pretendard Variable", Pretendard, "Noto Sans KR", system-ui, sans-serif;   /* 2026-11-18 글꼴을 사이트에 함께 싣는다(assets/fonts/pretendard, OFL) */
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;      /* 아이폰 사파리가 글자를 스스로 키우지 않게(기기마다 띠 글자 크기가 달라지는 길을 막는다, 2026-11-14 검수) */
  text-size-adjust: 100%;
}

#app {
  position: fixed;
  inset: 0;
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#fallback {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  font-size: 18px;
  text-align: center;
}

#fallback[hidden] { display: none; }

/* 화면 가장자리를 살짝 눌러 가운데(강단)로 눈이 가게 한다 */
#app::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 46%, rgba(40, 22, 8, 0) 58%, rgba(40, 22, 8, 0.2) 100%);
}

/* ---------- 화면 위 단추 띠 ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
#hud[hidden] { display: none; }
.bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  max-width: calc(100% - 24px);
  background: rgba(246, 243, 236, 0.9);
  border-radius: 999px;
  pointer-events: auto;
  animation: rise 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bar.top { top: calc(12px + env(safe-area-inset-top)); }
.bar.bottom { bottom: calc(16px + env(safe-area-inset-bottom)); }
@keyframes rise { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }

button {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#btn-pray, #btn-back { background: var(--accent); color: var(--paper); }
#btn-pray[aria-pressed="true"] { background: var(--ink); }
button[hidden] { display: none; }


#hint, #toast {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 16px;
  width: max-content;
  max-width: calc(100% - 32px);
  border-radius: 16px;
  background: rgba(14, 47, 45, 0.86);
  color: var(--paper);
  font-size: 16px;
  text-align: center;
}
#hint { bottom: calc(96px + env(safe-area-inset-bottom)); }
#toast { top: calc(88px + env(safe-area-inset-top)); }
#hint[hidden], #toast[hidden] { display: none; }

/* ---------- 둘러보기 ---------- */
dialog {
  border: 0;
  border-radius: 24px;
  padding: 24px;
  width: min(320px, calc(100% - 48px));
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop { background: rgba(14, 47, 45, 0.5); }
dialog h2 { margin: 0 0 16px; font-size: 20px; }
dialog button { display: block; width: 100%; margin-top: 8px; background: #E7E2D6; }
dialog .plain { background: transparent; }

/* ---------- 닫힌 화면, 나가는 인사 ---------- */
.screen {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 32px 24px;
  text-align: center;
  color: var(--paper);
  background: linear-gradient(rgba(61, 33, 15, 0.78), rgba(61, 33, 15, 0.9)), url("../assets/closed.jpg") center / cover;
}
.screen[hidden] { display: none; }
.screen h1 { margin: 0; font-size: 28px; font-family: "MaruBuri", "AppleMyungjo", "Noto Serif KR", serif; }
.screen p { margin: 0; font-size: 18px; }
.screen .big { font-size: 24px; font-weight: 700; }
.screen .small { font-size: 16px; opacity: 0.8; }

@media (prefers-reduced-motion: reduce) {
  .bar { animation: none; }
}

/* ---------- 내 모습 고르기: 아래에서 올라오는 판(위쪽에 아바타가 보인다) ---------- */
#look {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0 auto;
  width: min(480px, 100%);
  max-width: 100%;
  max-height: 50dvh;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  z-index: 4;
}
#look h2 { margin: 0 0 8px; }
#look fieldset { border: 0; margin: 0; padding: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; }
#look legend { padding: 0; margin-bottom: 4px; font-size: 14px; font-weight: 700; opacity: 0.75; }
#look label { position: relative; }
#look input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
#look label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: #E7E2D6;
  font-size: 16px;
  font-weight: 600;
  border: 3px solid transparent;
}
#look label .swatch { padding-left: 40px; position: relative; }
#look label .swatch::before {
  content: "";
  position: absolute;
  left: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c);
  border: 1px solid rgba(14, 47, 45, 0.35);
}
#look input:checked + span { border-color: var(--accent); background: #FFFFFF; }
#look input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
#look-done { display: block; width: 100%; margin-top: 12px; background: var(--accent); color: var(--paper); }
.picking .bar.bottom, .picking #hint { display: none; }
#look fieldset[hidden] { display: none; }

/* ---------- 아멘 말풍선, 배너 읽기 ---------- */
#bubble {
  position: absolute;
  margin: 0;
  padding: 6px 14px;
  transform: translate(-50%, -130%);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  animation: pop 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
#bubble[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -110%) scale(0.9); } }
#banner .eyebrow { margin: 0 0 12px; font-size: 14px; opacity: 0.7; }
/* 업데이트 알림(업데이트 1) */
#news .eyebrow { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: #B5482E; }
#news h2 { margin: 0 0 12px; font-family: "MaruBuri", "AppleMyungjo", "Noto Serif KR", serif; font-size: 28px; }
#news { max-height: 88dvh; overflow-y: auto; }
#news-list { margin: 0 0 16px; }
#news-list h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--ink-2); }
#news-list ul { margin: 0; padding: 0; list-style: none; }
#news-list .older { margin-top: 16px; }
#news-list .older li { font-size: 16px; }
#news-list .older li::before { background: rgba(61, 33, 15, 0.35); }
#news-list li { position: relative; padding: 8px 0 8px 20px; border-top: 1px solid rgba(61, 33, 15, 0.2); font-size: 17px; line-height: 1.5; word-break: keep-all; }
#news-list li::before { content: ''; position: absolute; left: 4px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: #E9A23B; }
#news .not-instead { margin: 0 0 12px; }
.not-instead { font-size: 14px; line-height: 1.5; color: var(--ink-2); word-break: keep-all; }
#banner-text {
  margin: 0 0 20px;
  font-family: "MaruBuri", "AppleMyungjo", "Noto Serif KR", serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.35;
  word-break: keep-all;
}
@media (prefers-reduced-motion: reduce) { #bubble { animation: none; } }

/* ---------- 자리에 놓인 성경과 지도 ---------- */
.bar.seat { bottom: calc(88px + env(safe-area-inset-bottom)); }
.bar.seat[hidden] { display: none; }
.picking .bar.seat { display: none; }
#word, #atlas, #poster, #exhibit { width: min(400px, calc(100% - 32px)); max-height: 86dvh; overflow-y: auto; }
#word .eyebrow, #atlas .eyebrow, #poster .eyebrow, #exhibit .eyebrow { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: #B5482E; }
#word h2, #atlas h2, #poster h2, #exhibit h2 {
  margin: 0 0 12px;
  font-family: "MaruBuri", "AppleMyungjo", "Noto Serif KR", serif;
  font-size: 26px;
  line-height: 1.35;
  word-break: keep-all;
}
#word p:not(.eyebrow), #atlas p:not(.eyebrow), #poster p:not(.eyebrow), #exhibit p:not(.eyebrow) { margin: 0 0 16px; font-size: 17px; line-height: 1.65; word-break: keep-all; }
#poster-img { display: block; width: 100%; max-height: 52dvh; object-fit: contain; margin: 0 0 12px; border-radius: 10px; }
#poster-img[hidden] { display: none; }
a.btn {
  display: grid;
  place-items: center;
  min-height: 52px;
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #E7E2D6;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}
a.btn.primary { background: var(--accent); color: var(--paper); }
a.btn .small { font-size: 12px; font-weight: 500; opacity: 0.85; }
a.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
a.btn[hidden] { display: none; }

/* ---------- UI 그림체: 본당과 같은 만화 선 (2026-11-10 기획자이 세 시안 중 고름) ---------- */
/* 본당 외곽선과 같은 갈색 선을 두르고, 아래로 떨어지는 납작한 그림자를 둔다 */
.bar, dialog, #hint, #toast, #bubble {
  background: #FBF4E4;
  color: var(--line);
  border: 3px solid var(--line);
  box-shadow: 0 5px 0 var(--line);
}
.bar { border-radius: 22px; padding: 6px; }
dialog { border-radius: 22px; }
#look { border-radius: 22px 22px 0 0; }
button, a.btn { border-radius: var(--r-btn); color: var(--line); font-weight: 700; }
dialog button:not(.plain), a.btn:not(.primary), #look label span { background: #F0DDB4; border: 2px solid var(--line); }
#btn-pray, #btn-back, a.btn.primary, #look-done { background: #E9A23B; color: var(--line); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
#look input:checked + span { border-color: var(--line); background: #E9A23B; }
#word .eyebrow, #atlas .eyebrow, #poster .eyebrow { color: #B5482E; }
dialog::backdrop { background: rgba(61, 33, 15, 0.35); }
button:focus-visible, a.btn:focus-visible, #look input:focus-visible + span { outline: 3px solid #B5482E; outline-offset: 2px; }

/* ---------- 위 띠의 설정 ---------- */
#btn-menu { font-size: 15px; padding: 0 12px; background: #F0DDB4; border: 2px solid var(--line); min-height: 44px; }

/* ---------- 예배 영상(새암교회 유튜브 재생기) ---------- */
#video { width: min(560px, calc(100% - 24px)); max-height: 92dvh; overflow-y: auto; padding: 20px; }
#video .eyebrow { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: #B5482E; }
#video h2 { margin: 0 0 12px; }
#video-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
#video-tabs button { display: inline-block; width: auto; margin: 0; min-height: 44px; padding: 0 12px; font-size: 15px; }
#video-tabs button[aria-pressed="true"] { background: #E9A23B; }
#video-frame { aspect-ratio: 16 / 9; border: 3px solid var(--line); border-radius: 14px; overflow: hidden; background: #16302E; }
#video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
#video .small { margin: 8px 0 0; font-size: 13px; opacity: 0.75; }

/* ---------- 샘 창과 감사 노트 ---------- */
#well, #thanks { width: min(400px, calc(100% - 32px)); max-height: 88dvh; overflow-y: auto; }
#well .eyebrow, #thanks .eyebrow { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: #B5482E; }
#well h2, #thanks h2 { margin: 0 0 12px; font-family: "MaruBuri", "AppleMyungjo", "Noto Serif KR", serif; font-size: 28px; }
#well-count, #thanks-done { margin: 0 0 12px; font-size: 17px; line-height: 1.5; word-break: keep-all; }
#thanks label { display: block; margin-bottom: 6px; font-size: 16px; font-weight: 700; }
#thanks textarea {
  display: block; width: 100%; padding: 12px; font: inherit; font-size: 17px; line-height: 1.5;
  color: var(--line); background: #FFFFFF; border: 2px solid var(--line); border-radius: 14px; resize: vertical;
}
#thanks textarea:focus-visible { outline: 3px solid #B5482E; outline-offset: 2px; }
#thanks .small { margin: 6px 0 0; font-size: 13px; opacity: 0.75; }
#thanks-save, #well-photo { background: #E9A23B !important; box-shadow: 0 3px 0 var(--line); margin-top: 12px; }
#video-tabs[hidden] { display: none; }

/* ---------- 강단 스크린 영상 ---------- */
#well-friends { margin: 0 0 4px; font-size: 15px; line-height: 1.5; word-break: keep-all; }
#screen-video { position: absolute; z-index: 1; border: 3px solid var(--line); border-radius: 6px; overflow: hidden; background: #16302E; pointer-events: auto; }
#screen-video[hidden] { display: none; }
#screen-video iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 430px) { .bar.bottom :is(button, a) { padding: 0 10px; font-size: 15px; } .bar.seat button { padding: 0 10px; font-size: 15px; } }

/* ---------- 사진으로 내 모습 맞추기 ---------- */
#look-photo { margin: 4px 0 8px; }
#look .photo-btn { position: relative; display: grid; place-items: center; min-height: 48px; border-radius: 14px; background: #E9A23B; border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); font-size: 16px; font-weight: 700; cursor: pointer; }
#look .photo-btn:focus-within { outline: 3px solid #B5482E; outline-offset: 2px; }
#look .photo-btn[aria-busy="true"] { opacity: 0.6; }
#look-photo .small { margin: 8px 0 0; font-size: 13px; line-height: 1.45; opacity: 0.8; word-break: keep-all; }

/* ---------- 본당 밖 공간의 '보러 가기' 단추 ---------- */

/* ---------- 2026-11-11 경험 검수 뒤: 본당 중심으로 다시 짠 띠와 기도 칸 ---------- */
html, body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input, textarea { -webkit-user-select: text; user-select: text; }
.small { font-size: 13px; font-weight: 500; line-height: 1.45; opacity: 0.8; word-break: keep-all; }
dialog .small { margin: 8px 0 0; }
dialog button .small, .bar button .small { display: block; margin: 0; }

/* 위 띠: 마치기 · 교회 둘러보기(지금 있는 곳) · 소리 · 설정 */
.bar.top { gap: 4px; }
.bar.top button { flex: none; min-height: 44px; padding: 0 10px; font-size: 15px; }
#btn-tour { display: grid; justify-items: start; align-content: center; line-height: 1.15; padding: 2px 12px; background: #F0DDB4; border: 2px solid var(--line); text-align: left; }
#btn-tour .small { font-size: 11px; opacity: 0.75; }
#where { font-size: 16px; font-weight: 800; }
#where::after { content: " ▾"; font-size: 12px; }
#btn-sound[aria-pressed="false"] { opacity: 0.7; }

/* 아래 띠 */
#btn-home { background: #E9A23B; border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
#btn-media[aria-pressed="true"] { background: var(--line); color: #FBF4E4; }
.away #hint { display: none; }
#hint { width: min(420px, calc(100% - 32px)); max-width: none; line-height: 1.5; word-break: keep-all; bottom: calc(92px + env(safe-area-inset-bottom)); }
#btn-card { background: #E9A23B; border: 2px solid var(--line); }

/* 기도하는 동안: 띠와 안내를 모두 거두고 기도 칸만 남긴다 */
.praying .bar:not(.top), .praying #hint, .praying #toast { display: none; }      /* 위 띠는 남긴다(2026-11-15 C안) */
#praybar {
  position: absolute; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(440px, calc(100% - 24px)); padding: 12px 14px; pointer-events: auto;
  background: rgba(251, 244, 228, 0.94); color: var(--line); border: 3px solid var(--line); border-radius: 22px; box-shadow: 0 5px 0 var(--line);
  animation: rise 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
#praybar[hidden] { display: none; }
#praybar label { display: block; margin: 0 0 6px 2px; font-size: 15px; font-weight: 700; }
#praybar label span { font-weight: 500; opacity: 0.7; }
#praybar input { display: block; width: 100%; min-height: 48px; padding: 0 12px; font: inherit; font-size: 17px; font-weight: 700; color: var(--line); background: #FFFFFF; border: 2px solid var(--line); border-radius: 14px; }
#praybar input:focus-visible { outline: 3px solid #B5482E; outline-offset: 2px; }
#praybar .row { display: flex; gap: 8px; margin-top: 8px; }
#btn-topics { flex: 1; min-width: 0; white-space: normal; line-height: 1.25; font-size: 14px; padding: 4px 10px; background: #F0DDB4; border: 2px solid var(--line); }
#btn-amen { flex: none; min-width: 96px; font-size: 18px; background: #E9A23B; border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
#praybar .small { margin: 8px 2px 0; font-size: 12px; }
#praybar a { color: inherit; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { #praybar { animation: none; } }

/* 교회 둘러보기, 교회 기도 제목, 말씀·찬양 보기 */
#tour, #topics, #media, #card { width: min(400px, calc(100% - 32px)); max-height: 88dvh; overflow-y: auto; }
dialog .group { margin: 16px 0 0; font-size: 14px; font-weight: 700; color: #B5482E; }
dialog h2 + .group { margin-top: 0; }
#tour .row3 { display: flex; gap: 6px; }
#tour .row3 button { padding: 0 6px; }
#tour button[data-place], #media-sermon, #media-praise { white-space: normal; padding: 8px 12px; line-height: 1.3; }
#tour button[aria-current="true"] { background: #E9A23B; }
#tour button[aria-current="true"]::after { content: " · 지금 여기"; font-size: 12px; font-weight: 600; }
#topics-list button { white-space: normal; text-align: left; padding: 10px 14px; line-height: 1.4; word-break: keep-all; }
/* 함께 기도 불빛(업데이트 1): 제목 단추 안 왼쪽 점. 숫자 없이 밝기 네 단계(꺼짐·희미함·은은함·밝음) */
#topics-list button[data-topic-id] { display: grid; grid-template-columns: 16px 1fr; column-gap: 10px; align-items: center; }
#topics-list .lamp { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(61, 33, 15, 0.45); background: transparent; transition: background-color 400ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 400ms cubic-bezier(0.16, 1, 0.3, 1); }
#topics-list button[data-lamp="1"] .lamp { border-color: #C9852E; background: radial-gradient(circle, #E9A23B 0 32%, transparent 36%); }   /* 단계마다 채운 크기가 다르다: 작은 점 → 반쯤 → 가득+빛(통합판 검수 14) */
#topics-list button[data-lamp="2"] .lamp { border-color: #C9852E; background: radial-gradient(circle, #E9A23B 0 62%, transparent 66%); }
#topics-list button[data-lamp="3"] .lamp { border-color: #B5482E; background: #F2A93B; box-shadow: 0 0 8px 3px rgba(242, 169, 59, 0.6); }
#topics.lamps-off #topics-list button[data-topic-id] { grid-template-columns: 1fr; }
#topics.lamps-off #topics-list .lamp, #topics.lamps-off .lamp-note { display: none; }
@media (prefers-reduced-motion: reduce) { #topics-list .lamp { transition: none; } }
#media-sermon { background: #E9A23B !important; box-shadow: 0 3px 0 var(--line); }
#hymn-list button { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; text-align: left; white-space: normal; padding: 8px 14px; line-height: 1.35; }

/* 기도 카드와 지난 글 */
#card-canvas { display: block; width: 100%; height: auto; border-radius: 10px; border: 2px solid var(--line); }
.check { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 8px; font-size: 16px; font-weight: 700; }
.check[hidden] { display: none; }
.check input { width: 22px; height: 22px; accent-color: #B5482E; }
#card-save { background: #E9A23B !important; box-shadow: 0 3px 0 var(--line); }
#card-make[hidden] { display: none; }
#card .card-msg-label { display: block; margin: 12px 0 6px; font-size: 16px; font-weight: 700; }
#card .card-msg-label .small { font-weight: 500; font-size: 14px; opacity: 0.8; }
#card-msg {
  display: block; width: 100%; padding: 12px; font: inherit; font-size: 17px; line-height: 1.5;
  color: var(--line); background: #FFFFFF; border: 2px solid var(--line); border-radius: 14px; resize: vertical;
  word-break: keep-all; overflow-wrap: anywhere;
}
#card-msg:focus-visible { outline: 3px solid #B5482E; outline-offset: 2px; }
#card summary, #thanks summary { min-height: 44px; display: flex; align-items: center; font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 12px; }
#home-screen-help summary { min-height: 44px; padding: 11px 0; font-weight: 700; cursor: pointer; }
#card-log, #thanks-list { margin: 0; padding: 0; list-style: none; }
#card-log li, #thanks-list li { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid rgba(61, 33, 15, 0.2); font-size: 16px; line-height: 1.5; word-break: keep-all; }
#card-log time, #thanks-list time { grid-column: 1 / -1; font-size: 13px; opacity: 0.7; }
#card-log .continue-prayer { grid-column: 1 / -1; justify-self: start; margin: 8px 0; }
dialog button.del { display: inline-block; width: auto; margin: 0; min-height: 44px; padding: 0 12px; font-size: 14px; }
#well-friends[hidden] { display: none; }

/* 마치는 인사, 글로 된 본당 */
.screen h1, .screen p { word-break: keep-all; }
#plain { justify-items: stretch; align-content: start; overflow-y: auto; text-align: left; gap: 12px; }
#plain > * { width: min(480px, 100%); margin-left: auto; margin-right: auto; }
#plain h1 { text-align: center; margin-top: 16px; }
#plain h2 { margin: 16px auto 0; font-size: 20px; }
#plain button, #plain a.btn { background: #E9A23B; border: 2px solid var(--line); color: var(--line); }
#plain input, #plain textarea { display: block; min-height: 48px; padding: 10px 12px; font: inherit; font-size: 17px; color: var(--line); background: #FFFFFF; border: 2px solid var(--line); border-radius: 14px; }

@media (max-width: 380px) {
  .bar.top button { padding: 0 8px; font-size: 14px; }
  #btn-tour { padding: 2px 8px; }
}

/* 내 모습 고르기: 끝까지 내리지 않아도 "이 모습으로"가 늘 보인다 */
#look-done { position: sticky; bottom: 0; }
#plain label { font-size: 16px; font-weight: 700; }
#plain a.btn { color: var(--line); }
#exhibit-text[hidden] { display: none; }

/* 2026-11-11 재검수 뒤 */
#thanks-error { margin: 8px 0 0; padding: 8px 12px; border: 2px solid #B5482E; border-radius: 12px; color: #B5482E; font-size: 15px; font-weight: 700; line-height: 1.45; word-break: keep-all; }
#thanks-error[hidden] { display: none; }
#word > .small { margin: -8px 0 12px; }
dialog p, dialog li, dialog h2 { -webkit-user-select: text; user-select: text; }      /* 읽는 글은 고르고 복사할 수 있다 */
#topics::backdrop, #card::backdrop { background: rgba(61, 33, 15, 0.7); }
#hymn-list .no { font-size: 15px; font-weight: 800; opacity: 1; }
#plain ul { margin: 0; padding: 0; list-style: none; }
#plain li { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid rgba(251, 244, 228, 0.3); font-size: 16px; }
#plain li button { min-height: 44px; padding: 0 12px; font-size: 14px; }
#plain details summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }

/* 처음 인사(2026-11-11: GPT가 제안한 문구를 기획자이 고름). 본당 아래쪽에 뜨는 판 */
#hint {
  left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(400px, calc(100% - 32px)); padding: 20px 20px 14px; border-radius: 22px; text-align: center; pointer-events: auto;
  animation: rise 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
#hint h2 { margin: 0 0 6px; font-family: "MaruBuri", "AppleMyungjo", "Noto Serif KR", serif; font-size: 26px; line-height: 1.3; }
#hint p { margin: 0 0 4px; font-size: 16px; line-height: 1.5; word-break: keep-all; }
#hint .ask { font-weight: 700; color: #B5482E; }
#hint button { display: block; width: 100%; margin-top: 8px; min-height: 48px; background: #F0DDB4; border: 2px solid var(--line); }
#hint #hint-tree[hidden] { display: none; }
#hint #hint-pray { margin-top: 14px; background: #E9A23B; box-shadow: 0 3px 0 var(--line); }
#hint .small { margin: 10px 0 0; font-size: 12px; opacity: 0.75; }
.greeting:not(.away) .bar.bottom { display: none; }      /* 본당에서 처음 인사가 떠 있을 때만 아래 띠를 접는다 */
.wipe { font-size: 14px; text-decoration: underline; min-height: 44px; }
@media (max-height: 620px) { #hint .ask { display: none; } #hint { padding: 14px 16px 10px; } #hint h2 { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { #hint { animation: none; } }

/* 단추 안의 작은 글은 큰 글 아래 한 줄로(겹치지 않게) */
a.btn { align-content: center; row-gap: 2px; }
a.btn .small, dialog button .small { display: block; margin: 0; line-height: 1.3; }

/* ---------- 2026-11-11 최종 검수 뒤 ---------- */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.praying .bar.bottom, .praying .bar.seat { display: none; }      /* 기도 중에는 아래 띠를 거둔다. 위 띠(마치기·둘러보기·소리·설정)는 남긴다(2026-11-15 기획자 C안: 기도 칸 안 소리 단추 대신 위 띠 소리 단추) */
#praybar:focus { outline: none; }
/* 알림: 늘 그려 두고 글만 바꾼다(화면 읽기가 읽을 수 있게). 창이 열려 있으면 창 안에도 적는다 */
#toast[hidden] { display: block; }
#toast:empty { opacity: 0; padding: 0; border: 0; box-shadow: none; }
.dlg-status { margin: 10px 0 0; padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px; background: #F0DDB4; font-size: 15px; font-weight: 700; line-height: 1.45; word-break: keep-all; }
.dlg-status:empty { display: none; }
/* 109 상담전화: 급한 사람이 누르기 쉽게 */
#praybar .small { font-size: 14px; line-height: 1.5; }
#praybar a, #plain a.tel { display: inline-block; min-width: 48px; text-align: center; padding: 13px 8px; margin: -13px -4px; font-size: 16px; font-weight: 800; color: inherit; }   /* 누르는 곳 48px, 줄 간격은 그대로(통합판 검수 13) */
#public-prayer-crisis a.tel { display: inline-block; padding: 13px 6px; margin: -13px -6px; font-weight: 800; color: #A63A22; }      /* 감사 나누기 위기 안내(#share-help)와 같은 모양, 누르는 곳 48px */
#praybar label span { display: inline-block; }
/* 긴 창에서도 닫기가 늘 보인다 */
#topics > form:last-of-type, #media > form:last-of-type, #tour > 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); }
/* 찬송가: 몇 장인지 위, 제목 아래(끝 글자가 혼자 떨어지지 않게) */
#hymn-list button { grid-template-columns: 1fr; gap: 0; }
#hymn-list .no { font-size: 13px; color: #B5482E; }
/* 띄어쓰기 없는 긴 글도 목록 안에서 줄을 바꾼다 */
#card-log li span, #thanks-list li span, #plain li span { min-width: 0; overflow-wrap: anywhere; }
/* 작은 글을 조금 키운다 */
#btn-tour .small { font-size: 12px; }
#hint .small { font-size: 13px; }
a.btn .small { font-size: 13px; }
#hint { max-height: calc(100dvh - 96px); overflow-y: auto; }
.screen :focus-visible { outline-color: #FBF4E4; }
#look input:checked + span:not(.swatch)::before { content: "✓"; font-weight: 800; }   /* 고른 칸: 글자 왼쪽에 한 줄로 */
#look input:checked + .swatch::before { content: "✓"; display: grid; place-items: center; font-size: 15px; font-weight: 800; color: #FBF4E4; text-shadow: 0 0 2px #2A2622; }
#scene[hidden] { display: none; }

/* ---------- 교회에 한마디 (사이트 안에서 교회로 보내는 글) ---------- */
#say { width: min(400px, calc(100% - 32px)); max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; }
#say .eyebrow { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: #B5482E; }
#say h2 { margin: 0 0 12px; font-family: "MaruBuri", "AppleMyungjo", "Noto Serif KR", serif; font-size: 28px; }
.say-note { margin: 0 0 16px; padding: 10px 12px; border-left: 4px solid #E9A23B; border-radius: 0 12px 12px 0; background: #FFFFFF; color: var(--line); font-size: 15px; font-weight: 700; line-height: 1.5; word-break: keep-all; }
#say fieldset { border: 0; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
#say legend { padding: 0; margin-bottom: 8px; font-size: 16px; font-weight: 700; word-break: keep-all; }
.say-label { display: block; margin: 0 0 6px; font-size: 16px; font-weight: 700; }
:is(#say, #public-prayer) textarea {
  display: block; width: 100%; margin: 0 0 16px; padding: 12px; font: inherit; font-size: 17px; line-height: 1.5;
  color: var(--line); background: #FFFFFF; border: 2px solid var(--line); border-radius: 14px; resize: vertical;
}
:is(#say, #public-prayer) textarea:focus-visible { outline: 3px solid #B5482E; outline-offset: 2px; }
.say-pick label { position: relative; }
.say-pick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.say-pick label span {
  display: grid; place-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: #F0DDB4; border: 2px solid var(--line); color: var(--line); font-size: 16px; font-weight: 600;
}
.say-pick input:checked + span { background: #E9A23B; font-weight: 800; box-shadow: 0 3px 0 var(--line); }
.say-pick input:checked + span::after {      /* 고른 것을 색만이 아니라 표시로도 알린다 */
  content: "✓"; position: absolute; top: -6px; right: -4px; width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 50%; background: var(--line); color: #FBF4E4; font-size: 13px; font-weight: 800; pointer-events: none;
}
.say-pick input:focus-visible + span { outline: 3px solid #B5482E; outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .say-pick label:hover input:not(:checked) + span { background: #F6E7C6; } }
#say .say-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.say-scale label span { padding: 0; }
#say .say-rest { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.say-rest label span { padding: 0 4px; font-size: 15px; word-break: keep-all; text-align: center; }
.say-ends { grid-column: 1 / -1; display: flex; justify-content: space-between; margin: 0; font-size: 13px; opacity: 0.8; }
.say-bot[hidden] { display: none; }
#say-error { margin: 0 0 8px; padding: 8px 12px; border: 2px solid #B5482E; border-radius: 12px; color: #B5482E; font-size: 15px; font-weight: 700; line-height: 1.45; word-break: keep-all; }
#say-error[hidden], #say-done[hidden], #say-form[hidden] { display: none; }
#say-send { background: #E9A23B !important; box-shadow: 0 3px 0 var(--line); margin-top: 4px; }
#say-send[disabled] { opacity: 0.6; }
#say-done { margin: 0 0 12px; font-size: 18px; font-weight: 700; line-height: 1.5; }
#say .small { margin: 10px 0 0; font-size: 13px; opacity: 0.8; }
#btn-say2 { width: auto; min-height: 48px; padding: 0 20px; background: transparent; border: 2px solid #FBF4E4; box-shadow: none; color: #FBF4E4; font-size: 17px; font-weight: 700; }      /* 기획자 2026-11-25 "한마디 남기기도 버튼으로": 단추 세 등급 중 '테두리만'(밑줄 글씨였다) */

/* ---------- 함께 있기 ---------- */
#together-n { font-weight: 800; color: #8A5A2B; }
#together-n[hidden] { display: none; }
#tg-note {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(140px + env(safe-area-inset-top));
  margin: 0; padding: 8px 16px; width: max-content; max-width: calc(100% - 32px);
  border-radius: 16px; background: rgba(138, 90, 43, 0.9); color: var(--paper);
  font-size: 15px; text-align: center; pointer-events: none;
}
/* 기도 중에도 위 띠가 남으므로(2026-11-15 C안) 알림 글은 평소 자리(위 띠 아래)에 둔다 */
#tg-note:empty { display: none; }
#peer .choices { display: grid; gap: 8px; margin: 16px 0 8px; }
#peer .choices button[hidden] { display: none; }
#peer-state { margin: 4px 0 0; }

/* 네 번째 배포 전 검수 반영 */
#say .say-store { font-size: 15px; opacity: 1; line-height: 1.5; }
#say .small a, #praybar .small a { color: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

/* 내 모습: 사진 → 남녀·나이 큰 단추 → 접힌 "직접 고치기" */
#look .photo-btn { min-height: 56px; font-size: 18px; }
#look-quick fieldset { flex-wrap: nowrap; }
#look-quick label { flex: 1; }
#look-quick label span { width: 100%; min-height: 52px; padding: 0 8px; font-size: 17px; box-sizing: border-box; }
#look-more { margin-top: 8px; border-top: 2px dashed rgba(42, 38, 34, 0.25); padding-top: 4px; }
#look-more summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; }
#look-more summary::-webkit-details-marker { display: none; }
#look-more summary::after { content: "펼치기 ▾"; font-size: 14px; font-weight: 600; opacity: 0.7; }
#look-more[open] summary::after { content: "접기 ▴"; }
#look-more summary:focus-visible { outline: 3px solid #B5482E; outline-offset: 2px; border-radius: 8px; }

/* 처음 온 사람: 시작 모습 여섯 칸(그림 + 이름). 한 번 누르면 끝 */
#start-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
#hint #start-grid button.start { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; padding: 6px 2px 8px; min-height: 0; border-radius: 16px; background: #F0DDB4; border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); font-size: 15px; font-weight: 700; line-height: 1.2; }
#start-grid img { display: block; width: 100%; max-width: 88px; height: auto; aspect-ratio: 1; }
#hint #start-photo { margin-top: 12px; background: #E9A23B; box-shadow: 0 3px 0 var(--line); }
#hint-start[hidden], #hint-main[hidden] { display: none; }
@media (hover: hover) { #hint #start-grid button.start:hover { background: #E9A23B; } }
#look-share { display: block; width: 100%; margin-top: 12px; min-height: 48px; font-size: 16px; }
#look-share-note { margin: 8px 0 0; font-size: 14px; line-height: 1.5; word-break: break-all; }
#look-share-note[hidden] { display: none; }

/* ---------- 내 모습 창·처음 인사 카드: 샘물 크기 기준으로 한데 모음(2026-11-13) ---------- */
#look { padding: var(--s-6) var(--s-6) calc(var(--s-4) + env(safe-area-inset-bottom)); border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
#look h2 { margin: 0 0 var(--s-4); font-size: var(--t-title); }
#look-photo { margin: 0; }
#look .photo-btn { min-height: var(--h-cta); border-radius: var(--r-btn); font-size: var(--t-sub); font-weight: 600; }
#look-photo .small { margin: var(--s-2) 0 0; font-size: var(--t-caption); line-height: var(--lh-body); color: var(--ink-2); opacity: 1; }
#look fieldset { padding: var(--s-3) 0; gap: var(--s-2); }
#look legend { margin-bottom: var(--s-2); font-size: var(--t-label); font-weight: 600; color: var(--ink-2); opacity: 1; }
#look label span { min-height: var(--h-btn); gap: var(--s-1); font-weight: 600; }
#look-quick { margin-top: var(--s-2); }
#look-quick fieldset { flex-wrap: nowrap; }
#look-quick label { flex: 1; }
#look-quick label span { width: 100%; padding: 0 var(--s-2); font-size: var(--t-sub); }
#look-fields fieldset { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(42, 38, 34, 0.14); }
#look-fields fieldset.swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#look-fields label span { width: 100%; padding: var(--s-1) var(--s-2); font-size: var(--t-chip); line-height: 1.25; text-align: center; white-space: normal; word-break: keep-all; }
#look label .swatch { padding-left: 46px; }
#look-fields label .swatch { justify-content: flex-start; text-align: left; }
#look input:checked + .swatch.light::before { color: #2A2622; text-shadow: none; }
#look #look-share { display: block; width: 100%; margin: var(--s-3) 0 0; min-height: var(--h-btn); background: transparent; border: 2px solid var(--line); box-shadow: none; font-size: var(--t-sub); font-weight: 600; }
#look-share-note { margin: var(--s-2) 0 0; }
#look-share-note p { margin: 0; font-size: var(--t-caption); line-height: var(--lh-body); color: var(--ink-2); word-break: keep-all; }
#look-share-note input { width: 100%; margin-top: var(--s-2); min-height: var(--h-btn); padding: 0 var(--s-3); font-size: var(--t-caption); border: 2px solid var(--line); border-radius: var(--r-btn); background: #FFFFFF; }
#look-more { margin-top: var(--s-4); padding-top: var(--s-1); }
#look-more summary { min-height: var(--h-btn); font-size: var(--t-body); font-weight: 600; }
#look-more summary::after { font-size: var(--t-caption); font-weight: 600; color: var(--ink-2); opacity: 1; }
#look-done { min-height: var(--h-btn); margin-top: var(--s-4); font-size: var(--t-sub); font-weight: 600; z-index: 1; box-shadow: 0 3px 0 var(--line), 0 calc(var(--s-4) + 6px + env(safe-area-inset-bottom)) 0 14px #FBF4E4; }
#look:has(#look-more[open]) { max-height: 65dvh; }

#hint { padding: var(--s-6) var(--s-6) var(--s-4); }
#hint h2 { margin: 0 0 var(--s-2); font-size: var(--t-hero); }
#hint p { font-size: var(--t-body); line-height: var(--lh-body); }
#hint .ask { margin: 0 0 var(--s-1); }
#hint button { min-height: var(--h-btn); margin-top: var(--s-2); font-size: var(--t-sub); font-weight: 600; }
#hint #hint-pray { margin-top: var(--s-3); }
#hint .small { margin: var(--s-3) 0 0; font-size: var(--t-caption); color: var(--ink-2); opacity: 1; }
#start-grid { gap: var(--s-2); margin-top: var(--s-3); }
#hint #start-grid button.start { gap: var(--s-1); padding: var(--s-2) var(--s-1); border-radius: var(--r-card); font-size: var(--t-chip); font-weight: 600; line-height: 1.25; }
#hint #start-photo { margin-top: var(--s-4); background: #F0DDB4; box-shadow: none; }

/* ---------- 큰 글자(설정 → 글자 크게) ----------
   새암 홈페이지 전 세대판(homepage/tokens/theme-allgen.css)의 '크게'와 같은 112.5% 배율.
   글자 규칙이 px로 흩어져 있어 하나씩 키우지 않고, 글자가 있는 겉 층(띠·창·인사·알림)만 통째로 확대한다.
   3D 위에 좌표로 얹는 것(아멘 말풍선·강단 영상·이름표)은 자리가 어긋나므로 확대하지 않는다 */
/* 겉 상자(창·띠·카드) 자체가 아니라 그 안의 내용에 확대를 건다. 겉 상자의 폭(%·calc)은 브라우저마다 확대 계산이 달라
   (사파리는 예전 방식) 넘칠 수 있는데, 안쪽 내용은 자동 폭이라 어느 브라우저에서도 겉 상자 안에 들어간다 */
:root[data-text="large"] :is(.bar, dialog, #hint, .screen) > * { zoom: 1.125; }
:root[data-text="large"] :is(#toast, #tg-note) { font-size: 1.125em; }
/* 큰 글자에 맞춘 배치 */
:root[data-text="large"] #look-fields fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* 글자 칸 셋 → 둘 */
#hint #hint-text { display: inline-block; width: auto; min-height: 44px; margin: var(--s-2) 0 0; padding: 0 var(--s-1); background: transparent; border: 0; box-shadow: none; font-size: var(--t-caption); font-weight: 600; color: var(--line); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 검수 고침(2026-11-13): 접근성·일관성 ---------- */
/* 고른 칸은 주황 대신 흰 바탕 + 진한 3px 테두리 + ✓. 주황은 누르면 일이 일어나는 단추에만 */
#look input:checked + span { background: #FFFFFF; border: 3px solid var(--line); }
/* 색 동그라미 테두리를 진하게(연한 색이 바탕에 묻히지 않게) */
#look label .swatch::before { border: 2px solid var(--line); }
/* 연한 색 위 ✓는 진하게(대비 3:1 미만이면 JS가 .light를 붙인다) */
#look input:checked + .swatch.light::before { color: #2A2622; text-shadow: none; }
/* 펼치기 표시는 화면에만(낭독은 summary 상태로 충분). 대체 글자 문법을 모르는 브라우저는 위 줄을 쓴다 */
#look-more summary::after { content: "펼치기 ▾"; content: "펼치기 ▾" / ""; }
#look-more[open] summary::after { content: "접기 ▴"; content: "접기 ▴" / ""; }
/* 창 높이를 늘리고, "이 모습으로" 위에 흐린 띠를 깔아 아래에 더 있음을 보인다 */
/* 창 위에 캐릭터가 설 자리를 늘 남긴다(펼치거나 큰 글자일 때 남는 띠가 80px까지 줄어 발까지 담을 수 없었다, 2026-11-13 GPT 재검수).
   창 안은 스크롤되고 '이 모습으로'는 늘 보인다 */
#look { max-height: 58dvh; }
#look:has(#look-more[open]) { max-height: 64dvh; }
:root[data-text="large"] #look { max-height: 62dvh; }
:root[data-text="large"] #look:has(#look-more[open]) { max-height: 66dvh; }
#look-done { position: sticky; }
#look-done::before { content: ""; position: absolute; left: -21px; right: -21px; bottom: calc(100% + 5px); height: 28px; background: linear-gradient(rgba(251, 244, 228, 0), #FBF4E4); pointer-events: none; }
#look h2:focus, #look h2:focus-visible { outline: none; }   /* 창이 열릴 때 제목으로 옮긴 초점은 낭독용이라 테두리를 그리지 않는다 */
/* 처음 인사 카드: '글자 크게 보기'를 제목 바로 아래 48px 테두리 단추로 */
#hint #hint-text { display: inline-flex; align-items: center; gap: var(--s-2); width: auto; min-height: var(--h-btn); margin: 0 0 var(--s-2); padding: 0 var(--s-4); background: transparent; border: 2px solid var(--line); border-radius: var(--r-btn); box-shadow: none; font-size: var(--t-caption); font-weight: 600; text-decoration: none; }
:is(#hint-text, #btn-text, #btn-flip) .state { font-size: var(--t-caption); font-weight: 700; color: var(--ink-2); }
:is(#hint-text, #btn-text, #btn-flip)[aria-pressed="true"] .state { color: #9A3A22; }
/* 빨간 소제목 한 단계 짙게(크림 바탕 6.4:1) */
#hint .ask { color: #9A3A22; }

/* ---------- 재검수 고침(2026-11-13) ---------- */
#look { overflow-x: hidden; }                     /* 아래 흐린 띠가 큰 글자에서 옆으로 3px 삐져나오던 것 */
/* 시작 모습을 고르면 인사 카드가 잠깐 내려가 고른 캐릭터가 보인다 */
/* transform은 가운데 맞춤과 등장 애니메이션이 쓰므로, 따로 움직이는 translate 속성으로 내린다 */
#hint { transition: translate 420ms cubic-bezier(0.16, 1, 0.3, 1); }
#hint.peek { translate: 0 calc(100% + 120px); transition: translate 280ms cubic-bezier(0.7, 0, 0.84, 0); }
@media (prefers-reduced-motion: reduce) { #hint, #hint.peek { transition: none; } }
#me-ask p { margin: 0 0 var(--s-3); font-size: var(--t-body); line-height: var(--lh-body); word-break: keep-all; }
#me-ask #me-ask-yes { background: #E9A23B; box-shadow: 0 3px 0 var(--line); }

/* ---------- 외부 검수 고침(2026-11-13, 제미나이·안티그래비티) ---------- */
/* 공유·복사가 안 될 때 뜨는 주소 칸: 위의 '#look input'(고르기 칸을 투명하게 덮는 규칙)에 걸려 보이지 않는 채 창 전체를 덮던 것 */
#look #look-share-note input { position: static; inset: auto; opacity: 1; cursor: text; }
/* 키보드로 거슬러 올라갈 때 초점 칸이 아래 '이 모습으로'와 흐린 띠 뒤에 숨지 않게 */
#look { scroll-padding-bottom: 96px; }
/* 큰 글자: 기도 칸도 키운다(띠가 아니라서 빠져 있었다) */
:root[data-text="large"] #praybar > * { zoom: 1.125; }
/* 시작 모습 여섯 칸: 좁은 폰·큰 글자에서 이름이 두 줄로 접혀 카드 밖으로 넘치지 않게 */
#start-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#hint #start-grid button.start { min-width: 0; white-space: normal; word-break: keep-all; }
/* 큰 글자: 자리 띠를 아래 띠보다 조금 더 올리고, 단추가 셋이면 줄을 바꾼다 */
:root[data-text="large"] .bar.seat { bottom: calc(100px + env(safe-area-inset-bottom)); width: max-content; flex-wrap: wrap; justify-content: center; border-radius: 28px; }   /* 가운데 맞춤(left 50%) 띠는 폭이 화면 절반으로 줄어 혼자 접히므로 내용 폭을 준다 */
/* 처음 인사의 '글자 크게 보기': 눈이 침침한 분이 가장 먼저 찾는 단추라 본문 크기 + 연한 바탕으로 */
#hint #hint-text { font-size: var(--t-body); background: #F0DDB4; }
@media (max-width: 380px) { #btn-menu { font-size: 14px; padding: 0 8px; } }
/* 모습을 고르는 동안에는 장소 안내 알림이 캐릭터 머리를 가리지 않게 숨긴다 */
.picking :is(#toast, #tg-note) { visibility: hidden; }
/* 좁은 폰: 가장 긴 장소 이름('40주년 기념관')에서도 위 띠에 여유가 있게 */
@media (max-width: 380px) { #where { font-size: 15px; } }
/* 한마디 고르기 단추: 좁은 폰(320)·큰 글자에서 겹치지 말고 다음 줄로 넘어가게.
   사파리(WebKit)는 큰 글자 확대(zoom) 안에서 글자 폭을 작게 재어 단추가 글자보다 좁아졌다 → 글자 크기 기준 최소 폭을 준다 */
.say-pick label { flex: 0 0 auto; }
.say-pick:not(.say-rest) label span { min-width: calc(1em * var(--chars, 3) + 32px); white-space: nowrap; }
/* 마음 세 칸: 한 칸이 글자보다 좁아지면(320 폭·큰 글자) 두 칸 + 한 칸으로 넘긴다 */
#say .say-rest { grid-template-columns: repeat(auto-fit, minmax(calc(5em + 10px), 1fr)); }
/* 함께 있기 인원: '교회 둘러보기'라는 이름은 늘 남기고, 사람 수는 단추 모서리의 작은 동그라미로 붙인다(폭을 차지하지 않는다)(이름이 사라지면 사람 수 표시로 읽혔다, 2026-11-13 검수 P2) */
#btn-tour { position: relative; }
#together-n { position: absolute; bottom: -10px; right: -3px; min-width: 22px; padding: 1px 6px; border: 2px solid var(--line); border-radius: 999px; background: #9A3A22; color: #FFF8EC; font-size: 11px; font-weight: 800; line-height: 1.3; opacity: 1; text-align: center; white-space: nowrap; }
/* 폭 340 이하 + 큰 글자: 위 띠 단추 사이와 안쪽 여백을 줄여 '설정'이 화면 안에 들어오게 */
@media (max-width: 340px) { :root[data-text="large"] .bar.top { gap: 2px; padding: 6px; } :root[data-text="large"] .bar.top button { padding: 0 6px; } }
/* 처음 인사 '사진으로 닮게 하기' 바로 아래 한 줄: 사진이 폰 밖으로 나가지 않는다는 것 */
#hint #start-photo-note { margin: var(--s-1) 0 0; text-align: center; }
/* 교회에 한마디: '교회로 보내기'를 창 아래에 붙여 늘 보이게(폰 높이에서 창 밖에 있어 단추가 없는 줄 알았다), 위에 흐린 띠로 아래에 더 있음을 보인다 */
#say-send { position: sticky; bottom: 0; z-index: 1; }
#say-send::before { content: ""; position: absolute; left: -21px; right: -21px; bottom: calc(100% + 5px); height: 28px; background: linear-gradient(rgba(251, 244, 228, 0), #FBF4E4); pointer-events: none; }
#say-send::after { content: ""; position: absolute; left: -21px; right: -21px; top: 100%; height: 30px; background: #FBF4E4; z-index: -1; pointer-events: none; }
#say { scroll-padding-bottom: 96px; overflow-x: hidden; }
#say h2:focus, #say h2:focus-visible { outline: none; }
/* 창 제목으로 옮긴 초점은 낭독용이라 테두리를 그리지 않는다 */
dialog h2:focus, dialog h2:focus-visible { outline: none; }
/* 둘러보기·찬양·도고기도 제목·기도 카드: 아래 '닫기' 띠 위에 흐린 띠를 깔아 아래에 더 있음을 보인다(B동 칸이 닫기 뒤에 숨어 없는 줄 알았다) */
#card > 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); }
:is(#tour, #topics, #media, #card) > form:last-of-type::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 32px; background: linear-gradient(rgba(251, 244, 228, 0), #FBF4E4); pointer-events: none; }
:is(#tour, #topics, #media, #card) { scroll-padding-bottom: 96px; }
/* 낮은 폰(높이 700 이하)에서는 둘러보기 칸 위아래 여백을 줄여 B동까지 한 화면에 더 들어오게 */
@media (max-height: 700px) { #tour button[data-place] { padding-top: 5px; padding-bottom: 5px; min-height: 44px; } #tour h2 { margin-bottom: 4px; } #tour .group { margin: 6px 0 4px; } }
/* 스크롤 표시(app.js 맨 위): 오른쪽 얇은 막대(늘 보임) + 아래에 더 있을 때 고정 단추 위 작은 알림 */
.scroll-bar { position: fixed; width: 4px; border-radius: 2px; background: rgba(61, 33, 15, 0.45); pointer-events: none; z-index: 5; }
.cue-slot { position: sticky; z-index: 2; display: flex; justify-content: center; align-items: center; height: 40px; background: #FBF4E4; pointer-events: none; }
.cue-slot[hidden] { display: none; }
.scroll-cue { position: static; padding: 4px 12px; border-radius: 999px; background: #3D210F; color: #FBF4E4; font-size: 14px; font-weight: 700; white-space: nowrap; pointer-events: none; z-index: 5; box-shadow: 0 2px 6px rgba(61, 33, 15, 0.25); }
.scroll-bar[hidden] { display: none; }
:root[data-text="large"] .scroll-cue { font-size: 16px; }
@media (prefers-reduced-motion: no-preference) { .scroll-cue { animation: cue-in 260ms cubic-bezier(0.16, 1, 0.3, 1) both; } }
@keyframes cue-in { from { opacity: 0; translate: 0 6px; } }
/* 말씀·지도·포스터·전시물 창도 '닫기'를 창 아래에 붙인다(말씀 창 닫기가 폰 높이에서 창 밖에 있었다) */
:is(#word, #atlas, #poster, #exhibit) > 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); }
:is(#word, #atlas, #poster, #exhibit) { scroll-padding-bottom: 96px; }
#banner-text:focus { outline: none; }
/* 닫기 띠의 위 테두리(2px)만큼 창이 몇 px 스크롤되던 자투리를 없앤다 */
:is(#word, #atlas, #poster, #exhibit, #tour, #topics, #media, #card) > form:last-of-type { margin-bottom: -21px; }
/* 닫기 띠(margin -24px)가 있는 창: 큰 글자·폭 360 이하에서 옆으로 3px 밀리던 것 */
:is(#tour, #topics, #media, #card, #word, #atlas, #poster, #exhibit) { overflow-x: hidden; }
/* 둘러보기 '뒷자리·앞자리·강단 앞': 낱자에서 끊기지 않게 한 줄로(좁은 폰·큰 글자는 글자를 조금 줄인다) */
#tour .row3 button { flex: 1 1 0; min-width: 0; white-space: nowrap; word-break: keep-all; }
@media (max-width: 340px) { :root[data-text="large"] #tour .row3 button { font-size: 14px; padding: 0 2px; } #tour .row3 { gap: 4px; } }
/* 큰 글자: 닫기 띠는 확대(1.125)되어 바깥 여백 -24px이 -27px이 되어 창 밖으로 3px 나갔다 → 확대 전 값으로 나눠 맞춘다 */
:root[data-text="large"] :is(#tour, #topics, #media, #card, #word, #atlas, #poster, #exhibit) > form:last-of-type { margin-left: calc(-24px / 1.125); margin-right: calc(-24px / 1.125); padding-left: calc(24px / 1.125); padding-right: calc(24px / 1.125); }
/* 함께 있기: 리액션 일곱 가지(두 칸씩, 긴 말은 한 칸 전체), 별명 창 */
#peer .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#peer .choices button { white-space: normal; word-break: keep-all; line-height: 1.3; padding: 8px 10px; background: #F0DDB4; border: 2px solid var(--line); color: var(--line); }
#peer .choices button.wide { grid-column: 1 / -1; }
#nick { width: min(380px, calc(100% - 32px)); }
#nick-input { display: block; width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; font-size: 18px; color: var(--line); background: #FFFFFF; border: 2px solid var(--line); border-radius: 14px; }
#nick-input:focus-visible { outline: 3px solid #B5482E; outline-offset: 2px; }
#nick-error { margin: 8px 0 0; color: #9A3A22; font-weight: 700; font-size: 15px; line-height: 1.5; word-break: keep-all; }
#nick-done { margin: 8px 0 0; color: var(--line); font-weight: 700; font-size: 15px; }
#nick-save { display: block; width: 100%; margin-top: 12px; background: #E9A23B; border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); color: var(--line); }
#nick-auto { display: block; width: 100%; margin-top: 8px; }
/* 짧은 두 말(할렐루야·샬롬)은 한 줄에, 긴 말은 한 줄 전체 */
#peer .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#peer .choices button { padding: 8px 4px; }
@media (max-width: 340px) { :root[data-text="large"] #peer .choices button { font-size: 14px; } }
/* 리액션 창도 좁은 폰·큰 글자에서 넘칠 수 있다: 닫기를 창 아래에 붙인다(다른 창과 같은 띠) */
#peer { max-height: 88dvh; overflow-y: auto; overflow-x: hidden; scroll-padding-bottom: 96px; }
#peer > form:last-of-type { position: sticky; bottom: -24px; margin: 8px -24px -21px; padding: 4px 24px 16px; background: #FBF4E4; border-top: 2px solid rgba(61, 33, 15, 0.15); }
#peer > form:last-of-type::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 32px; background: linear-gradient(rgba(251, 244, 228, 0), #FBF4E4); pointer-events: none; }
:root[data-text="large"] #peer > form:last-of-type { margin-left: calc(-24px / 1.125); margin-right: calc(-24px / 1.125); padding-left: calc(24px / 1.125); padding-right: calc(24px / 1.125); }
#peer .choices button:disabled { opacity: 0.45; cursor: default; }
#peer-state.wait { font-weight: 700; color: #9A3A22; }
#nick-other { display: block; width: 100%; margin-top: 12px; background: #E9A23B; border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); color: var(--line); }
#nick-other[hidden] { display: none; }
#nick-save.secondary { background: transparent; box-shadow: none; }
/* 기도하기 두 단계: 제목 적기 → [기도하기] → 기도하는 장면(둘레가 어두워지고 기도 제목만 남는다) → [아멘] → 기도 카드 */
#pray-dim { position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0; background: radial-gradient(ellipse 75% 55% at 50% 36%, rgba(20, 12, 6, 0.32) 0%, rgba(20, 12, 6, 0.9) 100%); transition: opacity 1600ms cubic-bezier(0.65, 0, 0.35, 1); }
.deep #pray-dim { opacity: 1; }
#pray-now .eyebrow { margin: 0; font-size: 14px; font-weight: 700; color: #9A3A22; }
#pray-now-text { margin: 4px 0 0; font-family: "MaruBuri", "AppleMyungjo", "Noto Serif KR", serif; font-size: 22px; font-weight: 700; line-height: 1.45; word-break: keep-all; }
#btn-start, #btn-amen { background: #E9A23B; border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); color: var(--line); flex: 1 1 0; }
#pray-now .row { justify-content: center; }
#pray-now[hidden], #pray-write[hidden] { display: none; }
/* 제목을 적는 동안만: 잘못 눌렀거나 마음이 바뀐 사람이 기도하지 않고 나간다(2026-11-13 기획자 결정, 검수 P1). 주 단추보다 덜 눈에 띄게 */
#btn-quit { display: block; margin: 4px auto 0; min-height: 44px; padding: 0 16px; background: transparent; border: 0; box-shadow: none; color: var(--line); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { #pray-dim { transition: none; } }
/* 기도 카드: 그림을 화면 높이에 맞춰 줄여 '사진으로 저장'까지 한 화면에(아래로 더 있어요 표시에 단추가 가렸다) */
#card-canvas { width: auto; max-width: 100%; max-height: max(140px, calc(100dvh - 525px)); margin: 0 auto; }   /* 2026-11-18 '카드에 적을 말' 칸만큼 더 줄인다 */
:root[data-text="large"] #card-canvas { max-height: max(120px, calc(100dvh - 580px)); }   /* 큰 글자는 창 안이 1.125배라 더 줄인다 */

/* ---------- 띠 구조(2026-11-13 기획자): 위 띠 = 어디로·앱 전체, 아래 띠 = 여기서 할 것 ---------- */
/* 위 띠: 마치기·본당·교회 둘러보기·소리·설정을 같은 테두리 단추로. 마치기는 왼쪽 끝에서 조금 떨어뜨려 실수로 누르지 않게 */
.bar.top > button { border: 2px solid var(--line); background: #FBF4E4; box-shadow: none; color: var(--line); }
.bar.top > #btn-menu, .bar.top > #btn-home { background: #F0DDB4; }
.bar.top > #btn-leave { margin-right: 6px; }
.bar.top > #btn-sound { width: 44px; min-width: 44px; padding: 0; display: grid; place-items: center; opacity: 1; }
.bar.top > #btn-sound[hidden], .bar.top > #btn-home[hidden] { display: none; }
#btn-sound svg { display: block; }
/* 아래 띠: "여기서 할 것"을 그림 + 짧은 이름 칸으로 한 줄에(시안 A, 2026-11-13 기획자 "난 이게 나아보여"). 칸 수는 그때 할 수 있는 것만. 기도하기가 주황 주 칸 */
.bar.bottom[hidden] { display: none; }
/* 아래 띠 폭 상한은 화면(100vw) 기준: 담는 판의 폭이 한 박자 늦게 잡혀도 띠가 화면 밖으로 나가지 않는다(2026-11-14 검수, 폰에서 양쪽이 잘린 일) */
.bar.bottom { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 4px; width: min(calc(100% - 24px), calc(var(--n, 3) * 92px + 20px)); max-width: calc(100vw - 16px); padding: 6px; border-radius: 24px; }
.bar.bottom > :is(button, a) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 58px; padding: 4px 2px; border: 0; border-radius: 16px; background: transparent; box-shadow: none; color: var(--line); font-size: 14px; font-weight: 700; line-height: 1.2; white-space: normal; word-break: keep-all; text-align: center; }
/* 보러 가기 칸은 <a>다: 밑줄과 파란 글씨를 거두고 다른 칸과 같은 모양으로 둔다(2026-11-14) */
.bar.bottom > a { margin: 0; text-decoration: none; }
/* 보러 가기 칸 이름이 칸보다 길면(좁은 폰·큰 글자에서 「유치부 인스타」 등) 넘치지 않고 띄어쓰기에서 두 줄로 접는다 */
.bar.bottom > a[data-link] .lb { white-space: normal; }      /* 뒤쪽의 한 줄(nowrap) 규칙보다 앞서도록 [data-link]로 무게를 더한다 */
.bar.bottom > :is(button, a)[hidden] { display: none; }
.bar.bottom > #btn-pray { background: #E9A23B; box-shadow: inset 0 0 0 2px var(--line); }
.bar.bottom > button[aria-pressed="true"] { background: #F0DDB4; box-shadow: inset 0 0 0 2px var(--line); }
.bar.bottom .ic { flex: none; }
@media (max-width: 360px) { .bar.bottom > :is(button, a) { font-size: 13px; padding: 4px 0; } .bar.bottom { gap: 2px; padding: 5px; } }
/* 폭 360 이하 + 큰 글자 + '본당' 단추가 있을 때(위 띠 다섯 칸): '교회 둘러보기' 작은 글을 빼고 장소 이름만(설정이 잘렸다) */
/* 좁은 폭 + 큰 글자 + [본당]: '교회 둘러보기'는 눈에만 숨기고 화면 낭독기에는 남긴다(2026-11-13 검수) */
@media (max-width: 360px) { :root[data-text="large"] .bar.top:has(#btn-home:not([hidden])) .tour-word { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
/* 알림 글은 낱말 가운데서 끊지 않는다(320 폭 'A동이에요 · 노란 계단을 누르면 2층으 / 로 가요') */
#toast, #tg-note { word-break: keep-all; overflow-wrap: break-word; }
/* 다섯 칸일 때(앉은 자리): 띠를 화면 폭 가까이 넓히고 글자를 13px로, 이름은 한 줄(오늘의 말씀이 두 줄로 접혀 칸이 들쭉날쭉했다) */
@media (max-width: 600px) { .bar.bottom[data-n="4"], .bar.bottom[data-n="5"], .bar.bottom[data-n="6"] { width: calc(100% - 16px); } }
.bar.bottom > :is(button, a) .lb { white-space: nowrap; letter-spacing: -0.02em; }
.bar.bottom[data-n="5"] > :is(button, a), .bar.bottom[data-n="6"] > :is(button, a) { font-size: 13px; }
@media (max-width: 340px) { .bar.bottom[data-n="5"] > :is(button, a) .lb, .bar.bottom[data-n="6"] > :is(button, a) .lb { white-space: normal; } }
/* 작은 폰에 여섯 칸: 띄어쓰기 없는 '기도하기'는 줄이 안 바뀌어 칸 테두리에 잘렸다 → 칸 안 여백을 줄이고 한 단계 작게(2026-11-13 아이콘 점검) */
@media (max-width: 340px) { .bar.bottom[data-n="6"] { padding-inline: 3px; column-gap: 0; } .bar.bottom[data-n="6"] > :is(button, a) { font-size: 12px; padding-inline: 2px; } .bar.bottom[data-n="6"] > :is(button, a) .lb { letter-spacing: -0.05em; } }
/* 아래 띠 가운데 맞춤: translateX(-50%)는 칸 수가 바뀌어 폭이 달라질 때 사파리가 옛 폭으로 남겨 띠가 오른쪽으로 밀렸다 → 양쪽 0 + 자동 여백으로 */
.bar.bottom { left: 0; right: 0; margin-inline: auto; transform: none; animation-name: rise-up; }
@keyframes rise-up { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .bar.bottom { animation: none; } }
/* 위 띠도 아래 띠처럼 margin으로 가운데 맞춤: 사파리에서 translateX(-50%)가 옛 폭으로 남아 띠가 오른쪽으로 밀렸다.
   폭 340 이하에서 [본당]까지 다섯 단추가 뜨면(마당·로비·A동·B동) [설정]이 화면 끝에 잘렸다 → 단추 사이·안쪽 여백을 줄인다(2026-11-13 검수) */
.bar.top { left: 0; right: 0; width: fit-content; margin-inline: auto; transform: none; animation-name: rise-up; }
@media (max-width: 340px) { .bar.top:has(#btn-home:not([hidden])) { gap: 2px; padding: 6px; } .bar.top:has(#btn-home:not([hidden])) > button { padding: 0 6px; } .bar.top:has(#btn-home:not([hidden])) > #btn-leave { margin-right: 2px; } }
/* 앞으로 긴 장소 이름이 생겨도 위 띠가 넘치지 않게: 좁은 폰에서는 이름 칸 폭을 막고 말줄임(2026-11-14 최종 검수) */
@media (max-width: 360px) { #where { display: block; max-width: 6.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
/* 큰 글자 + [본당]까지 다섯 단추: 390 폭에서도 [설정]이 띠 오른쪽 테두리에 걸렸다 → 폰 폭(430 이하)에서는 단추 사이·안쪽 여백을 줄인다(2026-11-14 최종 검수) */
@media (max-width: 430px) { :root[data-text="large"] .bar.top:has(#btn-home:not([hidden])) { gap: 2px; padding: 6px; } :root[data-text="large"] .bar.top:has(#btn-home:not([hidden])) > button { padding: 0 6px; } :root[data-text="large"] .bar.top:has(#btn-home:not([hidden])) > #btn-leave { margin-right: 2px; } }
/* 기도하는 동안(어두워진 뒤) 위 띠: 3초 또렷하게 있다가 천천히 흐려진다(사라지지 않는다). 누르거나 초점이 오면 곧바로 되살아나고, 3초 뒤 다시 흐려진다(2026-11-15 기획자·검수) */
.praying.deep .bar.top { opacity: 0.6; transition: opacity 600ms cubic-bezier(0.7, 0, 0.84, 0) 3s; }
.praying.deep .bar.top.wake, .praying.deep .bar.top:focus-within { opacity: 1; transition: opacity 200ms cubic-bezier(0.16, 1, 0.3, 1) 0s; }
@media (prefers-reduced-motion: reduce) { .praying.deep .bar.top, .praying.deep .bar.top.wake, .praying.deep .bar.top:focus-within { transition: none; } }
:root[data-text="large"] :is(dialog, #hint) > .cue-slot { zoom: 1; }   /* 띠 자리는 키우지 않는다(음수 여백을 px로 재어 넣으므로) */
@media (max-height: 680px) { #card-make { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; } #card-make > * { grid-column: 1 / -1; } #card-make > #card-canvas { grid-column: 1; margin: 0; } #card-make > label.check { grid-column: 2; grid-row: 1; margin: 0; } }   /* 재검수 R12: 낮은 화면에서는 작아진 미리보기 옆 빈자리에 「머무른 시간 넣기」 */
@media (max-height: 680px) { #card-msg { height: calc(1.5em + 28px); } #card-canvas { max-height: max(100px, calc(100dvh - 500px)); } :root[data-text="large"] #card-canvas { max-height: max(88px, calc(100dvh - 580px)); } }   /* 낮은 화면: 적을 말 칸은 한 줄로 시작(늘려 쓸 수 있음), 그림도 조금 더 줄여 [사진으로 저장]이 띠 자리 위에 */

/* ---------- 업데이트 4 「함께하는 시간」: 기도회 알림·텐트 카드·텐트 옮기기 띠·사슬 설명 ---------- */
/* 앱의 만화 선 카드(#hint·dialog)와 같은 바탕·선·그림자. 등장 expo-out 240ms(위로 8px), 퇴장 expo-in 160ms */
#meet, #tent-card, #tent-bar {
  position: absolute;
  left: 50%;
  width: min(360px, calc(100% - 32px));
  margin: 0;
  padding: 16px;
  background: #FBF4E4;
  color: var(--line);
  border: 3px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 5px 0 var(--line);
  pointer-events: auto;
  text-align: center;
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1), transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
#meet.in, #tent-card.in, #tent-bar.in { opacity: 1; transform: translateX(-50%); }
#meet.out { opacity: 0; transform: translateX(-50%) translateY(8px); transition: opacity 160ms cubic-bezier(0.7, 0, 0.84, 0), transform 160ms cubic-bezier(0.7, 0, 0.84, 0); }
#meet[hidden], #tent-card[hidden], #tent-bar[hidden] { display: none; }
#meet { top: calc(88px + env(safe-area-inset-top)); left: calc(50% + var(--meet-x, 0px)); }      /* --meet-x: 넓은 화면에서 아바타를 비켜 옆으로(prayer-times.js) */
/* 얇은 알약: 한 줄 요약으로도 텐트를 많이 덮을 때(92c9b731 하⑤). 안내 알약(#toast)과 같은 모양, 위 띠 바로 아래, 누르면 카드가 펼쳐진다 */
#meet .pill { display: none; }
#meet.pill { width: max-content; max-width: calc(100% - 32px); padding: 0; border: 0; background: transparent; box-shadow: none; }
#meet.pill > :not(.pill) { display: none; }
#meet.pill .pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 0 20px; border: 0; border-radius: 22px; background: rgba(61, 33, 15, 0.9); color: #FBF4E4; box-shadow: none; font-size: 16px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
#meet.pill .go-ic { font-size: 20px; line-height: 1; }
:root[data-text="large"] #meet.pill .pill { min-height: 42px; }      /* 큰 글자는 zoom 1.125라 47px */
/* 한 줄 요약: 피할 자리가 없을 때(914bf9fd 하3) 설명 줄을 빼고 제목·단추만, 좁아도 단추는 한 줄 */
#meet.mini { padding-top: 12px; padding-bottom: 12px; }
#meet.mini h2 { margin-bottom: 8px; font-size: var(--t-body); }
#meet.mini p { display: none; }
#meet.mini .row { flex-direction: row; flex-wrap: nowrap; }
#meet.mini .row button { width: auto; }
#meet.low { top: auto; bottom: var(--meet-bottom, calc(16px + env(safe-area-inset-bottom))); }      /* 가까운 텐트가 화면 위쪽에 있을 때(열두 번째 묶음) */
/* 텐트 둘러보기 방향 단추(뒤뜰처럼 빈 자리가 멀 때): 화면 가장자리에서 빈 자리 쪽을 가리킨다. 자리는 JS가 transform으로 */
#tent-arrow { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; min-height: 48px; margin: 0; padding: 0 16px; background: #FBF4E4; color: var(--line); border: 3px solid var(--line); border-radius: 24px; box-shadow: 0 3px 0 var(--line); font-size: 16px; font-weight: 700; white-space: nowrap; pointer-events: auto; animation: tentArrowIn 240ms cubic-bezier(0.16, 1, 0.3, 1); }
#tent-arrow[hidden] { display: none; }
/* 텐트 옮기기 장면 전환 막: 들어갈 때 0.12초 어두워지고(expo-in) 0.14초에 걷힘(expo-out). 움직임 줄이기면 쓰지 않는다(JS) */
#tent-veil { position: fixed; inset: 0; background: #1B1D21; opacity: 0; pointer-events: none; z-index: 30; }
#tent-veil.on { opacity: 1; transition: opacity 120ms cubic-bezier(0.7, 0, 0.84, 0); }
#tent-veil.out { opacity: 0; transition: opacity 140ms cubic-bezier(0.16, 1, 0.3, 1); }
#tent-veil.cut { opacity: 1; transition: none; }
#tent-arrow svg { flex: none; transition: transform 160ms cubic-bezier(0.65, 0, 0.35, 1); }
:root[data-text="large"] #tent-arrow { min-height: 54px; font-size: 18px; }
@keyframes tentArrowIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #tent-arrow { animation: none; } #tent-arrow svg { transition: none; } }
#tent-card, #tent-bar { bottom: calc(16px + env(safe-area-inset-bottom)); }
:is(#meet, #tent-card) h2 { margin: 0 0 8px; font-size: var(--t-title); line-height: 1.35; word-break: keep-all; }
:is(#meet, #tent-card, #tent-bar) p { margin: 0 0 12px; font-size: var(--t-body); line-height: var(--lh-body); word-break: keep-all; }
:is(#meet, #tent-card, #tent-bar) .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
:is(#meet, #tent-card, #tent-bar) .row button { flex: 1 1 0; min-width: max-content; min-height: var(--h-btn); background: #F0DDB4; border: 2px solid var(--line); font-size: var(--t-sub); }
:is(#meet .go, #tent-card .move, #tent-bar .put) { background: #E9A23B; box-shadow: 0 3px 0 var(--line); }
#tent-card .row button.plain { background: transparent; border-color: transparent; flex: 0 1 auto; }
#tent-bar .row button:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
#tent-bar .tent-say { font-weight: 700; margin-bottom: 8px; }
#tent-bar .put { display: block; width: 100%; min-height: var(--h-cta); margin: 0 0 8px; border: 2px solid var(--line); font-size: var(--t-sub); }
#tent-bar { padding: 12px; }
#tent-bar [hidden] { display: none; }
#tent-bar .row button { padding: 0 10px; }
/* 텐트를 옮기는 동안: 아래 띠·자리 띠를 숨기고 옮기기 띠만 */
.u4-tent .bar.bottom, .u4-tent .bar.seat, .u4-tent #toast { display: none; }
/* 기도의 사슬 처음 안내(아래쪽 작은 카드, 누를 수 있다 — 재검수 R3). 모양은 기도회 알림과 같다 */
#chain-tip { position: absolute; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); width: min(360px, calc(100% - 32px)); margin: 0; padding: 16px; background: #FBF4E4; color: var(--line); border: 3px solid var(--line); border-radius: 22px; box-shadow: 0 5px 0 var(--line); pointer-events: auto; text-align: center; opacity: 0; transform: translateX(-50%) translateY(8px); transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1), transform 240ms cubic-bezier(0.16, 1, 0.3, 1); }
#chain-tip.in { opacity: 1; transform: translateX(-50%); }
#chain-tip[hidden] { display: none; }
#chain-tip h2 { margin: 0 0 8px; font-size: var(--t-title); }
#chain-tip p { margin: 0 0 12px; font-size: var(--t-body); line-height: var(--lh-body); word-break: keep-all; }
#chain-tip .row { display: flex; gap: 8px; justify-content: center; }
#chain-tip .row button { flex: 1 1 0; min-height: var(--h-btn); background: #F0DDB4; border: 2px solid var(--line); font-size: var(--t-sub); }
#chain-tip .go { background: #E9A23B; box-shadow: 0 3px 0 var(--line); }
#chain-tip .row button[hidden] { display: none; }
:root[data-text="large"] #chain-tip > * { zoom: 1.125; }
@media (prefers-reduced-motion: reduce) { #chain-tip { transform: translateX(-50%); transition: opacity 160ms cubic-bezier(0.16, 1, 0.3, 1); } }
#chain-info .chain-text { font-size: 18px; line-height: 1.55; word-break: keep-all; margin: 0 0 8px; }
#chain-info .eyebrow { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
:root[data-text="large"] :is(#meet, #tent-card, #tent-bar) > * { zoom: 1.125; }
@media (max-width: 340px) { :is(#meet, #tent-card) .row { flex-direction: column; } :is(#meet, #tent-card) .row button { width: 100%; } #tent-bar .row button { padding: 0 6px; font-size: 15px; } }      /* 옮기기 띠는 좁아도 한 줄(띠가 화면을 덜 덮게, 통합 검수 중10) */
@media (prefers-reduced-motion: reduce) {
  #meet, #tent-card, #tent-bar, #meet.out { transform: translateX(-50%); transition: opacity 160ms cubic-bezier(0.16, 1, 0.3, 1); }
}
/* 위 띠 [교회 둘러보기]: 두 줄(작은 '교회 둘러보기' + 장소)을 한 줄 [지도 핀 + 지금 장소 ▾]로(2026-11-18 기획자: 혼자 위아래로 넓은 칸을 차지했다).
   '교회 둘러보기'는 화면 읽기 이름으로만 남는다(.sr). 핀은 아래 띠와 같은 Phosphor bold map-pin */
#btn-tour { display: inline-flex; align-items: center; gap: 5px; line-height: 1.2; padding: 0 12px 0 10px; }
#btn-tour .pin { flex: none; color: #9A3A22; }
@media (max-width: 380px) { #btn-tour { gap: 3px; padding: 0 8px; } #btn-tour .pin { width: 16px; height: 16px; } }
@media (max-width: 360px) { :root[data-text="large"] .bar.top:has(#btn-home:not([hidden])) #btn-tour .pin { display: none; } }   /* 좁은 폭·큰 글자·다섯 칸(2층 예배실 등): 핀을 거두어 [설정]이 띠 안에(2026-11-18 검수, 320 큰 글자에서 15px 넘침) */
/* 재검수 R13(2026-11-18): 위 띠 단추를 손가락 크기 48px로. 320 큰 글자 아래 띠 다섯·여섯 칸은 띠를 양옆으로 넓히고 글자를 살짝 줄여 칸 가장자리에 여백을 둔다 */
.bar.top > button, .bar.top > #btn-menu { min-height: 48px; }
@media (max-width: 340px) { :root[data-text="large"] .bar.bottom:is([data-n="5"], [data-n="6"]) { width: calc(100% - 8px); max-width: calc(100vw - 8px); padding: 4px; gap: 1px; } :root[data-text="large"] .bar.bottom:is([data-n="5"], [data-n="6"]) > :is(button, a) { font-size: 12px; padding-inline: 0; } :root[data-text="large"] .bar.bottom:is([data-n="5"], [data-n="6"]) > :is(button, a) .lb { letter-spacing: -0.04em; } }

/* 새 소식 알약(2026-11-19): 안내 줄(#toast)과 같은 자리, 안내 줄이 비어 있을 때만 */
#news-pill { pointer-events: auto; position: absolute; left: 50%; top: calc(88px + env(safe-area-inset-top)); z-index: 3; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: #3D210F; color: #FBF4E4; font-size: 15px; font-weight: 700; box-shadow: 0 3px 10px rgba(61, 33, 15, 0.3); opacity: 0; transform: translate(-50%, -6px); transition: opacity 240ms cubic-bezier(0.7, 0, 0.84, 0), transform 240ms cubic-bezier(0.7, 0, 0.84, 0); }
#news-pill.on { opacity: 1; transform: translate(-50%, 0); transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1), transform 300ms cubic-bezier(0.16, 1, 0.3, 1); }
#news-pill[hidden] { display: none; }
#news-pill::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #E9A23B; vertical-align: 1px; }
:root[data-text="large"] #news-pill { font-size: 16px; min-height: 54px; }
.praying #news-pill { display: none; }
@media (prefers-reduced-motion: reduce) { #news-pill, #news-pill.on { transition: none; transform: translate(-50%, 0); } }
/* ---------- 업데이트 5 「예배로 오세요」: 예배·모임 시간 카드 ---------- */
#worship { width: min(360px, calc(100% - 32px)); max-height: calc(100% - 48px); overflow-y: auto; }
#worship .eyebrow { margin: 0 0 4px; font-size: 16px; color: var(--ink-2); }
#worship h3 { margin: 18px 0 6px; font-size: 20px; }      /* 본문(18px)보다 큰 소제목(검수 P21) */
#worship .w-now { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; background: #E9A23B; color: var(--line); font-weight: 700; font-size: 17px; }
#worship .w-list { list-style: none; margin: 0; padding: 0; }
#worship .w-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid rgba(61, 33, 15, 0.18); font-size: 18px; line-height: 1.45; word-break: keep-all; }
#worship .w-list li span { color: var(--ink-2); }
#worship .w-more { margin: 12px 0 8px; font-size: 17px; line-height: 1.5; word-break: keep-all; }
#worship a.btn { display: flex; align-items: center; justify-content: center; min-height: var(--h-btn); margin-top: 4px; }
#worship .w-phone { margin: 16px 0 0; font-size: 16px; color: var(--ink-2); }
#worship .w-phone a[x-apple-data-detectors] { color: inherit; text-decoration: none; pointer-events: none; }      /* 아이폰이 번호를 전화 링크로 바꿔도 누를 수 없게 */
:root[data-text="large"] #worship > * { zoom: 1.125; }
#worship .w-close { position: sticky; bottom: -24px; margin: 8px -24px -24px; padding: 8px 24px 24px; background: #FBF4E4; }      /* 창 바탕과 같은 색(c4b88a8 Q14: --paper는 한 단계 달랐다) */      /* [닫기]가 늘 보이게(320 큰 글자에서 스크롤해야 보였다, 검수 P21) */
:root[data-text="large"] #worship .w-close { bottom: calc(-24px / 1.125); margin: 8px calc(-24px / 1.125) calc(-24px / 1.125); padding: 8px calc(24px / 1.125) calc(24px / 1.125); }      /* 큰 글자: 확대(1.125)된 -24px이 -27px이 되어 3px 넘쳤다 → 확대 전 값으로 나눠 맞춘다 */
#worship .w-close button { margin: 0; }

/* 인사 판 [닫기](검수 N10, 2026-11-19): 오른쪽 위 작은 ×. 화면을 누르는 것과 같다 */
#hint #hint-close { position: absolute; top: 4px; right: 4px; width: 48px; height: 48px; min-height: 48px; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; box-shadow: none; font-size: 32px; font-weight: 700; line-height: 1; color: var(--line); }
:root[data-text="large"] #hint #hint-close { width: 54px; height: 54px; }

/* 검수 P20(2026-11-19): 320 큰 글자 아래 띠 다섯·여섯 칸에서 긴 이름(샘물 인스타 등)이 칸 가장자리에 닿지 않게 한 단계 더 줄인다 */
@media (max-width: 340px) { :root[data-text="large"] .bar.bottom:is([data-n="5"], [data-n="6"]) > :is(button, a) { font-size: 11.5px; } }

/* 가로 화면(낮은 높이): 옮기기 띠를 한 줄로 낮게(검수 P26: 화면 높이의 51%를 덮었다) */
@media (orientation: landscape) and (max-height: 520px) {
  #tent-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; width: min(680px, calc(100% - 32px)); padding: 8px 12px; bottom: calc(8px + env(safe-area-inset-bottom)); }
  #tent-bar .tent-say { flex: 1 1 100%; margin: 0; font-size: 15px; }
  #tent-bar .put { flex: 1 1 auto; width: auto; min-height: var(--h-btn); margin: 0; }
  #tent-bar .row { flex: 2 1 auto; }
}
@media (orientation: landscape) and (max-height: 520px) {
  /* 가로 화면: 사슬 안내 카드를 오른쪽 아래 옆으로(가운데 고리를 가리지 않게) */
  #chain-tip { left: auto; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); width: min(330px, 42vw);      /* 아래 띠 위로(c4b88a8 Q7: [앉기]를 70% 덮었다) */
     transform: translateY(8px); padding: 12px; }
  #chain-tip.in { transform: none; }
  #chain-tip h2 { font-size: 18px; margin-bottom: 4px; } #chain-tip p { margin-bottom: 8px; }
}

/* 안내 줄 = 알림 층(기획자 2026-11-19 "상단 버튼과 레벨이 같아 보여서 거슬려서"): 누르는 단추(밝은 크림·굵은 테두리·아래 그림자)와 다르게
   테두리·그림자 없는 어두운 반투명 알약, 크림 글자. 새 소식 알약과 같은 말투. 나타날 때 위에서 살짝 내려오고 사라질 때 흐려진다 */
#toast {
  top: calc(84px + env(safe-area-inset-top));
  padding: 10px 20px; border: 0; border-radius: 22px; box-shadow: none;
  background: rgba(61, 33, 15, 0.9); color: #FBF4E4;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 16px; font-weight: 500; line-height: 1.45;
  pointer-events: none;
  opacity: 1; transform: translate(-50%, 0);
  transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1), transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
#toast:empty { opacity: 0; transform: translate(-50%, -6px); padding: 0; border: 0; box-shadow: none; transition: opacity 240ms cubic-bezier(0.7, 0, 0.84, 0), transform 240ms cubic-bezier(0.7, 0, 0.84, 0); }
#toast.busy::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #E9A23B; vertical-align: 1px; animation: toast-busy 1.2s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes toast-busy { 50% { opacity: 0.25; } }
:root[data-text="large"] #toast { font-size: 17px; }
#tg-note { border: 0; box-shadow: none; border-radius: 22px; background: rgba(61, 33, 15, 0.9); color: #FBF4E4; }
@media (prefers-reduced-motion: reduce) { #toast, #toast:empty { transition: none; transform: translate(-50%, 0); } #toast.busy::before { animation: none; } }

/* 검수 6db51b3 8·9번(모체): 소식 창 긴 줄(공백 없는 주소)이 창을 넘지 않게, 큰 글자에서 소식 글 18px, 함께 있기 알림은 안내 알약 아래로 비키고, 큰 글자 320에서 위 띠와 알약 사이 8px */
#news-list li { overflow-wrap: anywhere; }
:root[data-text="large"] #news-list li { font-size: 18px; }
:root[data-text="large"] #news-list h3 { font-size: 16px; }
:root[data-text="large"] #toast { top: calc(92px + env(safe-area-inset-top)); }

/* 검수 bfe30943(모체): 소식 창 [닫기]가 글이 많아도 늘 보이게(예배 카드와 같은 꼴), 보통 글자도 18px */
#news > form { position: sticky; bottom: -24px; margin: 8px -24px -24px; padding: 8px 24px 24px; background: var(--paper, #FBF4E4); }
:root[data-text="large"] #news > form { margin: 8px calc(-24px / 1.125) calc(-24px / 1.125); padding: 8px calc(24px / 1.125) calc(24px / 1.125); }
#news-list li { font-size: 18px; }

/* 당신이 없는 동안(기획자 2026-11-20): 인사 판 제목 아래 한 줄. 새 층이 아니라 인사의 일부 */
#hint-away { margin: 0 0 var(--s-1, 8px); padding: 8px 12px; border-radius: 12px; background: #F0DDB4; font-size: 16px; font-weight: 700; line-height: 1.45; word-break: keep-all; }
#hint-away[hidden] { display: none; }

/* 마침 화면 「이곳을 친구에게 보내기」(기획자 2026-11-20): [다시 들어가기]와 같은 무게의 밝은 단추, 결과 한 줄은 크림 글자 */
#btn-invite, #bye-return-go { width: auto; min-height: 48px; padding: 0 20px; background: #FBF4E4; color: var(--line); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); font-size: 17px; font-weight: 700; }
#invite-note { color: #FBF4E4; max-width: 30em; word-break: keep-all; overflow-wrap: anywhere; }

/* 공개 기도제목: 본당의 창과 교회에 한마디 입력 칸을 같이 쓴다. */
#public-prayer { width: min(400px, calc(100% - 32px)); max-height: 88dvh; overflow-y: auto; }
#public-prayer h2 { font-size: var(--t-hero); line-height: 1.3; }
#public-prayer :is(.say-note, .small, .check, li) { line-height: var(--lh-body); word-break: keep-all; overflow-wrap: anywhere; }
#public-prayer .small { font-size: var(--t-caption); opacity: 1; color: var(--ink-2); }
#public-prayer textarea { margin-bottom: var(--s-2); }
#public-prayer .check { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--s-2); padding-block: var(--s-2); }
#public-prayer .check input { margin: 1px 0 0; }
#public-prayer #public-prayer-send { background: #E9A23B; box-shadow: 0 3px 0 var(--line); }
#public-prayer-send:disabled { opacity: 0.65; }
:is(#public-prayer-list, .public-prayer-list) { list-style: none; padding: 0; }
:is(#public-prayer-list, .public-prayer-list) li { padding-block: var(--s-2); border-top: 1px solid rgba(61, 33, 15, 0.2); }
:is(#public-prayer-list, .public-prayer-list) p { margin-block: var(--s-2); white-space: pre-wrap; }

#public-prayer-topic { display: block; width: 100%; min-height: var(--h-btn); margin-bottom: var(--s-3); padding: 0 var(--s-3); border: 2px solid var(--line); border-radius: var(--r-btn); color: var(--line); background: var(--paper); font: inherit; }
#public-prayer-topic:focus-visible { outline: 3px solid #B5482E; outline-offset: 2px; }
#ask-pray-topic-title:focus { outline: none; }
.public-prayer-list p { line-height: var(--lh-body); word-break: keep-all; overflow-wrap: anywhere; }
