/* 연말 모임 사진 모으기 (예수순전한교회)
   색: 교회 로고의 파랑(#1C5FAB·#3BA3DC)과 초록(#5BB43B)을 바탕으로, 연말 느낌의 금색 전구를 더했다.
   머리: 짙은 파랑 바탕 + 흰 로고(글자 로고 이미지) + 원형 엠블럼을 큰 무늬로 깔았다.
   글자: 본문은 Pretendard. 교회 이름은 로고 이미지를 그대로 쓴다. 휴대폰 화면 기준. */

:root {
  color-scheme: light;
  --bg: #F6F7F4;
  --paper: #FFFFFF;
  --ink: #14233A;
  --muted: #5D6A7C;
  --line: #DCE3EC;
  --line-soft: #ECF0F5;
  --brand: #1C5FAB;
  --brand-dark: #154A87;
  --brand-deep: #0B2A52;
  --brand-soft: #E7F0FA;
  --sky: #3BA3DC;
  --sky-soft: #E4F2FB;
  --gold: #D9A43B;
  --gold-light: #F4D27A;
  --gold-soft: #FFF2D6;
  --pine: #3E8F2A;
  --pine-soft: #E7F4E0;
  --error: #C8382E;
  --error-soft: #FCEAE8;
  --warn: #9A5B00;
  --warn-soft: #FFF3D6;
  --body: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --gutter: 16px;
  --radius: 18px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
b { font-weight: 700; }

/* ---- 머리 ---- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1.5px 1.5px at 12% 30%, rgba(255, 236, 190, .9), transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 22%, rgba(255, 236, 190, .8), transparent 60%),
    radial-gradient(2px 2px at 88% 70%, rgba(255, 236, 190, .7), transparent 60%),
    radial-gradient(1.5px 1.5px at 30% 82%, rgba(255, 236, 190, .6), transparent 60%),
    radial-gradient(1px 1px at 55% 55%, rgba(255, 236, 190, .7), transparent 60%),
    radial-gradient(130% 95% at 50% 0%, var(--brand) 0%, var(--brand-dark) 50%, var(--brand-deep) 100%);
  padding: calc(env(safe-area-inset-top, 0px) + 62px) var(--gutter) 46px;
  text-align: center;
}
/* 원형 엠블럼을 흰 무늬로 크게 깐다 (배경 이미지) */
.emblem {
  position: absolute; z-index: 0;
  width: 128%; max-width: 640px; height: auto;
  right: -38%; top: 50%; transform: translateY(-46%);
  filter: brightness(0) invert(1);
  opacity: .1;
  pointer-events: none; user-select: none;
}
@media (min-width: 600px) { .emblem { width: 560px; right: calc(50% - 520px); } }
.lights { position: absolute; z-index: 1; left: 0; top: 0; width: 100%; height: 54px; }
.bulbs circle { fill: var(--gold-light); filter: drop-shadow(0 0 4px rgba(244, 210, 122, .9)); animation: twinkle 2.8s ease-in-out infinite; }
.bulbs circle:nth-child(2n) { fill: #9FD6F5; animation-delay: -1.1s; }
.bulbs circle:nth-child(3n) { fill: #FFF3CF; animation-delay: -2s; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .bulbs circle { animation: none; } }

.hero-in { position: relative; z-index: 2; max-width: 560px; margin: 0 auto; }
.logo { display: block; width: min(250px, 72%); height: auto; margin: 0 auto 22px; }
.hero h1 { margin: 0; font-size: clamp(30px, 9vw, 44px); line-height: 1.18; font-weight: 800; letter-spacing: -0.02em; }
.eyebrow {
  display: inline-block; margin: 0 0 12px; padding: 3px 12px;
  border: 1px solid rgba(244, 210, 122, .6); border-radius: 999px;
  color: var(--gold-light); font-size: 13px; font-weight: 600; letter-spacing: .08em;
}
.date { margin: 10px 0 0; color: var(--gold-light); font-weight: 600; }
.lead { margin: 14px 0 0; color: rgba(255, 255, 255, .86); font-size: 15.5px; }
.lead b { color: #fff; }
/* ---- 본문 ---- */
.wrap {
  max-width: 560px; margin: -18px auto 0; position: relative;
  padding: 0 var(--gutter) calc(140px + env(safe-area-inset-bottom, 0px));
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(11, 42, 82, .03), 0 8px 24px -16px rgba(11, 42, 82, .25);
}
.card h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 18px; font-weight: 750; letter-spacing: -0.01em; }
.num {
  display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none;
  border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; font-weight: 800;
}

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 650; color: var(--ink); }
.field em { font-style: normal; color: var(--brand); font-size: 12px; font-weight: 700; margin-left: 4px; }
.field i { font-style: normal; color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 4px; }
.field input, .field textarea {
  display: block; width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff;
  font-size: 16px;            /* 16px 미만이면 아이폰이 확대한다 */
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field.bad input { border-color: var(--error); background: var(--error-soft); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.agree { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--bg); font-size: 14px; color: var(--ink); cursor: pointer; }
.agree input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.agree.bad { outline: 2px solid var(--error); background: var(--error-soft); }

/* 사진 고르기 */
.file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pick {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 148px; padding: 18px;
  border: 2px dashed #A9D2EE; border-radius: 16px;
  background: linear-gradient(180deg, #F7FBFF, var(--sky-soft));
  color: var(--brand-dark); text-align: center; cursor: pointer;
  transition: transform .2s var(--ease), background .2s;
}
.pick:active { transform: scale(.985); }
.pick svg { width: 38px; height: 38px; margin-bottom: 4px; }
.pick span { font-size: 19px; font-weight: 800; }
.pick small { color: var(--muted); font-size: 13px; }
.alt { margin: 10px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }

.tip { margin-top: 14px; border-top: 1px solid var(--line-soft); padding-top: 12px; font-size: 14px; color: var(--muted); }
.tip summary { cursor: pointer; font-weight: 650; color: var(--ink); list-style: none; }
.tip summary::-webkit-details-marker { display: none; }
.tip summary::before { content: '＋'; display: inline-block; width: 1.3em; color: var(--sky); font-weight: 800; }
.tip[open] summary::before { content: '－'; }
.tip ul { margin: 8px 0 0; padding-left: 20px; }
.tip li { margin-bottom: 6px; }

/* 고른 목록 */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list-head h2 { margin-bottom: 6px; }
.list-head .link { font-size: 13.5px; }
.sum { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.files { list-style: none; margin: 0; padding: 0; }
.files li {
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 4px 10px;
  padding: 10px 0; border-top: 1px solid var(--line-soft);
}
.files li:first-child { border-top: 0; }
.ico { grid-row: span 2; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--sky-soft); color: var(--brand-dark); font-size: 12px; font-weight: 800; }
.ico.video { background: #EAE3F3; color: #4B2D73; }
.fname { font-size: 14.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmeta { grid-column: 2; font-size: 12.5px; color: var(--muted); min-width: 0; }
.fmeta .meter { margin-top: 5px; }
.state { grid-row: 1 / span 2; grid-column: 3; font-size: 12.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--line-soft); color: var(--muted); white-space: nowrap; }
.state.up { background: var(--brand-soft); color: var(--brand-dark); }
.state.done { background: var(--pine-soft); color: var(--pine); }
.state.fail { background: var(--error-soft); color: var(--error); }
.state.skip { background: var(--pine-soft); color: var(--pine); opacity: .8; }
.rm { grid-row: 1 / span 2; grid-column: 3; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
.rm:active { background: var(--line-soft); }
.ferr { color: var(--error); }

.meter { height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--sky), var(--brand)); transition: width .3s var(--ease); }

/* 알림 상자 */
.notice { border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.notice.preview { background: var(--warn-soft); color: #5C3A00; border: 1px solid #F1D79A; position: relative; z-index: 1; }
.notice.preview b { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 999px; background: #F2C14E; color: #3B2600; font-size: 12.5px; }
.notice.resume { background: var(--paper); border: 1.5px solid var(--gold); position: relative; z-index: 1; }
.notice.resume p { margin: 0 0 6px; }
.notice.resume ul { margin: 0 0 8px; padding-left: 18px; color: var(--muted); font-size: 13px; max-height: 120px; overflow: auto; }
.small { font-size: 13px; color: var(--muted); }

/* 다 됨 */
.done-card { text-align: center; padding: 26px 18px; }
.done-card h2 { justify-content: center; font-size: 22px; margin-bottom: 6px; }
.done-card p { margin: 0 0 16px; color: var(--muted); }
.done-mark { display: block; width: 72px; height: auto; margin: 0 auto 12px; }
.done-actions { display: grid; gap: 10px; }

/* 아래 고정 단추 */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: rgba(246, 247, 244, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom, 0px));
}
.bar-in { max-width: 560px; margin: 0 auto; }
.btn {
  display: block; width: 100%; min-height: 50px; padding: 12px 18px;
  border: 0; border-radius: 999px;
  background: var(--brand); color: #fff;
  font-size: 16.5px; font-weight: 750; cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(21, 74, 135, .7);
  transition: transform .15s var(--ease), background .15s;
}
.btn:active { transform: scale(.98); background: var(--brand-dark); }
.btn:disabled { background: #B9A9A0; box-shadow: none; cursor: default; }
.btn.big { min-height: 56px; font-size: 17.5px; }
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); box-shadow: none; }
.total { margin-bottom: 10px; }
.total-text { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 15px; }
.total-text span { color: var(--brand-dark); font-weight: 800; font-variant-numeric: tabular-nums; }
.total .meter { height: 10px; }
.total-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }

.pick-ask {
  margin: -4px 0 12px; padding: 9px 12px; border-radius: 10px;
  background: #FFF7E3; border: 1px solid #F1D79A; color: #5C3A00; font-size: 14px;
}
.pick-ask b { color: #8A5A00; }

/* ---- 최근 올라온 사진 ---- */
.card.recent { padding: 16px 0 14px; }
.recent-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 18px; margin-bottom: 10px; }
.card.recent h2 { margin: 0; font-size: 16.5px; }
.recent-count { color: var(--brand); font-size: 13px; font-weight: 700; white-space: nowrap; }
.recent-strip {
  display: flex; gap: 8px; overflow-x: auto; padding: 0 18px 2px;
  scroll-snap-type: x proximity; scroll-padding: 0 18px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.recent-strip::-webkit-scrollbar { display: none; }
.recent-strip[hidden] { display: none; }
.thumb {
  position: relative; flex: 0 0 auto; width: 96px; height: 96px; overflow: hidden;
  border-radius: 12px; background: var(--brand-soft); scroll-snap-align: start;
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb.example::before {
  content: '예시'; position: absolute; left: 6px; top: 6px; padding: 1px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .85); color: var(--brand-deep); font-size: 10.5px; font-weight: 700;
}
.thumb .cap { position: absolute; left: 8px; right: 8px; bottom: 7px; color: #fff; font-size: 12.5px; font-weight: 700; line-height: 1.25; text-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.thumb .play {
  position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(11, 42, 82, .72);
}
.thumb .play svg { width: 9px; height: 9px; fill: #fff; margin-left: 1px; }
.recent-note { margin: 10px 18px 0; color: var(--muted); font-size: 12.5px; }

.foot { padding: 6px 4px 0; color: var(--muted); font-size: 12.5px; text-align: center; }
.foot p { margin: 0; }
.foot p.purpose {
  margin: 0 0 18px; padding: 13px 15px; text-align: left;
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px;
  color: var(--ink); font-size: 14.5px; line-height: 1.55;
}
.foot p.purpose b { color: var(--brand-dark); }
.foot-logo { display: block; width: 150px; height: auto; margin: 4px auto 12px; opacity: .9; }

.toast {
  position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); width: max-content;
  padding: 10px 16px; border-radius: 12px;
  background: rgba(20, 35, 58, .92); color: #fff; font-size: 14px; text-align: center;
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 760px) {
  :root { --gutter: 24px; }
  .hero { padding-top: 70px; padding-bottom: 54px; }
}
