/* 인스타그램 (가상) */
#app-insta { background: #fff; color: #111; }
.ig-body { padding-bottom: 96px; }
.ig-ib { appearance: none; border: 0; background: none; color: inherit; padding: 6px; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; position: relative; font: inherit; }
.ig-ib svg, .ig-search svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ig-ib em { font-style: normal; font-size: 14px; font-weight: 600; }
.ig-ib .dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: #ff3040; }
.sp { flex: 1; }
.ig-head { display: flex; align-items: center; gap: 6px; height: 54px; padding: 0 10px; position: sticky; top: 0; background: #fff; z-index: 3; }
.ig-logo { position: absolute; left: 50%; transform: translateX(-50%); font-family: 'Noto Serif Display', serif; font-size: 26px; font-weight: 400; letter-spacing: -.3px; }
.ig-uid { font-size: 19px; font-weight: 700; display: flex; flex-direction: column; line-height: 1.15; }
.ig-uid.sm { font-size: 15.5px; } .ig-uid small { font-size: 12px; color: #737373; font-weight: 400; }
.ig-av { display: inline-block; flex: none; border-radius: 50%; background: #ddd center / cover no-repeat; width: 36px; height: 36px; color: #fff; font-weight: 700; text-align: center; line-height: 36px; font-size: 14px; position: relative; }
.ig-av.sm { width: 32px; height: 32px; line-height: 32px; } .ig-av.md { width: 54px; height: 54px; line-height: 54px; font-size: 20px; }
.ig-av.lg { width: 74px; height: 74px; line-height: 74px; font-size: 26px; } .ig-av.xl { width: 88px; height: 88px; line-height: 88px; font-size: 30px; }
.ig-av.ring { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e1306c; margin: 4px; }
.ig-stories { display: flex; gap: 14px; overflow-x: auto; padding: 6px 14px 14px; scrollbar-width: none; border-bottom: .5px solid #efefef; }
.ig-stories::-webkit-scrollbar { display: none; }
.ig-st { appearance: none; border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; flex: none; font: inherit; color: #111; cursor: pointer; position: relative; }
.ig-st small { font-size: 12px; width: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-st.me .ig-av { margin: 4px; }
.ig-st .plus { position: absolute; top: 56px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: #111; color: #fff; font-style: normal; font-size: 18px; line-height: 21px; border: 2.5px solid #fff; }
.ig-st.seen .ig-av.ring { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #dbdbdb; }
.ig-post { padding-bottom: 14px; }
.ig-ph { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; }
.ig-ph .ig-av.ring { margin: 2px; box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px #e1306c; }
.ig-ph div { flex: 1; line-height: 1.2; } .ig-ph b { font-size: 14px; display: block; } .ig-ph small { font-size: 12px; color: #444; }
.ig-ph .ig-ib svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.ig-img { width: 100%; background: #eee center / cover no-repeat; position: relative; cursor: pointer; }
.ig-burst { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0); color: #fff; opacity: 0; pointer-events: none; }
.ig-burst svg { width: 96px; height: 96px; fill: currentColor; filter: drop-shadow(0 2px 8px rgba(0,0,0,.3)); }
.ig-burst.go { animation: igBurst .8s ease; }
@keyframes igBurst { 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 30% { transform: translate(-50%, -50%) scale(.95); } 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }
.ig-acts { display: flex; align-items: center; padding: 4px 6px 0; }
.ig-acts .ig-ib svg { width: 25px; height: 25px; }
.ig-ib.liked { color: #ff3040; } .ig-ib.liked svg { fill: currentColor; } .ig-ib.liked em { color: #111; }
.ig-ib.saved svg { fill: currentColor; }
.ig-cap { padding: 2px 14px; font-size: 14.5px; line-height: 1.4; }
.ig-pinprev, .ig-more { appearance: none; border: 0; background: none; font: inherit; text-align: left; padding: 2px 14px; cursor: pointer; display: block; width: 100%; font-size: 14.5px; color: #111; }
.ig-more { color: #737373; font-size: 14px; }
.ig-time { padding: 4px 14px 0; font-size: 12px; color: #737373; }
.ig-done { display: flex; align-items: center; gap: 12px; padding: 18px 16px; font-size: 13px; color: #555; border-top: .5px solid #efefef; }
.ig-done span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #e1306c; color: #e1306c; font-weight: 700; flex: none; }
.ig-prof { display: flex; align-items: center; gap: 22px; padding: 8px 16px 6px; }
.ig-prof > div { flex: 1; } .ig-pname { font-size: 15px; }
.ig-stats { display: flex; justify-content: space-between; margin-top: 6px; }
.ig-stats > * { appearance: none; border: 0; background: none; font: inherit; color: inherit; padding: 0; display: flex; flex-direction: column; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.ig-stats b { font-size: 17px; }
.ig-bio { padding: 4px 16px 0; font-size: 14px; line-height: 1.45; }
.ig-pbtns { display: flex; gap: 6px; padding: 12px 16px; }
.ig-pbtns button { flex: 1; appearance: none; border: 0; border-radius: 9px; background: #efefef; padding: 9px; font: inherit; font-size: 14px; font-weight: 600; color: #111; cursor: pointer; }
.ig-pbtns button.blue, .ig-fl button.blue { background: #4a5df9; color: #fff; }
.ig-ptabs { display: flex; justify-content: center; border-top: .5px solid #efefef; }
.ig-ptabs span { padding: 10px 0; width: 100%; display: grid; place-items: center; border-bottom: 1.5px solid #111; }
.ig-ptabs svg { width: 24px; height: 24px; fill: none; stroke: #111; stroke-width: 1.8; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-grid button { appearance: none; border: 0; padding: 0; aspect-ratio: 3 / 4; background: #eee center / cover no-repeat; cursor: pointer; }
.ig-empty { grid-column: 1 / -1; padding: 30px 16px; text-align: center; color: #737373; font-size: 13.5px; }
/* 하단 탭 (떠 있는 둥근 바) */
.ig-nav { position: absolute; left: 14px; right: 14px; bottom: calc(max(env(safe-area-inset-bottom), 8px) + 20px); z-index: 5; display: flex; justify-content: space-around; align-items: center; padding: 6px;
  border-radius: 36px; background: rgba(250,250,250,.82); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 6px 24px rgba(0,0,0,.14), inset 0 0 0 .5px rgba(0,0,0,.06); }
.ig-nav button { appearance: none; border: 0; background: none; color: #111; width: 62px; height: 50px; border-radius: 26px; display: grid; place-items: center; cursor: pointer; }
.ig-nav button.on { background: rgba(0,0,0,.08); }
.ig-nav svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ig-nav button.on svg { fill: currentColor; } .ig-nav button[data-igtab="dm"].on svg, .ig-nav button[data-igtab="search"].on svg { fill: none; stroke-width: 2.6; }
.ig-nav-me { width: 30px; height: 30px; border-radius: 50%; background: #ddd center / cover; position: relative; }
.ig-nav-me::after { content: ""; position: absolute; right: -3px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; background: #ff3040; border: 1.5px solid #fff; }
.ig-nav button.on .ig-nav-me { box-shadow: 0 0 0 2px #111; }
#app-insta[data-tab="reels"] .ig-nav { background: rgba(40,40,40,.6); } #app-insta[data-tab="reels"] .ig-nav button { color: #fff; } #app-insta[data-tab="reels"] .ig-nav button.on { background: rgba(255,255,255,.18); }
#app-insta .app-homebar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; }
/* 시트 (댓글 · 팔로잉) */
.ig-sheet { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.ig-sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .25s; }
.ig-sheet-in { position: absolute; left: 0; right: 0; bottom: 0; height: 74%; background: #fff; border-radius: 18px 18px 0 0; transform: translateY(100%); transition: transform .3s cubic-bezier(.22,.8,.2,1); display: flex; flex-direction: column; }
#app-insta.sheet-open .ig-sheet { pointer-events: auto; } #app-insta.sheet-open .ig-sheet-bg { opacity: 1; } #app-insta.sheet-open .ig-sheet-in { transform: none; }
.ig-grab { width: 40px; height: 4px; border-radius: 2px; background: #ccc; margin: 8px auto 2px; flex: none; }
#igSheetBody { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
.ig-sh-t { text-align: center; font-weight: 700; font-size: 15px; padding: 8px 0 12px; border-bottom: .5px solid #efefef; flex: none; }
.ig-cms { flex: 1; overflow-y: auto; padding: 6px 0; }
.ig-cm { display: flex; gap: 10px; padding: 10px 12px 10px 14px; align-items: flex-start; }
.ig-cm-b { flex: 1; min-width: 0; } .ig-cm-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ig-cm-h b { font-size: 13px; } .ig-cm-h small { font-size: 12px; color: #737373; }
.ig-pinned { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; color: #737373; } .ig-pinned svg { width: 12px; height: 12px; fill: #737373; stroke: #737373; stroke-width: 1.5; }
.ig-author { font-size: 11px; color: #737373; }
.ig-cm p { margin: 2px 0 4px; font-size: 14.5px; line-height: 1.4; } .ig-reply { font-size: 12px; color: #737373; font-weight: 600; }
.ig-cl { appearance: none; border: 0; background: none; color: #8e8e8e; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px; cursor: pointer; }
.ig-cl svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; } .ig-cl small { font-size: 11px; min-height: 13px; }
.ig-cl.on { color: #ff3040; } .ig-cl.on svg { fill: currentColor; }
.ig-cin { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px calc(max(env(safe-area-inset-bottom), 8px) + 16px); border-top: .5px solid #efefef; }
.ig-cin input { flex: 1; min-width: 0; border: 1px solid #dbdbdb; border-radius: 22px; padding: 10px 14px; font: inherit; font-size: 15px; outline: none; color: #111; }
.ig-cin button { appearance: none; border: 0; background: none; color: #4a5df9; font: inherit; font-weight: 700; cursor: pointer; }
.ig-fl { display: flex; align-items: center; gap: 12px; padding: 8px 16px; cursor: pointer; }
.ig-fl div { flex: 1; min-width: 0; } .ig-fl b { display: block; font-size: 14.5px; } .ig-fl small { font-size: 13px; color: #737373; }
.ig-fl button { appearance: none; border: 0; border-radius: 9px; background: #efefef; padding: 7px 14px; font: inherit; font-size: 13.5px; font-weight: 600; color: #111; cursor: pointer; }
.ig-fl .ig-av.ring { margin: 3px; }
/* DM */
.ig-search { display: flex; align-items: center; gap: 8px; margin: 2px 14px 12px; padding: 0 12px; height: 38px; border-radius: 12px; background: #efefef; color: #8e8e8e; font-size: 16px; }
.ig-search svg { width: 18px; height: 18px; } .ig-search.grow { flex: 1; margin: 0; }
.ig-notes { padding: 26px 16px 8px; } .ig-notes > div { width: 90px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.ig-notes .bubble { position: absolute; top: -22px; left: -4px; background: #fff; border-radius: 14px; padding: 6px 10px; font-size: 11.5px; color: #666; box-shadow: 0 1px 6px rgba(0,0,0,.12); white-space: nowrap; }
.ig-notes small { font-size: 12px; color: #737373; }
.ig-dmh { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px 6px; }
.ig-dmh b { font-size: 16px; } .ig-dmh button { appearance: none; border: 0; background: none; color: #737373; font: inherit; font-size: 14px; cursor: pointer; }
.ig-dm { appearance: none; border: 0; background: none; width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 16px; font: inherit; color: #111; text-align: left; cursor: pointer; }
.ig-dm div { min-width: 0; } .ig-dm b { display: block; font-size: 14.5px; font-weight: 500; } .ig-dm small { font-size: 13.5px; color: #737373; }
.ig-chat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 14px; }
.ig-chat > b { font-size: 17px; margin-top: 6px; } .ig-chat > small { font-size: 13px; color: #737373; }
.ig-msgs { width: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 24px; }
.ig-msg { align-self: flex-start; max-width: 75%; padding: 9px 14px; border-radius: 20px; background: #efefef; font-size: 15px; }
.ig-msg.me { align-self: flex-end; background: #4a5df9; color: #fff; }
/* 릴스 */
#app-insta[data-tab="reels"] { background: #000; }
#app-insta[data-tab="reels"] > .status { position: absolute; left: 0; right: 0; z-index: 4; color: #fff; }
#app-insta[data-tab="reels"] .ig-body { padding: 0; }
.ig-reel { position: relative; height: 100%; min-height: 640px; background: #111 center / cover no-repeat; color: #fff; cursor: pointer; }
.ig-rtop { position: absolute; top: 50px; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 18px; }
.ig-rtop .ig-ib { position: absolute; left: 8px; } .ig-rtop span { opacity: .6; }
.ig-rside { position: absolute; right: 10px; bottom: 150px; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.ig-rside div { display: flex; flex-direction: column; align-items: center; gap: 3px; } .ig-rside small { font-size: 12.5px; font-weight: 600; }
.ig-rside svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.8; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.ig-rinfo { position: absolute; left: 14px; right: 70px; bottom: 120px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.ig-rinfo b { font-size: 14.5px; } .ig-rinfo .fl { border: 1px solid rgba(255,255,255,.7); border-radius: 8px; padding: 3px 9px; font-size: 13px; }
.ig-rinfo p { width: 100%; margin: 2px 0 0; font-size: 14.5px; }
.ig-rbar { position: absolute; left: 14px; right: 14px; bottom: 108px; height: 2px; background: rgba(255,255,255,.35); } .ig-rbar i { display: block; height: 100%; background: #fff; animation: igReel 12s linear infinite; }
@keyframes igReel { from { width: 0; } to { width: 100%; } }
.ig-rhint { position: absolute; top: 90px; left: 0; right: 0; text-align: center; font-size: 11.5px; opacity: .6; }
/* 검색 (탐색) */
.ig-explore { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-explore div { aspect-ratio: 3 / 4; background: #eee center / cover no-repeat; position: relative; }
.ig-explore small { position: absolute; left: 6px; bottom: 6px; display: flex; align-items: center; gap: 3px; color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.ig-explore small svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; }
.ig-rinfo { bottom: 150px; } .ig-rbar { bottom: 136px; } .ig-rside { bottom: 180px; }
/* 프사 없음 */
.ig-av.nopic { background: #dbdbdb; overflow: hidden; display: inline-grid; place-items: end center; }
.ig-av.nopic svg { width: 78%; height: 78%; fill: #fff; margin-bottom: -6%; }
/* 스토리 동그라미 (정원) */
.ig-st .ig-av, .ig-st .ig-av.lg { width: 70px; height: 70px; min-width: 70px; min-height: 70px; aspect-ratio: 1; border-radius: 50%; line-height: 70px; display: inline-grid; }
.ig-st .ig-av.ring { margin: 4px; box-shadow: 0 0 0 2.5px #fff, 0 0 0 5px #e1306c; background-clip: padding-box; }
.ig-st .ig-av.nopic { place-items: end center; }
.ig-st .plus { top: 54px; right: 6px; }
/* 탐색 화면 글 */
.ig-ex-t { position: absolute; left: 8px; right: 8px; top: 10px; color: #fff; font-size: 13.5px; line-height: 1.3; font-weight: 800; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
/* 스토리 보기 */
.ig-story { position: absolute; inset: 0; z-index: 30; background: #000; display: none; color: #fff; }
#app-insta.story-open .ig-story { display: block; }
.ig-sv-img { position: absolute; inset: 44px 0 70px; background: #111 center / cover no-repeat; border-radius: 10px; }
.ig-sv-bars { position: absolute; top: 52px; left: 10px; right: 10px; display: flex; gap: 3px; z-index: 2; }
.ig-sv-bars i { flex: 1; height: 2.5px; background: rgba(255,255,255,.35); border-radius: 2px; overflow: hidden; }
.ig-sv-bars i b { display: block; height: 100%; width: 0; background: #fff; }
.ig-sv-bars i.done b { width: 100%; } .ig-sv-bars i.run b { animation: igSv 5s linear forwards; }
@keyframes igSv { to { width: 100%; } }
.ig-sv-head { position: absolute; top: 64px; left: 12px; right: 8px; display: flex; align-items: center; gap: 8px; z-index: 2; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.ig-sv-head b { font-size: 14px; } .ig-sv-head small { font-size: 13px; opacity: .75; }
.ig-sv-head button { margin-left: auto; appearance: none; border: 0; background: none; color: #fff; font-size: 22px; padding: 4px 8px; cursor: pointer; }
.ig-sv-text { position: absolute; left: 20px; right: 20px; top: 42%; text-align: center; z-index: 2; font-size: 21px; font-weight: 700; line-height: 1.4; white-space: pre-line; pointer-events: none; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.ig-sv-reply { position: absolute; left: 12px; right: 12px; bottom: 18px; display: flex; align-items: center; gap: 14px; }
.ig-sv-reply span { flex: 1; border: 1px solid rgba(255,255,255,.6); border-radius: 22px; padding: 10px 16px; font-size: 14px; }
.ig-sv-reply svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.8; }
/* 여러 장 게시물 */
.ig-car { position: relative; width: 100%; overflow: hidden; }
.ig-car-in { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x pan-y; }
.ig-car-in::-webkit-scrollbar { display: none; }
.ig-car-in > div { flex: none; width: 100%; height: 100%; scroll-snap-align: start; background: #eee center / cover no-repeat; }
.ig-car-n { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 12px; }
.ig-dots { display: flex; justify-content: center; gap: 4px; padding-top: 8px; margin-bottom: -18px; position: relative; z-index: 1; pointer-events: none; }
.ig-dots i { width: 6px; height: 6px; border-radius: 50%; background: #c7c7c7; } .ig-dots i.on { background: #3897f0; }
.ig-grid button.multi::after { content: "❐"; position: relative; float: right; margin: 4px 6px; color: #fff; font-size: 15px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.ig-cta { appearance: none; border: 0; width: 100%; display: flex; justify-content: space-between; padding: 12px 14px; background: #3a7bf6; color: #fff; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.ig-priv { margin: 4px 16px 0; padding: 10px 12px; background: #f4f4f4; border-radius: 10px; font-size: 13px; color: #555; }
.ig-ph [data-user] { cursor: pointer; }
