:root {
  --navy: #1b4596; --navy-d: #0d1f45; --sky: #1a9fd9; --blue: #1a7fc4;
  --ink: #1d1d1f; --ink-2: #6e6e73; --ink-3: #a1a1a6; --line: #e5e5ea;
  --bg: #fff; --bg-2: #f5f5f7;
  --kakao: #fee500; --red: #e0453b; --green: #1f9d57; --orange: #e08a00; --violet: #7a4fd6;
  --font: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); letter-spacing: -.02em; word-break: keep-all; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

/* 상단 바 */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(16px, calc(50% - 560px)); background: rgba(255,255,255,.72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(0,0,0,.06); font-size: 14px; transition: background .4s, color .4s, border-color .4s; }
.nav.dark { background: rgba(10,20,45,.5); color: #fff; border-color: rgba(255,255,255,.08); }
.nav b { font-weight: 700; }
.nav .home { flex: none; font-size: 13px; padding: 5px 12px; border-radius: 99px; background: var(--navy); color: #fff; }

/* 첫 화면 */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; color: #fff; padding: 80px 16px; overflow: hidden; background: var(--navy-d); }
.hero::before { content: ""; position: absolute; inset: -5%; background: linear-gradient(180deg, rgba(8,18,42,.55), rgba(8,18,42,.92)), url("/static/visual.jpg?v=1") center/cover; transform: scale(calc(1 + var(--p, 0) * .12)); }
.hero > div:not(.scroll-hint) { position: relative; opacity: calc(1 - var(--p, 0) * 1.6); transform: translateY(calc(var(--p, 0) * -60px)); }
.hero .eyebrow { font-size: 15px; font-weight: 500; color: #8fd3f5; letter-spacing: .08em; }
.hero h1 { margin-top: 14px; font-size: clamp(40px, 8vw, 96px); line-height: 1.12; font-weight: 900; letter-spacing: -.05em; }
.hero h1 span { background: linear-gradient(90deg, #8fd3f5, #fff 60%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { margin: 26px auto 0; max-width: 560px; font-size: clamp(16px, 2vw, 21px); color: rgba(255,255,255,.78); font-weight: 300; }
.hero .in { opacity: 0; transform: translateY(30px); animation: up 1s cubic-bezier(.2,.7,.2,1) forwards; }
.hero .in:nth-child(2) { animation-delay: .15s; } .hero .in:nth-child(3) { animation-delay: .35s; }
@keyframes up { to { opacity: 1; transform: none; } }
.scroll-hint { position: absolute; bottom: 34px; left: 50%; translate: -50% 0; font-size: 12px; color: rgba(255,255,255,.6); display: grid; justify-items: center; gap: 6px; opacity: calc(1 - var(--p, 0) * 4); }
.scroll-hint i { width: 22px; height: 34px; border: 2px solid rgba(255,255,255,.5); border-radius: 12px; position: relative; }
.scroll-hint i::after { content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: #fff; animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-3px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(9px); } }

/* 스크롤 장면 공통: 높은 상자 + 화면에 붙는 무대 */
.scene { position: relative; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
[data-s] { transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1), color .5s, background-color .5s, filter .5s; }

/* 다섯 가지 한눈에 */
.overview { height: 420svh; background: #000; color: #fff; }
.overview .stage { display: grid; align-content: center; padding: 70px max(20px, calc(50% - 520px)) 40px; }
.overview .kicker { font-size: clamp(15px, 1.8vw, 19px); color: var(--ink-3); font-weight: 500; margin-bottom: 3vh; }
.ov-list li a { display: grid; grid-template-columns: 2.4em 1fr; align-items: baseline; padding: 1.2vh 0; font-size: clamp(30px, 5.6vw, 68px); font-weight: 700; line-height: 1.15; letter-spacing: -.04em; color: #3a3a3c; }
.ov-list .n { font-size: .42em; color: inherit; font-weight: 500; letter-spacing: 0; }
.ov-list small { grid-column: 2; display: block; max-height: 0; overflow: hidden; font-size: clamp(14px, 1.6vw, 19px); font-weight: 400; letter-spacing: -.02em; color: #a1a1a6; transition: max-height .6s, margin .6s; }
.ov-list li.on a { color: #fff; }
.ov-list li.cur a { background: linear-gradient(90deg, #8fd3f5, #fff 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ov-list li.cur small { max-height: 3em; margin-top: 6px; -webkit-text-fill-color: #a1a1a6; }
.ov-bar { position: absolute; left: max(20px, calc(50% - 520px)); right: max(20px, calc(50% - 520px)); bottom: 6vh; height: 3px; border-radius: 3px; background: #2c2c2e; }
.ov-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); border-radius: inherit; background: var(--sky); }

/* 하나씩 설명 */
.chapter { height: 340svh; background: var(--bg); }
.chapter.alt { background: var(--bg-2); }
.chapter .stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 5vw; align-items: center; padding: 60px max(20px, calc(50% - 560px)) 0; }
.copy .num { font-size: 15px; font-weight: 700; color: var(--sky); letter-spacing: .06em; }
.copy h2 { margin-top: 10px; font-size: clamp(32px, 4.6vw, 58px); line-height: 1.14; font-weight: 900; letter-spacing: -.05em; }
.copy .lede { margin-top: 18px; font-size: clamp(16px, 1.6vw, 20px); color: var(--ink-2); }
.points { margin-top: 28px; display: grid; gap: 4px; }
.points li { position: relative; padding: 10px 0 10px 18px; font-size: clamp(15px, 1.4vw, 18px); color: var(--ink-3); }
.points li::before { content: ""; position: absolute; left: 0; top: 19px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.points li b { font-weight: 700; }
.points li.on { color: var(--ink-2); }
.points li.cur { color: var(--ink); }
.points li.cur::before { background: var(--sky); box-shadow: 0 0 0 4px rgba(26,159,217,.18); }
.visual { position: relative; display: grid; place-items: center; height: min(78svh, 640px); transform: translateY(calc((.5 - var(--p, 0)) * 40px)); }
.vis-scale { transform: scale(var(--k, 1)); }
.rv:not(.on) { opacity: 0; transform: translateY(26px) scale(.98); }

/* 기기 모형 */
.phone { width: 268px; height: 548px; border-radius: 44px; background: #111; padding: 11px; box-shadow: 0 30px 60px rgba(0,0,0,.18), inset 0 0 0 2px #333; position: relative; }
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 82px; height: 22px; margin-left: -41px; border-radius: 12px; background: #000; z-index: 3; }
.screen { position: relative; height: 100%; border-radius: 34px; overflow: hidden; background: #fff; }
.pane { position: absolute; inset: 0; padding: 62px 20px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.pane:not(.cur) { opacity: 0; transform: translateX(30px); pointer-events: none; }
.pane.on:not(.cur) { transform: translateX(-30px); }
.pane h4 { margin: 8px 0 0; font-size: 18px; letter-spacing: -.03em; }
.pane p { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.logo-mark { width: 54px; height: 54px; border-radius: 15px; background: var(--navy) url("/static/icon.svg") center/62% no-repeat; margin-top: 30px; }
.kakao-btn { width: 100%; margin-top: auto; padding: 13px; border-radius: 10px; background: var(--kakao); color: #191919; font-size: 14px; font-weight: 700; display: flex; justify-content: center; align-items: center; gap: 8px; }
.field { width: 100%; text-align: left; font-size: 12px; color: var(--ink-2); }
.field div { margin-top: 6px; border: 1.5px solid var(--sky); border-radius: 10px; padding: 11px 12px; font-size: 16px; color: var(--ink); letter-spacing: .14em; }
.field div::after { content: ""; display: inline-block; width: 1.5px; height: 17px; background: var(--sky); vertical-align: -3px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.btn-sm { width: 100%; padding: 12px; border-radius: 10px; background: var(--navy); color: #fff; font-size: 14px; font-weight: 500; margin-top: auto; }
.mail-card { width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: left; box-shadow: 0 8px 20px rgba(0,0,0,.06); }
.mail-card .from { font-size: 12px; color: var(--ink-3); }
.mail-card .t { font-size: 14px; font-weight: 700; margin: 4px 0 10px; }
.mail-card .go { display: inline-block; padding: 7px 12px; border-radius: 8px; background: var(--sky); color: #fff; font-size: 12px; }
.big-check { width: 76px; height: 76px; border-radius: 50%; background: var(--green); margin-top: 40px; display: grid; place-items: center; flex: none; }
.big-check::after { content: ""; width: 16px; height: 30px; border: solid #fff; border-width: 0 6px 6px 0; border-radius: 1px; transform: translate(0, -4px) rotate(45deg); }
.unlocked { width: 100%; display: grid; gap: 6px; margin-top: 10px; }
.unlocked span { padding: 9px 12px; border-radius: 9px; background: var(--bg-2); font-size: 12px; text-align: left; }
.unlocked span::before { content: "🔓 "; }
.pc-qr { position: absolute; right: -2%; bottom: 6%; width: 210px; padding: 16px; border-radius: 18px; background: #fff; box-shadow: 0 24px 50px rgba(0,0,0,.16); text-align: center; font-size: 12px; color: var(--ink-2); }
.pc-qr .qr { width: 116px; height: 116px; margin: 6px auto 8px; border-radius: 6px; overflow: hidden; outline: 1px solid var(--line); }
.pc-qr .qr svg { display: block; width: 100%; height: 100%; }
.pc-qr b { display: block; font-size: 22px; letter-spacing: .3em; color: var(--ink); margin-top: 4px; }
.pc-qr .tag { position: absolute; top: -12px; left: 16px; padding: 3px 10px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 11px; }

.window { width: min(560px, 100%); border-radius: 16px; background: #fff; box-shadow: 0 30px 70px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.05); overflow: hidden; }
.chrome { height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #f2f2f4; border-bottom: 1px solid var(--line); }
.chrome i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; } .chrome i:nth-child(2) { background: #febc2e; } .chrome i:nth-child(3) { background: #28c840; }
.chrome span { flex: 1; margin-left: 10px; height: 24px; border-radius: 7px; background: #fff; font-size: 12px; color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.win-body { padding: 22px; min-height: 380px; }

.sbox { display: flex; align-items: center; gap: 10px; border: 2px solid var(--navy); border-radius: 12px; padding: 12px 14px; font-size: 18px; }
.sbox::before { content: ""; width: 15px; height: 15px; border: 2.5px solid var(--navy); border-radius: 50%; flex: none; box-shadow: 6px 6px 0 -4px var(--navy); }
.res-meta { margin: 16px 0 8px; font-size: 13px; color: var(--ink-2); }
.res { padding: 12px 0; border-top: 1px solid var(--line); }
.res .b { font-size: 11px; color: var(--ink-3); }
.res .t { font-size: 15px; font-weight: 500; margin: 2px 0; }
.res mark { background: rgba(26,159,217,.18); color: inherit; border-radius: 3px; padding: 0 2px; }
.res .why { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 99px; background: var(--bg-2); color: var(--ink-2); }
.res .file { margin-top: 6px; display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; padding: 5px 10px; border-radius: 8px; background: #fff4f2; color: #b23b2f; }
.res .file::before { content: "PDF"; font-size: 10px; font-weight: 700; }
.res.hl:not(.on) { opacity: 0; transform: translateY(16px); }
.res.hl.cur { background: linear-gradient(90deg, rgba(26,159,217,.08), transparent); }
.lock-note { margin-top: 10px; font-size: 12px; color: var(--ink-3); }

.cal-head { padding: 0 2px 10px; }
.cal-head .m { font-size: 24px; font-weight: 900; letter-spacing: -.04em; }
.cal-head .subs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.cal-head .subs span { font-size: 10.5px; padding: 3px 8px; border-radius: 99px; color: #fff; }
.day { display: grid; grid-template-columns: 38px 1fr; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); text-align: left; }
.day .d { font-size: 11px; color: var(--ink-3); line-height: 1.2; }
.day .d b { display: block; font-size: 19px; color: var(--ink); }
.day .d.sun b { color: var(--red); }
.evs { display: grid; gap: 4px; }
.ev { font-size: 11.5px; padding: 5px 8px; border-radius: 7px; border-left: 3px solid; }
.ev.lec { background: #e8f3fc; border-color: var(--blue); }
.ev.duty { background: #e7f6ee; border-color: var(--green); }
.ev.mine { background: #fff3df; border-color: var(--orange); font-weight: 700; }
.ev:not(.on) { opacity: 0; transform: translateX(20px); }
.sync { position: absolute; top: 34%; right: -22%; padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.92); box-shadow: 0 16px 40px rgba(0,0,0,.14); font-size: 12px; display: grid; gap: 4px; backdrop-filter: blur(10px); }
.sync b { font-size: 13px; }
.sync span::before { content: "✓ "; color: var(--green); font-weight: 700; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filters span { font-size: 12px; padding: 4px 11px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink-2); }
.filters span.sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.month-t { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.month-t b { font-size: 20px; letter-spacing: -.03em; }
.month-t small { color: var(--ink-3); font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; font-size: 11px; }
.grid .h { text-align: center; color: var(--ink-3); padding-bottom: 3px; }
.grid .c { min-height: 52px; border-radius: 6px; background: var(--bg-2); padding: 4px; display: grid; align-content: start; gap: 2px; }
.grid .c > i { font-style: normal; color: var(--ink-2); }
.grid .c.x > i { color: var(--ink-3); opacity: .5; }
.grid .c.hol { background: #fdeeed; } .grid .c.hol > i { color: var(--red); font-weight: 700; }
.grid .hn { font-size: 9px; color: var(--red); }
.chip { font-size: 9.5px; line-height: 1.3; padding: 2px 4px; border-radius: 4px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.gi { background: var(--blue); } .chip.cv { background: var(--red); } .chip.en { background: var(--green); } .chip.pu { background: var(--violet); } .chip.ne { background: var(--orange); }
.chip:not(.on) { opacity: 0; transform: scale(.7); }
.cf.dimmed .chip:not(.en) { opacity: .12; }
.grid .hol .hn:not(.on), .hol-wrap:not(.on) { opacity: 0; }
.grid .c.hol:not(.hon) { background: var(--bg-2); } .grid .c.hol:not(.hon) > i { color: var(--ink-2); font-weight: 400; }
.add-pop { position: absolute; right: 0; bottom: 8%; width: 230px; padding: 16px; border-radius: 16px; background: #fff; box-shadow: 0 24px 50px rgba(0,0,0,.18); font-size: 12px; display: grid; gap: 8px; }
.add-pop b { font-size: 14px; }
.add-pop .f { padding: 8px 10px; border-radius: 8px; background: var(--bg-2); color: var(--ink-2); }
.add-pop .f.fill { color: var(--ink); }
.add-pop .ok { padding: 9px; border-radius: 8px; background: var(--navy); color: #fff; text-align: center; font-weight: 500; }
.add-pop .who { color: var(--green); font-weight: 500; }

.post-t { font-size: 20px; font-weight: 700; letter-spacing: -.03em; }
.post-m { font-size: 12px; color: var(--ink-3); margin: 4px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.blk { margin-bottom: 12px; }
.blk:not(.on) { opacity: 0; transform: translateY(18px); }
.photo { height: 110px; border-radius: 10px; background: linear-gradient(135deg, #8fd3f5, #1b4596); position: relative; overflow: hidden; }
/* 해와 언덕 두 개: 크기를 px 로 정해 틀이 넓어져도 동그라미가 눌리지 않는다 */
.photo::before { content: ""; position: absolute; right: 16%; top: 20%; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.6); }
.photo::after { content: ""; position: absolute; left: 6%; bottom: -150px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.24); box-shadow: 160px 18px 0 rgba(255,255,255,.16); }
.photo span { position: absolute; left: 10px; top: 10px; font-size: 11px; color: #fff; background: rgba(0,0,0,.3); padding: 2px 8px; border-radius: 99px; z-index: 1; }
.video { height: 88px; border-radius: 10px; background: #111; position: relative; display: grid; place-items: center; }
.video::before { content: ""; border: 14px solid transparent; border-left: 22px solid #fff; margin-left: 10px; }
.video .bar { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 4px; border-radius: 2px; background: #444; }
.video .bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--sky); transition: width 2.4s ease-out; }
.video.on .bar::after { width: 62%; }
.video .tm { position: absolute; right: 12px; top: 10px; font-size: 10px; color: #bbb; }
.att { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.att .ic { width: 30px; height: 36px; border-radius: 5px; background: #2b5797; color: #fff; font-size: 9px; font-weight: 700; display: grid; place-items: center; }
.att small { margin-left: auto; color: var(--sky); font-weight: 500; }
.cmt { display: flex; gap: 8px; font-size: 12.5px; margin-top: 8px; }
.cmt i { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-2); flex: none; font-style: normal; display: grid; place-items: center; font-size: 11px; color: var(--ink-2); }
.cmt div { background: var(--bg-2); border-radius: 4px 14px 14px 14px; padding: 7px 11px; }
.cmt div b { font-size: 11px; color: var(--ink-2); display: block; }

/* 마무리 */
.end { min-height: 90svh; display: grid; place-items: center; text-align: center; padding: 100px 20px; background: #000; color: #fff; }
.end h2 { font-size: clamp(34px, 6vw, 72px); font-weight: 900; letter-spacing: -.05em; line-height: 1.15; }
.end p { margin-top: 18px; color: #a1a1a6; font-size: clamp(16px, 1.8vw, 20px); }
.end .ctas { margin-top: 36px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.end .ctas a { padding: 13px 26px; border-radius: 99px; background: var(--sky); font-size: 16px; font-weight: 500; }
.end .ctas a.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px #555; }
.end .ctas a:hover { filter: brightness(1.1); }
.end-in { opacity: 0; transform: translateY(40px); transition: 1s cubic-bezier(.2,.7,.2,1); }
.end-in.on { opacity: 1; transform: none; }

/* 휴대폰 화면 */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .chapter { height: 360svh; }
  .chapter .stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 0; align-items: start; padding-top: 64px; }
  .copy h2 { font-size: clamp(26px, 7vw, 36px); margin-top: 4px; }
  .copy .lede { margin-top: 8px; font-size: 14.5px; }
  .points { margin-top: 8px; min-height: 3.6em; }
  .points li { padding: 0 0 0 16px; font-size: 14.5px; color: var(--ink); }
  .points li::before { top: 9px; }
  .points li:not(.cur) { display: none; }
  .visual { height: auto; align-self: center; transform: none; margin-top: -10px; }
  .vis-scale { transform: scale(var(--k, .8)); transform-origin: top center; }
  .phone { width: 240px; height: 470px; }
  .pc-qr { right: -6px; bottom: auto; top: 56%; width: 170px; }
  .ov-list small { line-height: 1.45; }
  .sync { top: auto; bottom: 6%; right: 0; }
  .win-body { min-height: 0; padding: 16px; }
  .add-pop { bottom: -4%; right: 50%; margin-right: -115px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; }
  .hero::before, .visual { transform: none; }
}

/* (인라인 style 대신) */
.rel { position: relative; }
.rel.wide { width: min(560px, 100%); }
.pane.agenda { align-items: stretch; text-align: left; gap: 0; padding: 56px 14px 14px; }
.subs .s-lec { background: var(--blue); } .subs .s-duty { background: var(--green); } .subs .s-mine { background: var(--orange); }

/* 04 전공의 강의 */
.month-t .mt-m { font-size: 12px; color: var(--ink); }
.lec-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 10px; }
.lec-legend span { font-size: 11px; padding: 3px 9px; border-radius: 99px; color: #fff; }
.lec-legend em { font-style: normal; font-size: 11px; color: var(--ink-3); margin-left: 4px; }
.k-mc { background: var(--blue); } .k-mgr { background: var(--violet); } .k-fri { background: var(--green); }
.lec-grid .c { min-height: 46px; }
.chip.pend { background: #d9d9de; color: #8e8e93; }
.scene[data-step="3"] .chip.pend, .scene[data-step="4"] .chip.pend { background: var(--green); color: #fff; box-shadow: 0 0 0 2px rgba(31,157,87,.3); }
.scene[data-step="4"] .c.moved { background: #f1ebfc; }
.rv.only:not(.cur) { opacity: 0; transform: translateY(26px) scale(.98); pointer-events: none; }
.up-pop .drop { padding: 12px; border: 2px dashed var(--sky); border-radius: 10px; text-align: center; color: var(--sky); }
.up-pop .upfile { position: relative; padding: 8px 10px 12px; border-radius: 8px; background: var(--bg-2); color: var(--ink); }
.up-pop .upfile::before { content: "📎 "; }
.upbar { position: absolute; left: 10px; right: 10px; bottom: 5px; height: 3px; border-radius: 2px; background: #ddd; }
.upbar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--green); transition: width 1.4s ease-out .3s; }
.up-pop.cur .upbar::after { width: 100%; }
.sync.lsync { top: auto; bottom: 4%; right: -4%; max-width: 230px; }
.sync .chg { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--violet); line-height: 1.45; }
@media (max-width: 860px) { .sync.lsync { top: auto; bottom: -6%; right: 0; } }

/* 03 오늘 당직 · 바로 전화 */
.duty-card { position: absolute; top: 26%; right: -16%; width: 236px; padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 24px 50px rgba(0,0,0,.18); display: grid; gap: 6px; font-size: 12.5px; }
.duty-card .hd { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.duty-card .hd b { font-size: 15px; } .duty-card .hd span { font-size: 11px; color: var(--sky); font-weight: 700; }
.duty-card .row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; background: var(--bg-2); }
.duty-card .z { width: 38px; color: var(--ink-3); font-size: 11.5px; }
.duty-card .p { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--navy); }
.duty-card svg { width: 14px; height: 14px; flex: none; }
.duty-card .row.call { background: #e8f3fc; box-shadow: inset 0 0 0 2px var(--sky); }
.duty-card .calling { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 2px; padding: 9px; border-radius: 10px; background: var(--green); color: #fff; font-size: 12px; font-weight: 500; }
.duty-card .calling svg { animation: ring 1s ease-in-out infinite; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
@media (max-width: 860px) { .duty-card { top: auto; bottom: -2%; right: 0; } }

/* 02 검색창: 한 글자씩 치기 + 끝에서 깜박이는 커서 */
.sbox .qw { display: inline-flex; align-items: center; white-space: nowrap; }
.sbox .caret { display: inline-block; width: 2px; height: 1.2em; margin-left: 2px; background: var(--sky); animation: blink 1s steps(1) infinite; }
.sbox.typing .caret { animation: none; }
#c2 .rv { transition-delay: .9s; }
#c2 .rv:not(.on) { transition-delay: 0s; }

/* 05 행사 글: 카카오맵 · 행사 사진 */
.chapter.long { height: 420svh; }
.ev-card { position: absolute; top: 6%; right: -6%; width: 264px; padding: 16px; border-radius: 18px; background: #fff; box-shadow: 0 26px 56px rgba(0,0,0,.2); display: grid; gap: 6px; font-size: 12.5px; z-index: 2; }
.ev-card .ev-k { font-size: 11px; font-weight: 700; color: var(--sky); }
.ev-card .ev-t { font-size: 16px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 2px; }
.ev-card .ev-m { color: var(--ink-2); } .ev-card .ev-m span { display: inline-block; width: 34px; color: var(--ink-3); }
.kmap { position: relative; height: 112px; margin-top: 4px; border-radius: 10px; overflow: hidden; background-color: #eef1e6;
  background-image: linear-gradient(90deg, transparent 46%, #fff 46%, #fff 52%, transparent 52%), linear-gradient(0deg, transparent 58%, #fff 58%, #fff 64%, transparent 64%),
    linear-gradient(28deg, transparent 70%, #fde9a8 70%, #fde9a8 74%, transparent 74%), linear-gradient(90deg, transparent 15%, #dbe8cf 15%, #dbe8cf 35%, transparent 35%); }
.kmap .pin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -26px 0 0 -11px; border-radius: 50% 50% 50% 0; background: var(--red); transform: rotate(-45deg); box-shadow: 0 3px 6px rgba(0,0,0,.25); }
.kmap .pin::after { content: ""; position: absolute; left: 7px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.ev-card.cur .pin { animation: drop .6s cubic-bezier(.3,1.6,.5,1) .4s both; }
@keyframes drop { from { transform: translateY(-30px) rotate(-45deg); opacity: 0; } to { transform: rotate(-45deg); opacity: 1; } }
.kmap .pin-l { position: absolute; left: 50%; top: 50%; transform: translate(-50%, 6px); padding: 2px 8px; border-radius: 99px; background: #fff; font-size: 11px; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.kmap .kbadge { position: absolute; right: 6px; bottom: 5px; font-size: 9.5px; font-weight: 700; color: #3a3a3c; background: rgba(255,255,255,.85); padding: 1px 6px; border-radius: 4px; }
.ev-card .ev-rh { display: flex; justify-content: space-between; margin-top: 6px; font-weight: 700; } .ev-card .ev-rh small { color: var(--sky); font-weight: 500; }
.ev-ph { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.ev-ph i { height: 54px; border-radius: 8px; background: linear-gradient(135deg, #8fd3f5, #1b4596); }
.ev-ph i:nth-child(2) { background: linear-gradient(135deg, #ffd7a1, #e0453b); } .ev-ph i:nth-child(3) { background: linear-gradient(135deg, #b9e6c9, #1f9d57); }
@media (max-width: 860px) { .chapter.long { height: 440svh; } .ev-card { top: 4%; right: 50%; margin-right: -132px; } }

/* 상단 진행 표시: 다섯 구역, 구역마다 어디까지 왔는지 */
.nav .brand { flex: none; }
.prog { display: flex; gap: 6px; opacity: 0; transform: translateY(-4px); transition: opacity .5s, transform .5s; }
.prog.show { opacity: 1; transform: none; }
.prog a { display: grid; gap: 6px; width: 96px; padding-top: 3px; font-size: 12px; text-align: center; color: var(--ink-3); white-space: nowrap; transition: color .3s; }
.prog a:hover { color: var(--ink-2); }
.prog a.cur { color: var(--ink); font-weight: 700; }
.prog i { position: relative; height: 3px; border-radius: 3px; background: rgba(0,0,0,.09); overflow: hidden; }
.prog i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--sky); transform-origin: left center; transform: scaleX(var(--sp, 0)); }
.prog a.cur i::after { background: linear-gradient(90deg, var(--sky), var(--navy)); }
.nav.dark .prog a { color: rgba(255,255,255,.5); }
.nav.dark .prog a.cur { color: #fff; }
.nav.dark .prog i { background: rgba(255,255,255,.16); }
@media (max-width: 1024px) {
  .prog { position: absolute; left: max(16px, calc(50% - 560px)); right: max(16px, calc(50% - 560px)); bottom: 5px; gap: 4px; }
  .prog a { flex: 1; width: auto; padding: 0; }
  .prog span { display: none; }
  .prog i { height: 3px; }
}

/* 스크롤이 단계마다 일정하게 멈추도록 */
html { scroll-snap-type: y mandatory; }
.hero, .end { scroll-snap-align: start; }
.snap { position: absolute; left: 0; width: 1px; height: 1px; pointer-events: none; scroll-snap-align: start; scroll-snap-stop: always; }

/* 겹쳐 뜨는 카드는 휴대폰 모형(노치 포함) 위로 */
.sync, .duty-card, .pc-qr, .ev-card, .add-pop { z-index: 5; }

/* 휴대폰: 03의 '캘린더 구독 중'은 작은 알약으로, 노치 아래 · '11월' 오른쪽 빈자리에 */
@media (max-width: 860px) {
  #c3 .sync { top: 11.5%; bottom: auto; right: 7%; display: flex; align-items: center; gap: 0; padding: 6px 11px; border-radius: 999px; }
  #c3 .sync span { display: none; }
  #c3 .sync b { font-size: 11px; white-space: nowrap; }
  #c3 .sync b::before { content: "✓ "; color: var(--green); }
}

/* 좁은 화면: 진행 막대가 아래에 붙으므로 바를 조금 높이고 글·버튼을 그 위 가운데에 */
@media (max-width: 1024px) {
  .nav { height: 58px; padding-bottom: 12px; }
  .prog { bottom: 8px; }
  .nav .brand { font-size: 13.5px; }
  .nav .home { padding: 5px 12px; font-size: 12.5px; line-height: 1.5; }
}
@media (max-width: 860px) { .chapter .stage { padding-top: 74px; } .overview .stage { padding-top: 76px; } }

/* 05 게시판: 첨부 문서 미리 보기 (글 안 뷰어 모양) */
.docprev .dp-h { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 12.5px; }
.docprev .ic { width: 18px; height: 22px; border-radius: 3px; background: #d4561f; color: #fff; font-size: 9px; font-weight: 700; display: grid; place-items: center; }
.docprev small { margin-left: auto; padding: 1px 9px; border: 1px solid #c9d3e6; border-radius: 99px; color: #1b4596; font-size: 11px; }
.dp-v { position: relative; height: 118px; border-radius: 8px; overflow: hidden; }
.dp-s { position: absolute; inset: 0; padding: 16px 18px; background: linear-gradient(135deg, #1b4596, #133a80); color: #fff; }
.dp-s b { display: block; font-size: 14.5px; margin-bottom: 12px; }
.dp-s i { display: block; width: 62%; height: 6px; margin-bottom: 7px; border-radius: 3px; background: rgba(255,255,255,.35); }
.dp-s i + i { width: 44%; }
.dp-n { position: absolute; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: rgba(0,0,0,.42); display: grid; place-items: center; }
.dp-n::before { content: ""; width: 6px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; }
.dp-n.l { left: 8px; } .dp-n.l::before { transform: translateX(1px) rotate(45deg); }
.dp-n.r { right: 8px; } .dp-n.r::before { transform: translateX(-1px) rotate(-135deg); }
.dp-c { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); padding: 2px 8px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; }

/* 05 게시판 · 휴대폰: 예시 화면을 작게 (글 아래 남은 공간에 들어가게) */
@media (max-width: 860px) {
  #c5 .visual { margin-top: 8px; }
  #c5 .win-body { padding: 12px 14px; }
  #c5 .post-t { font-size: 15px; }
  #c5 .blk { margin-bottom: 8px; }
  #c5 .photo { height: 70px; }
  #c5 .video { height: 58px; }
  #c5 .video::before { border-width: 10px 0 10px 16px; }
  #c5 .dp-v { height: 78px; }
  #c5 .dp-s { padding: 10px 14px; }
  #c5 .dp-s b { font-size: 13px; margin-bottom: 8px; }
}

/* 05 게시판 · 휴대폰: 아직 안 나온 칸은 자리를 차지하지 않고, 창이 아래로 자라난다 (빈 여백 없이) */
@media (max-width: 860px) {
  #c5 .visual { align-self: start; }
  #c5 .blk:not(.on) { display: none; }
  html.measuring #c5 .blk:not(.on) { display: block; }
  #c5 .blk.on { animation: blk-in .45s ease both; }
}
@keyframes blk-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* 휴대폰: 창 그림자를 옅고 짧게 (화면 아래 끝에서 잘린 그림자가 띠처럼 보이지 않게) · 05 사진 칸의 동그라미는 동그랗게 */
@media (max-width: 860px) {
  .window { box-shadow: 0 10px 26px rgba(0,0,0,.10), 0 0 0 1px rgba(0,0,0,.05); }
  #c5 .photo::before { width: 14px; height: 14px; }
  #c5 .photo::after { width: 130px; height: 130px; bottom: -92px; box-shadow: 104px 12px 0 rgba(255,255,255,.16); }
}

/* 휴대폰 · 태블릿: 굴리면 브라우저 주소창 · 아래 도구 막대가 숨어 화면이 길어진다 (100svh → 100lvh).
   무대는 길어진 화면 끝까지 채우고(아래 빈 띠 · 잘린 그림자 없이), 글 · 모형은 막대가 있을 때 높이(100svh) 안에 그대로 둔다 */
@supports (height: 100lvh) {
  .stage { height: 100lvh; }
  .chapter .stage { padding-bottom: calc(100lvh - 100svh); }
  .overview .stage { padding-bottom: calc(40px + 100lvh - 100svh); }
  .ov-bar { bottom: calc(6vh + 100lvh - 100svh); }
}
