:root {
  --bg: #f6f7f5;
  --card: #ffffff;
  --text: #16181a;
  --text-2: #4b5157;
  --text-3: #6e757c;
  --line: #e2e5e2;
  --brand: #00a382;
  --brand-ink: #006b55;
  --brand-soft: #e3f5ef;
  --warn-soft: #fff4d6;
  --warn-ink: #7a5300;
  --info-soft: #e8f0fb;
  --info-ink: #1d4f91;
  --btn: #16181a;
  --btn-text: #ffffff;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141615;
    --card: #1d201f;
    --text: #f1f3f2;
    --text-2: #c3c8c6;
    --text-3: #9aa19e;
    --line: #2f3432;
    --brand: #2bc49f;
    --brand-ink: #7fe0c6;
    --brand-soft: #173a31;
    --warn-soft: #3a2f12;
    --warn-ink: #f2cf7a;
    --info-soft: #1b2a40;
    --info-ink: #9cc2f5;
    --btn: #f1f3f2;
    --btn-text: #141615;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-size: 19px;
  line-height: 1.65;
  word-break: keep-all;
}
a { color: inherit; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }

/* 머리 */
.top { padding: 22px 0 8px; }
.top a { text-decoration: none; }
.mark { font-weight: 800; letter-spacing: 0.06em; font-size: 18px; color: var(--text); }
.mark b { color: var(--brand); font-weight: 800; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; color: var(--text-2); }

h1 { font-size: 34px; line-height: 1.3; margin: 18px 0 6px; font-weight: 800; }
h2 { font-size: 24px; margin: 44px 0 14px; font-weight: 800; }
h3 { font-size: 20px; margin: 0 0 6px; font-weight: 700; }
.lead { font-size: 20px; color: var(--text-2); margin: 0 0 24px; }
p { margin: 0 0 12px; }

/* 입구 카드 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.app-card {
  display: flex; gap: 16px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; text-decoration: none; color: inherit;
  transition: border-color .15s, transform .15s;
}
.app-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.app-card .name { font-size: 22px; font-weight: 800; margin: 0; }
.app-card .desc { font-size: 17px; color: var(--text-2); margin: 2px 0 8px; }
.app-card .go { margin-left: auto; color: var(--text-3); flex-shrink: 0; }
.icon-tile {
  width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-ink);
}
.icon-tile.big { width: 76px; height: 76px; border-radius: 20px; }
.icon-tile svg { width: 36px; height: 36px; }
.icon-tile.big svg { width: 44px; height: 44px; }

/* 꼬리표 */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 15px; padding: 3px 10px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line); color: var(--text-2);
}
.tag svg { width: 16px; height: 16px; }
.tag.ok { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }

/* 앱 머리 */
.app-head { display: flex; gap: 16px; align-items: center; margin-top: 18px; }
.app-head h1 { margin: 0; }
.ver { font-size: 16px; color: var(--text-3); margin: 0; }

/* 큰 단추 */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 18px 20px; border-radius: 14px; border: 0;
  background: var(--btn); color: var(--btn-text);
  font: inherit; font-size: 21px; font-weight: 800; text-decoration: none; cursor: pointer;
}
.btn svg { width: 26px; height: 26px; }
.btn.soft { background: var(--card); color: var(--text); border: 1px solid var(--line); font-size: 18px; padding: 14px 18px; }
.btn-note { text-align: center; font-size: 15px; color: var(--text-3); margin: 8px 0 0; }
.cta { max-width: 460px; }

/* 상자 */
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.box.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn-ink); }
.box.info { background: var(--info-soft); border-color: transparent; color: var(--info-ink); }
.box.brand { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
.box h3 { display: flex; align-items: center; gap: 8px; }
.box h3 svg { width: 24px; height: 24px; flex-shrink: 0; }
.box p:last-child { margin-bottom: 0; }

/* 단계 */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.steps li::before {
  counter-increment: s; content: counter(s);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 21px;
  display: flex; align-items: center; justify-content: center;
}
.steps .t { font-weight: 800; font-size: 20px; margin: 4px 0 2px; }
.steps .d { color: var(--text-2); font-size: 17px; margin: 0; }
.key {
  display: inline-block; padding: 0 8px; border-radius: 6px; font-weight: 700;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 0.95em;
}

/* 둘 비교 */
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }

/* 그림 */
.figure {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin: 8px 0 24px;
}
.figure svg { width: 100%; height: auto; display: block; }

/* 자주 묻는 질문 */
details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; }
summary { font-weight: 700; cursor: pointer; font-size: 18px; }
details p { margin: 10px 0 0; color: var(--text-2); font-size: 17px; }

/* 엇갈려 열었을 때 안내 */
.device-note { display: none; margin: 18px 0 0; }
.device-note.show { display: block; }
.copy-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.copy-row .btn { width: auto; flex: 1 1 200px; font-size: 18px; padding: 14px 16px; }

.foot { margin: 56px 0 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-3); }
.foot p { margin: 0 0 6px; }

/* 설교 정리 그림: 폴더 → 색인 */
.flow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.flow > .panel { flex: 1 1 260px; min-width: 0; }
.flow .arrow { flex: 0 0 auto; margin: 0 auto; color: var(--brand); }
.flow .arrow svg { width: 40px; height: 40px; }
@media (max-width: 640px) { .flow .arrow svg { transform: rotate(90deg); } }
.panel-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; margin-bottom: 8px; }
.panel-title svg { width: 22px; height: 22px; color: var(--brand); }
.files { list-style: none; margin: 0; padding: 0; font-size: 15px; color: var(--text-2); }
.files li { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: var(--bg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xls { width: 100%; border-collapse: collapse; font-size: 15px; table-layout: fixed; }
.xls th, .xls td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xls th { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.xls td.link { color: var(--info-ink); text-decoration: underline; }
.tabs-mini { display: flex; gap: 4px; margin-top: 6px; font-size: 13px; }
.tabs-mini span { padding: 2px 8px; border: 1px solid var(--line); border-radius: 0 0 6px 6px; color: var(--text-3); }
.tabs-mini span.on { background: var(--card); color: var(--text); font-weight: 700; }

/* 주보 그림: 휴대폰 화면 */
.phones { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.phone {
  width: 200px; border: 2px solid var(--line); border-radius: 26px; padding: 14px 12px 18px;
  background: var(--bg);
}
.phone .bar { width: 50px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.phone .sheet { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; min-height: 230px; font-size: 14px; line-height: 1.5; }
.phone .sheet b { display: block; font-size: 17px; margin-bottom: 6px; }
.phone .sheet .muted { color: var(--text-3); }
.phone .row { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.phone .dots { display: flex; gap: 5px; justify-content: center; margin-top: 10px; }
.phone .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.phone .dots i.on { background: var(--brand); }
.phone-cap { text-align: center; font-size: 15px; color: var(--text-3); margin-top: 6px; }
.swipe-hint { display: none; text-align: center; font-size: 15px; color: var(--text-3); margin: 10px 0 0; }
@media (max-width: 640px) {
  .phones { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .phones > div { scroll-snap-align: center; flex: 0 0 auto; }
  .phone { width: 220px; }
  .swipe-hint { display: block; }
}

/* 파란 경고 창 흉내 */
.smartscreen { background: #0a5cad; color: #fff; border-radius: 10px; padding: 14px 16px; font-size: 15px; margin-top: 10px; }
.smartscreen b { font-size: 17px; display: block; margin-bottom: 4px; }
.smartscreen .lnk { text-decoration: underline; font-weight: 700; }
.smartscreen .run { display: inline-block; margin-top: 8px; border: 2px solid #fff; padding: 2px 14px; border-radius: 4px; font-weight: 700; }
.smartscreen .hl { outline: 3px solid #ffd54a; outline-offset: 2px; border-radius: 3px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 560px) {
  body { font-size: 18px; }
  h1 { font-size: 30px; }
  h2 { font-size: 22px; margin-top: 36px; }
  .icon-tile { width: 56px; height: 56px; }
}
