:root {
  --ink: #f7f3ea;
  --ink-soft: rgba(247, 243, 234, .72);
  --gold: #f3d58a;
  --gold-deep: #d9a845;
  --night: #0b0d12;
  --glass: rgba(14, 16, 22, .48);
  --line: rgba(255, 255, 255, .16);
  --serif: 'Gowun Batang', 'Nanum Myeongjo', serif;
  --sans: 'Noto Sans KR', system-ui, -apple-system, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
html:is([lang="en"], [lang="es"], [lang="vi"], [lang="tl"], [lang="pt"], [lang="ru"]) { --serif: 'Lora', 'Gowun Batang', Georgia, serif; }
html:is([lang="en"], [lang="es"], [lang="vi"], [lang="tl"], [lang="pt"], [lang="ru"]) .prayer { font-weight: 600; letter-spacing: -.005em; }
html[lang="zh-Hant"] { --serif: 'Noto Serif TC', 'Songti TC', serif; }
html[lang="zh-Hans"] { --serif: 'Noto Serif SC', 'Songti SC', serif; }
html[lang^="zh"] .prayer { font-weight: 600; letter-spacing: .02em; }
/* 중국어는 글자 사이에서 줄을 바꿔야 해요 (keep-all 은 한국어용) */
[lang^="zh"] .prayer, .prayer:lang(zh) { word-break: normal; line-break: strict; }
html:not([lang="ko"]) { --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif; }
.menu [aria-current="true"] { color: var(--gold); outline: 1px solid rgba(243,213,138,.4); }
.pill.lang { padding: 9px 11px; font-size: 13px; }
@media (max-width: 380px) { .pill { padding: 8px 11px; font-size: 13px; } .logo { font-size: 20px; } }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
body { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

/* ── 상단 ─────────────────────────────── */
.top { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 12px) 16px 12px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.45), transparent); }
.top > * { pointer-events: auto; }
.logo { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo span { color: var(--gold); }
.demo { font-size: 11px; padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink-soft); }
.top-actions { margin-left: auto; display: flex; gap: 8px; }
.pill { border: 0; border-radius: 99px; padding: 9px 14px; font-size: 14px; font-weight: 500;
  background: var(--ink); color: #15161a; white-space: nowrap; }
.pill.ghost { background: var(--glass); color: var(--ink); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.pill.gold { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #2a1f05; font-weight: 700; }

/* ── 피드 (릴스) ──────────────────────── */
.feed { height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.card { position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; user-select: none; -webkit-user-select: none; }
.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transform: scale(1.04);
  transition: transform 9s ease-out; background: #1a1c22; }
.card.on .bg { transform: scale(1); }
.shade { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.42) 0%, rgba(0,0,0,.12) 28%, rgba(0,0,0,.28) 55%, rgba(0,0,0,.72) 100%); }
.fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }

.content { position: relative; z-index: 2; width: min(100%, 560px); margin: 0 auto; padding: 0 72px 0 24px; }
.label { margin: 0 0 14px; font-size: 12px; letter-spacing: .14em; color: var(--gold); font-weight: 500; }
.label time { color: var(--ink-soft); letter-spacing: 0; margin-left: 6px; }
.prayer { margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.62; word-break: keep-all; overflow-wrap: anywhere;
  white-space: pre-line; text-shadow: 0 2px 18px rgba(0,0,0,.55), 0 1px 2px rgba(0,0,0,.5); }
.prayer.s1 { font-size: 30px; } .prayer.s2 { font-size: 24px; } .prayer.s3 { font-size: 20px; } .prayer.s4 { font-size: 17px; line-height: 1.7; }
.who { margin: 18px 0 0; font-family: var(--serif); color: var(--ink-soft); font-size: 15px; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.verse .prayer { font-weight: 400; }
.verse .who { color: var(--gold); }

/* 오른쪽 버튼 줄 */
.rail { position: absolute; right: 12px; bottom: calc(var(--safe-b) + 128px); z-index: 3; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.rail button { display: grid; place-items: center; gap: 4px; background: none; border: 0; padding: 0; font-size: 11px; color: var(--ink); text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.rail .ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.rail svg { width: 20px; height: 20px; }

/* 함께 기도 버튼 */
.pray-wrap { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 34px); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pray { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 99px; border: 1px solid rgba(243,213,138,.55);
  background: rgba(20, 18, 12, .5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 16px; font-weight: 700; color: var(--gold);
  transition: transform .15s ease, background .3s ease, color .3s ease, box-shadow .3s ease; }
.pray:active { transform: scale(.96); }
.pray .em { font-size: 19px; line-height: 1; }
.pray.done { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #2a1f05; border-color: transparent; box-shadow: 0 0 36px rgba(243,213,138,.45); }
.pray-count { font-size: 13px; color: var(--ink-soft); text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.pray-count b { color: var(--ink); }

/* 두 번 탭했을 때 빛 */
.burst { position: absolute; z-index: 4; width: 140px; height: 140px; margin: -70px 0 0 -70px; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,240,200,.95) 0%, rgba(243,213,138,.5) 30%, transparent 68%); animation: burst .9s ease-out forwards; }
@keyframes burst { 0% { transform: scale(.2); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }

/* 처음 안내 카드 */
.intro .content { padding-right: 24px; text-align: center; }
.intro h1 { margin: 0 0 16px; font-family: var(--serif); font-size: 34px; line-height: 1.35; text-shadow: 0 2px 18px rgba(0,0,0,.5); }
.intro h1 em { font-style: normal; color: var(--gold); }
.intro p { margin: 0 auto; max-width: 300px; color: var(--ink-soft); line-height: 1.7; font-size: 15px; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.intro .cta { margin-top: 26px; display: flex; gap: 10px; justify-content: center; }
.swipe-hint { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 28px); z-index: 3; text-align: center; font-size: 12px; color: var(--ink-soft); animation: hint 2s ease-in-out infinite; }
@keyframes hint { 50% { transform: translateY(-8px); } }
.end .content { text-align: center; padding-right: 24px; }

/* ── 시트 공통 ────────────────────────── */
.sheet { position: fixed; inset: 0; z-index: 40; animation: up .28s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); font-size: 15px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* 기도 올리기 */
.compose { display: flex; flex-direction: column; background: var(--night); }
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.stage .bg { transform: none; transition: opacity .3s; }
.c-head { position: relative; z-index: 3; display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-t) + 12px) 16px 8px; }
.c-title { font-weight: 700; font-size: 16px; }
.count { margin-left: auto; font-size: 12px; color: var(--ink-soft); }
.c-body { position: relative; z-index: 3; flex: 1; display: flex; flex-direction: column; justify-content: center; width: min(100%, 560px); margin: 0 auto; padding: 0 24px 16px; }
.c-body textarea { width: 100%; background: transparent; border: 0; outline: 0; resize: none; color: var(--ink);
  font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.62; text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.c-body textarea::placeholder { color: rgba(247,243,234,.62); font-weight: 400; font-size: 18px; }
.c-body input { margin-top: 12px; width: 60%; background: transparent; border: 0; border-bottom: 1px solid var(--line); outline: 0; padding: 8px 0;
  color: var(--ink-soft); font-family: var(--serif); font-size: 15px; }
.c-body input:focus { border-color: var(--gold); }
.tray { background: #11131a; border-top: 1px solid var(--line); padding: 10px 0 calc(var(--safe-b) + 12px); }
.row-label { padding: 6px 16px 6px; font-size: 12px; color: var(--ink-soft); }
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 6px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.thumb { position: relative; flex: none; width: 48px; height: 84px; border-radius: 10px; overflow: hidden; padding: 0; border: 2px solid transparent; background: #222; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb[aria-selected="true"] { border-color: var(--gold); }
.badge { position: absolute; left: 4px; top: 4px; font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 4px; background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #2a1f05; }
.fx-chip { flex: none; border-radius: 99px; padding: 8px 14px; font-size: 13px; border: 1px solid var(--line); background: transparent; }
.fx-chip[aria-selected="true"] { border-color: var(--gold); color: var(--gold); }
.fx-chip .badge { position: static; margin-left: 6px; }
.submit { display: block; width: calc(100% - 32px); margin: 12px 16px 0; padding: 15px; border: 0; border-radius: 14px; font-size: 16px; font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #2a1f05; }
.submit:disabled { opacity: .5; }
.fine { margin: 10px 16px 0; font-size: 11px; color: rgba(247,243,234,.5); text-align: center; }
.pro-bar { margin: 0 16px 8px; padding: 12px; border-radius: 12px; background: rgba(243,213,138,.1); border: 1px solid rgba(243,213,138,.35); }
.pro-bar p { margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.pro-bar b { color: var(--gold); }
.pro-actions { display: flex; gap: 8px; }

/* 내 기도 */
.panel { background: rgba(11,13,18,.97); overflow-y: auto; padding: calc(var(--safe-t) + 12px) 16px calc(var(--safe-b) + 24px); }
.panel-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 18px; margin-bottom: 16px; }
.mine-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.stat { padding: 14px; border-radius: 14px; background: #161922; border: 1px solid var(--line); }
.stat b { display: block; font-size: 24px; color: var(--gold); font-family: var(--serif); }
.stat span { font-size: 12px; color: var(--ink-soft); }
.mine-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mine-list li { display: flex; gap: 12px; padding: 10px; border-radius: 14px; background: #161922; border: 1px solid var(--line); align-items: center; }
.mine-list img { width: 48px; height: 84px; object-fit: cover; border-radius: 8px; flex: none; }
.mine-list .t { font-family: var(--serif); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mine-list .n { margin-top: 6px; font-size: 12px; color: var(--gold); }
.mine-list .share-s { margin-left: auto; flex: none; }
.empty { color: var(--ink-soft); text-align: center; padding: 40px 0; line-height: 1.7; }

/* 더보기 메뉴 */
.menu { inset: auto 0 0; max-height: 80dvh; overflow-y: auto; padding: 8px 12px calc(var(--safe-b) + 12px); background: #161922; border-radius: 18px 18px 0 0; display: grid; gap: 6px; box-shadow: 0 -20px 60px rgba(0,0,0,.6); }
.menu button { padding: 15px; border-radius: 12px; border: 0; background: #1f232e; font-size: 15px; }
.menu .muted { color: var(--ink-soft); background: transparent; }

.toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 70px); z-index: 60; transform: translate(-50%, -12px); opacity: 0; width: max-content; pointer-events: none;
  padding: 11px 18px; border-radius: 99px; background: rgba(20,22,30,.92); border: 1px solid var(--line); font-size: 14px; transition: .25s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 프리미엄 효과 ────────────────────── */
.fx-rays { position: absolute; inset: -30% -30% 0; background:
  repeating-conic-gradient(from 200deg at 50% 0%, rgba(255,236,190,.0) 0deg, rgba(255,236,190,.3) 4deg, rgba(255,236,190,0) 9deg, rgba(255,236,190,0) 16deg);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%); -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
  mix-blend-mode: screen; animation: rays 14s ease-in-out infinite alternate; transform-origin: 50% 0%; }
@keyframes rays { from { transform: rotate(-4deg); opacity: .7; } to { transform: rotate(4deg); opacity: 1; } }
.flake { position: absolute; top: -10px; border-radius: 50%; background: #fff; opacity: .85; animation: fall linear infinite; filter: blur(.3px); }
@keyframes fall { to { transform: translate3d(var(--dx), 105dvh, 0); } }
.fly { position: absolute; border-radius: 50%; background: #ffe9a0; box-shadow: 0 0 10px 3px rgba(255,220,120,.7); animation: drift ease-in-out infinite alternate, blink 2.4s ease-in-out infinite; }
@keyframes drift { to { transform: translate3d(var(--dx), var(--dy), 0); } }
@keyframes blink { 50% { opacity: .15; } }
@media (prefers-reduced-motion: reduce) {
  .fx-rays, .flake, .fly, .swipe-hint { animation: none; }
  .bg { transition: none; }
}

@media (min-width: 700px) {
  .feed, .compose, .panel { max-width: 480px; margin: 0 auto; }
  .feed { box-shadow: 0 0 80px rgba(0,0,0,.7); }
  body { background: radial-gradient(circle at 50% 20%, #1b1f2a, #07080b 70%); }
  .top, .compose, .panel { left: 50%; right: auto; width: 480px; transform: translateX(-50%); }
  .compose, .panel { animation: none; }
  .menu { max-width: 480px; margin: 0 auto; }
}

/* 공개 범위 (전체 공개 / 톡방에만) */
.vis { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 16px 0; padding: 4px; border-radius: 12px; background: #1a1d26; border: 1px solid var(--line); }
.vis button { border: 0; border-radius: 9px; padding: 10px 6px; background: transparent; color: var(--ink-soft); font-size: 14px; font-weight: 500; }
.vis button[aria-checked="true"] { background: #2a2e3b; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(243,213,138,.45); }
.vis-hint { margin: 6px 16px 0; font-size: 12px; color: var(--ink-soft); }
.lock { color: var(--ink-soft); letter-spacing: 0; margin-left: 6px; }

/* 공유 메시지 */
.share-sheet { gap: 10px; padding-top: 14px; }
.sh-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; font-size: 16px; }
.sh-hint { margin: 0 4px; font-size: 12px; color: var(--ink-soft); }
.share-sheet textarea { width: 100%; resize: vertical; min-height: 120px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: #0f1117;
  color: var(--ink); font: 15px/1.6 var(--sans); outline: 0; }
.share-sheet textarea:focus { border-color: rgba(243,213,138,.6); }
.sh-url { margin: 0 4px; font-size: 12px; color: var(--gold); overflow-wrap: anywhere; }
.sh-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; }
.sh-actions .submit { width: auto; margin: 0; }
.sh-actions .pill { border-radius: 14px; padding: 0 18px; }
.share-sheet .icon-btn { padding: 0; width: 34px; height: 34px; background: transparent; }
.share-sheet .submit { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #2a1f05; padding: 15px; font-weight: 700; }
.share-sheet .pill.ghost { background: #1f232e; padding: 0 18px; }

/* ── 아래 탭 ─────────────────────────────────── */
:root { --tab: 58px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: calc(var(--tab) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(10, 12, 17, .86); border-top: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.tabbar button { display: grid; justify-items: center; gap: 2px; background: none; border: 0; color: var(--ink-soft); font-size: 10.5px; padding: 6px 0; }
.tabbar i { font-style: normal; font-size: 18px; line-height: 1; }
.tabbar [aria-current="page"] { color: var(--gold); }
.tabbar .tab-post i { width: 46px; height: 34px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #2a1f05; }
.pray-wrap { bottom: calc(var(--safe-b) + var(--tab) + 22px); }
.rail { bottom: calc(var(--safe-b) + var(--tab) + 110px); }
.swipe-hint { bottom: calc(var(--safe-b) + var(--tab) + 18px); }
.tabpanel { z-index: 25; padding-bottom: calc(var(--safe-b) + var(--tab) + 28px); animation: none; }
.tabpanel .panel-head { position: sticky; top: calc(-1 * (var(--safe-t) + 12px)); z-index: 2; margin: calc(-1 * (var(--safe-t) + 12px)) -16px 14px;
  padding: calc(var(--safe-t) + 14px) 16px 12px; background: rgba(11,13,18,.95); }
#mine { z-index: 35; }

/* 공통 블록 */
.block { display: block; width: 100%; text-align: left; padding: 14px; border-radius: 16px; background: #161922; border: 1px solid var(--line); margin: 0 0 12px; color: inherit; font: inherit; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; }
.plus-tag::after { content: 'PLUS'; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #2a1f05; letter-spacing: .04em; }
.hint { margin: 8px 0 0; font-size: 12px; line-height: 1.55; color: var(--ink-soft); }
.hint.center { text-align: center; }
.file-btn { cursor: pointer; display: inline-flex; align-items: center; }
.streak-pill { font-size: 13px; color: var(--gold); font-weight: 600; }

/* 오늘의 말씀 배경화면 */
.wp-wrap canvas { display: block; width: 48%; max-width: 230px; height: auto; margin: 12px auto 4px; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.55); background: #111; }
.wp-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.wp-actions .pill { font-size: 13px; padding: 8px 13px; }
.wp-block .hint { text-align: center; }

/* 기도 순서 카드 */
.routine-card { cursor: pointer; }
.routine-card .block-head, .routine-card .hint, .routine-card .routine-go { display: flex; }
.routine-go { margin-top: 10px; color: var(--gold); font-weight: 600; font-size: 14px; }

/* 기도 약속 */
.promise-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.promise-list li { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 10px; border-radius: 12px; background: #1d212c; }
.promise-list .t { font-family: var(--serif); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.promise-list .d { grid-column: 1; font-size: 11px; color: var(--gold); }
.promise-list button { grid-row: 1 / span 2; grid-column: 2; font-size: 12px; padding: 8px 11px; }
.promise-list .empty { display: block; background: none; padding: 4px 0; font-size: 12px; color: var(--ink-soft); }
.remind-row { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.remind-row input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: #0f1117; color: var(--ink); font: 15px var(--sans); color-scheme: dark; }

/* 기도 노트 */
.note-new textarea { width: 100%; resize: vertical; min-height: 84px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: #0f1117; color: var(--ink); font: 15px/1.6 var(--serif); outline: 0; }
.note-new .submit { width: 100%; margin: 10px 0 0; padding: 12px; }
.note-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.note-list li { padding: 12px 14px; border-radius: 14px; background: #161922; border: 1px solid var(--line); }
.note-list li.ans { border-color: rgba(243,213,138,.45); background: linear-gradient(180deg, rgba(243,213,138,.07), #161922 60%); }
.note-meta { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--ink-soft); }
.chip { padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); font-size: 11px; }
.ans .chip { color: var(--gold); border-color: rgba(243,213,138,.5); }
.note-text { margin: 8px 0 0; font-family: var(--serif); font-size: 15px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.note-answer { margin: 8px 0 0; padding-left: 10px; border-left: 2px solid var(--gold); font-size: 13px; line-height: 1.6; color: var(--ink-soft); white-space: pre-line; }
.note-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.note-actions button { font-size: 12px; padding: 7px 11px; }
.note-actions textarea { width: 100%; min-height: 60px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #0f1117; color: var(--ink); font: 14px/1.5 var(--sans); }
.year-ago { margin-bottom: 12px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(243,213,138,.16), rgba(243,213,138,.04)); border: 1px solid rgba(243,213,138,.4); }
.year-ago b { color: var(--gold); font-size: 13px; }
.year-ago p { margin: 6px 0 0; font-family: var(--serif); line-height: 1.6; }
.note-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.note-tools .pill { font-size: 12.5px; padding: 8px 12px; }

/* Plus 소개 */
.plus-hero { text-align: center; padding: calc(var(--safe-t) + 8px) 8px 6px; }
.plus-badge { margin: 0; color: var(--gold); font-weight: 700; letter-spacing: .2em; font-size: 12px; }
.plus-hero h2 { margin: 8px 0 6px; font-family: var(--serif); font-size: 30px; }
.plus-hero p { margin: 0; color: var(--ink-soft); line-height: 1.6; }
.plus-hero .plus-beta { display: inline-block; margin-top: 12px; padding: 6px 12px; border-radius: 99px; border: 1px solid rgba(243,213,138,.45); color: var(--gold); font-size: 13px; }
.benefits { list-style: none; margin: 18px 0 8px; padding: 0; display: grid; gap: 10px; }
.benefits li { padding: 14px; border-radius: 16px; background: #161922; border: 1px solid var(--line); }
.benefits .b-title { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 16px; }
.benefits .b-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(243,213,138,.12); font-size: 17px; }
.benefits .b-desc { margin: 8px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.benefits .b-actions { display: flex; gap: 8px; margin-top: 12px; }
.benefits .vote { flex: 1; font-size: 13px; }
.benefits .vote[aria-pressed="true"] { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #2a1f05; border-color: transparent; }
.benefits .try { font-size: 13px; }

/* 오늘의 기도 순서 (전체 화면) */
.routine { z-index: 45; display: flex; flex-direction: column; background: var(--night); overflow: hidden; }
.routine .bg { transform: none; }
.routine .shade { background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.35) 40%, rgba(0,0,0,.75)); }
.r-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 12px) 16px 8px; }
.r-count { flex: 1; font-size: 13px; color: var(--ink-soft); }
.r-body { position: relative; z-index: 2; flex: 1; overflow-y: auto; display: flex; flex-direction: column; justify-content: center; width: min(100%, 560px); margin: 0 auto; padding: 8px 26px; }
.r-title { margin: 0 0 14px; font-family: var(--serif); font-size: 32px; text-shadow: 0 2px 16px rgba(0,0,0,.5); }
.r-desc { margin: 0; font-size: 17px; line-height: 1.75; color: rgba(247,243,234,.9); text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.r-extra { margin-top: 18px; }
.r-verse { padding: 16px; border-radius: 14px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.14); font-family: var(--serif); font-size: 19px; line-height: 1.7; }
.r-verse small { display: block; margin-top: 8px; font-size: 13px; color: var(--gold); font-family: var(--sans); }
.r-extra textarea { width: 100%; min-height: 90px; padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.4); color: var(--ink); font: 15px/1.6 var(--serif); }
.r-extra .pill { margin-top: 10px; }
.r-nav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px calc(var(--safe-b) + 16px); }
.r-dots { display: flex; gap: 6px; }
.r-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.3); }
.r-dots i.on { background: var(--gold); }
.r-nav .pill { min-width: 88px; }

/* 올해의 기도 책 — 인쇄할 때만 보여요 */
@media print {
  html, body { height: auto; overflow: visible; background: #fff; color: #111; }
  body > *:not(#book) { display: none !important; }
  #book { display: block !important; padding: 0 8mm; font-family: 'Gowun Batang', 'Lora', serif; }
  #book h1 { font-size: 26pt; margin: 0 0 4pt; }
  #book .sub { color: #666; margin: 0 0 18pt; }
  #book article { break-inside: avoid; border-top: 1px solid #ddd; padding: 10pt 0; }
  #book time { color: #888; font-size: 9pt; }
  #book .t { font-size: 12pt; line-height: 1.7; white-space: pre-line; margin: 4pt 0; }
  #book .a { font-size: 10.5pt; color: #8a6a1e; border-left: 2px solid #d9a845; padding-left: 8pt; white-space: pre-line; }
}
@media (min-width: 700px) {
  .tabbar { max-width: 480px; margin: 0 auto; }
  .routine { max-width: 480px; margin: 0 auto; }
}

/* ── 아이콘 (Phosphor Icons, MIT) ─────────────── */
.i { width: 1.2em; height: 1.2em; flex: none; fill: currentColor; vertical-align: -0.22em; }
.logo { display: inline-flex; align-items: center; gap: 7px; }
.logo-mark { width: 26px; height: 26px; fill: url(#goldGrad); filter: drop-shadow(0 2px 6px rgba(0,0,0,.45)); }
.tabbar .i { width: 24px; height: 24px; vertical-align: 0; }
.tabbar .on { display: none; }
.tabbar [aria-current="page"] .on { display: block; }
.tabbar [aria-current="page"] .off { display: none; }
.tabbar .tab-post b { width: 48px; height: 36px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, #f7e3a6, #e9c16b 55%, #c8963a); color: #2a1f05; box-shadow: 0 4px 16px rgba(217,168,69,.35); }
.tabbar .tab-post .i { width: 22px; height: 22px; }
.icon-btn { display: grid; place-items: center; }
.icon-btn .i { width: 18px; height: 18px; vertical-align: 0; }
.rail .ic .i { width: 22px; height: 22px; vertical-align: 0; }
.pray .i { width: 22px; height: 22px; }
.pray .i.on { display: none; }
.pray.done .i.on { display: inline-block; }
.pray.done .i.off { display: none; }
.pill, .submit, .menu button, .vis button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.menu button { display: flex; }
.streak-pill { display: inline-flex; align-items: center; gap: 5px; }
.streak-pill .i { color: #f0a35a; }
.benefits .b-ic { color: var(--gold); }
.benefits .b-ic .i { width: 20px; height: 20px; vertical-align: 0; }
.plus-badge { display: inline-flex; align-items: center; gap: 6px; }
.plus-badge .i { fill: url(#goldGrad); width: 16px; height: 16px; }
.chip { display: inline-flex; align-items: center; gap: 4px; }
.lock { display: inline-flex; align-items: center; gap: 3px; }
.lock .i { width: 13px; height: 13px; vertical-align: 0; }
.swipe-hint { display: grid; justify-items: center; gap: 2px; }
.swipe-hint .i { width: 18px; height: 18px; }
.routine-go .i { width: 16px; height: 16px; vertical-align: -0.15em; }
.logo span.wm { color: var(--ink); }
.logo .wm b { color: var(--gold); font-weight: inherit; }
.tabpanel { background: var(--night); }

/* 로고 (꽃봉오리 + prayfine) */
.logo img { display: block; height: 34px; width: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.intro-mark { display: block; height: 92px; margin: 0 auto 18px; filter: drop-shadow(0 4px 18px rgba(0,0,0,.5)); }

/* 언어 고르기 */
#langMenu { gap: 8px; padding-top: 14px; max-height: 88dvh; }
#langMenu .sh-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; font-size: 15px; }
#langMenu .sh-head b { display: inline-flex; align-items: center; gap: 6px; }
#langMenu .icon-btn { padding: 0; width: 34px; height: 34px; background: transparent; }
.lm-label { margin: 10px 4px 0; font-size: 13px; font-weight: 700; color: var(--gold); }
#langMenu .hint { margin: 0 4px; }
.lm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#langMenu .lm-opt { padding: 12px 10px; font-size: 14px; border: 1px solid transparent; }
#langMenu .lm-opt[aria-checked="true"] { color: var(--gold); border-color: rgba(243,213,138,.5); background: rgba(243,213,138,.08); }
#langMenu .lm-opt .i { width: 15px; height: 15px; }
#langMenu .submit { width: 100%; margin: 8px 0 0; background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #2a1f05; }

/* 로그인 · 계정 */
.top-actions { align-items: center; }
.icon-btn.acct { width: 38px; height: 38px; color: var(--ink); }
.icon-btn.acct .i { width: 22px; height: 22px; }
.icon-btn.acct.on { color: var(--gold); border-color: rgba(243,213,138,.55); }
.acct-sheet { gap: 8px; padding-top: 14px; }
.acct-sheet .sh-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; font-size: 16px; }
.acct-sheet .sh-head b { display: inline-flex; align-items: center; gap: 6px; }
.acct-sheet .icon-btn { padding: 0; width: 34px; height: 34px; background: transparent; }
.acct-why { margin: 0 4px 6px; font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.acct-why .i { color: var(--gold); }
.acct-sheet .submit { width: 100%; margin: 0; background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #2a1f05; }
.acct-sheet .acct-btn { width: 100%; }
.acct-sheet .acct-btn.kakao { background: #fee500; color: #191600; }
.acct-sheet .acct-btn.muted { background: transparent; color: var(--ink-soft); }
.acct-sheet .hint { margin: 4px 4px 0; }
.acct-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.acct-row > .i:first-child { width: 26px; height: 26px; color: var(--gold); }
.acct-row span { flex: 1; display: grid; gap: 2px; }
.acct-row b { font-size: 14.5px; }
.acct-row small { font-size: 12px; color: var(--ink-soft); }
.acct-row > .i:last-child { color: var(--ink-soft); }

/* ── 디자인 다듬기 (design-critique 반영) ─────────── */
/* 1. 작은 화면 글자: 화면 너비에 맞춰 줄어들게, 한국어는 낱말 단위 줄바꿈 */
.prayer.s1 { font-size: clamp(24px, 7.4vw, 30px); }
.prayer.s2 { font-size: clamp(20px, 6.1vw, 24px); }
.prayer.s3 { font-size: clamp(17.5px, 5.2vw, 20px); }
.prayer.s4 { font-size: clamp(16px, 4.6vw, 17px); }
.intro h1 { font-size: clamp(25px, 7.6vw, 34px); word-break: keep-all; text-wrap: balance; }
.intro p, .prayer, .r-title, .plus-hero h2 { text-wrap: pretty; }
.r-title { font-size: clamp(26px, 8vw, 32px); }
/* 라벨 글자 간격은 로마자 언어에만 */
.label { letter-spacing: .02em; }
html:is([lang="en"], [lang="es"], [lang="vi"], [lang="tl"], [lang="pt"], [lang="ru"]) .label { letter-spacing: .14em; }

/* 2. 밝은 사진 위 가독성: 글씨 뒤에 은은한 어둠층 */
.card .content::before { content: ''; position: absolute; inset: -56px -28px -40px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 45% 50%, rgba(5,7,14,.42), rgba(5,7,14,.2) 45%, transparent 72%); }
.label { text-shadow: 0 1px 6px rgba(0,0,0,.75); }
.who { color: rgba(247,243,234,.82); }
.stage .shade { background: linear-gradient(to bottom, rgba(0,0,0,.6) 0%, rgba(0,0,0,.42) 45%, rgba(0,0,0,.5) 100%); }

/* 3. 누르는 영역 44px · 탭 글자 키우기 */
.icon-btn, .icon-btn.acct { width: 44px; height: 44px; }
.pill { min-height: 40px; }
.top .pill, .top .icon-btn { min-height: 44px; }
.tabbar button { font-size: 12px; min-height: 52px; }
.rail button { font-size: 12px; }
.rail .ic { width: 46px; height: 46px; }
.note-tools .pill, .wp-actions .pill, .note-actions button { min-height: 44px; }
.acct-sheet .icon-btn, .share-sheet .icon-btn, #langMenu .icon-btn { width: 44px; height: 44px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 10px; }

/* 기도 올리기: 쓰는 칸을 넓게, 아래 선택 영역은 촘촘하게 */
.stage { min-height: 40dvh; }
.tray { padding-top: 6px; }
.row-label { padding: 4px 16px 4px; }
.thumb { width: 44px; height: 76px; border-radius: 9px; }
.fx-chip { padding: 7px 12px; }
.vis { margin-top: 8px; }
.vis button { min-height: 42px; }
.submit { margin-top: 10px; }
.fine { margin-top: 8px; }

/* 언어 창: 완료 버튼은 아래에 고정 */
#langMenu { padding-bottom: 0; }
#langMenu .submit { position: sticky; bottom: 0; margin: 10px -12px 0; width: calc(100% + 24px); border-radius: 0;
  padding: 16px 16px calc(var(--safe-b) + 16px); box-shadow: 0 -12px 24px rgba(22,25,34,.9); }
/* 첫 화면: 아래 '위로 넘겨 보세요'와 버튼이 겹치지 않게 */
.intro .content { padding-bottom: 64px; }
@media (max-height: 700px) { .intro-mark { height: 64px; margin-bottom: 10px; } .intro .cta { margin-top: 18px; } }
