/* ============================================================================
   NovaP Story 모바일 화면 - 인스타그램 스타일(2026-09-28 사용자 결정 D27)
   ----------------------------------------------------------------------------
   "사람들은 익숙한 것에 친밀함을 느낀다" - 인스타그램의 모양·배치를 따른다. 모바일 기준 한 줄(470px),
   PC에서도 가운데에 휴대폰 폭으로 보여 준다. 관리 화면 디자인 시스템(custom.css)과 따로 이 파일에만 값을 둔다.
   아이콘은 인스타그램과 같은 모양의 선 아이콘(Lucide, src/utils/Icon.php). 부품 이름·규칙: .claude/docs/ui/components/story.md
   ============================================================================ */

body.ig {
  --ig-text: #000000;
  --ig-muted: #737373;
  --ig-faint: #a8a8a8;
  --ig-line: #dbdbdb;
  --ig-line-soft: #efefef;
  --ig-bg: #ffffff;
  --ig-page: #fafafa;
  --ig-blue: #0095f6;
  --ig-blue-dark: #1877f2;
  --ig-red: #ff3040;
  --ig-soft: #efefef;
  --ig-ring: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
  --ig-input: #fafafa;
  --ig-w: 470px;
  --ig-top-h: 54px;
  --ig-tab-h: 52px;
  margin: 0;
  background: var(--ig-page);
  color: var(--ig-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 18px;
  -webkit-font-smoothing: antialiased;
}
/* 공통 CSS가 body를 flex로 잡는다 - 그대로면 내용이 좁은 화면에서 앱 틀이 가운데로 쪼그라든다(2026-09-28 캡처에서 발견) */
body.ig { display: block; }
body.ig a { color: inherit; text-decoration: none; }
body.ig svg { display: block; }

.ig-app {
  width: 100%;
  max-width: var(--ig-w);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--ig-bg);
  border-left: 1px solid var(--ig-line-soft);
  border-right: 1px solid var(--ig-line-soft);
}
body.has-tabbar .ig-app { padding-bottom: calc(var(--ig-tab-h) + env(safe-area-inset-bottom)); }

/* ── 위 줄 ── */
.ig-top {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--ig-top-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: var(--ig-bg);
  border-bottom: 1px solid var(--ig-line-soft);
}
.ig-brand { font-size: 24px; font-weight: 700; font-style: italic; letter-spacing: -.5px; font-family: "Brush Script MT", "Segoe Script", cursive, -apple-system; }
.ig-top-back { margin-left: -8px; }
.ig-top-title { position: absolute; left: 56px; right: 56px; text-align: center; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.ig-top-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }

/* ── 아래 탭바 ── */
.ig-tabbar {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--ig-w);
  height: calc(var(--ig-tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--ig-bg);
  border-top: 1px solid var(--ig-line-soft);
}
.ig-tabbar a { display: flex; align-items: center; justify-content: center; width: 48px; height: 44px; }
.ig-tabbar a.is-active svg { stroke-width: 2.6; }
.ig-tabbar a.is-active .ig-avatar { box-shadow: 0 0 0 2px var(--ig-bg), 0 0 0 3.5px var(--ig-text); }

/* ── 버튼 ── */
.ig-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--ig-soft);
  color: var(--ig-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.ig-btn:hover { background: var(--ig-line); }
.ig-btn.is-primary { background: var(--ig-blue); color: #fff; }
.ig-btn.is-primary:hover { background: var(--ig-blue-dark); }
.ig-btn.is-danger { background: transparent; color: var(--ig-red); }
.ig-btn.is-small { height: 30px; padding: 0 12px; }
.ig-btn.is-block { width: 100%; }
.ig-btn.is-loading { opacity: .6; pointer-events: none; }
.ig-link { background: none; border: 0; padding: 0; color: var(--ig-blue); font-weight: 600; font-size: 14px; cursor: pointer; }
.ig-link.is-muted { color: var(--ig-muted); font-weight: 400; }
.ig-link.is-danger { color: var(--ig-red); }
.ig-icon-btn { background: none; border: 0; padding: 8px; margin: -8px; cursor: pointer; color: var(--ig-text); display: inline-flex; }

/* ── 아바타 ── */
.ig-avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0e7ff, #fce7f3);
  color: #555;
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
}
.ig-avatar.is-tab { width: 26px; height: 26px; font-size: 11px; }
.ig-avatar.is-lg { width: 86px; height: 86px; font-size: 32px; }
.ig-avatar.is-md { width: 44px; height: 44px; font-size: 16px; }

/* ── 동그라미 줄(D30 - 홈 맨 위, 스토리·묶음) ── */
.ig-rings {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ig-line-soft);
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.ig-rings::-webkit-scrollbar { display: none; }
.ig-ring { flex: 0 0 auto; width: 70px; display: flex; flex-direction: column; align-items: center; gap: 4px; scroll-snap-align: start; }
.ig-ring-pic {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  padding: 3px;
  background: var(--ig-ring);
  display: flex;
}
.ig-ring.is-group .ig-ring-pic { background: var(--ig-line); }
.ig-ring.is-new .ig-ring-pic { background: none; border: 1px dashed var(--ig-line); padding: 2px; }
.ig-ring-pic > span {
  flex: 1;
  border-radius: 50%;
  border: 3px solid var(--ig-bg);
  background: var(--ig-soft) center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--ig-muted);
}
.ig-ring-label { font-size: 12px; line-height: 14px; width: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-ring.is-group .ig-ring-label { color: var(--ig-muted); }

/* ── 게시물(피드 한 장) ── */
.ig-post { border-bottom: 1px solid var(--ig-line-soft); padding-bottom: 12px; }
.ig-post-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; }
.ig-post-who { display: flex; flex-direction: column; min-width: 0; }
.ig-post-who strong { font-weight: 600; font-size: 14px; }
.ig-post-who small { color: var(--ig-text); font-size: 12px; line-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-post-head .ig-post-more { margin-left: auto; }
.ig-post-tag { display: inline-flex; align-items: center; gap: 3px; padding: 0 8px; height: 20px; border-radius: 999px; background: var(--ig-soft); font-size: 11px; font-weight: 600; color: var(--ig-text); }
.ig-post-tag.is-story { background: #fde7f3; color: #b0126c; }
.ig-post-tag.is-hidden { background: #fff4d6; color: #8a5a00; }

/* 사진 넘기기(가로 스크롤 + 스냅) */
.ig-media { position: relative; background: #000; }
.ig-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ig-carousel::-webkit-scrollbar { display: none; }
.ig-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: #000; position: relative; }
.ig-slide img, .ig-slide video { width: 100%; height: 100%; object-fit: contain; }
.ig-slide.is-hidden img { opacity: .35; }
.ig-slide-empty { color: #666; }
.ig-media-count { position: absolute; top: 12px; right: 12px; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-weight: 600; }
.ig-dots { display: flex; justify-content: center; gap: 4px; height: 6px; margin-top: 10px; }
.ig-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--ig-line); }
.ig-dots span.is-on { background: var(--ig-blue); }
.ig-heart-pop { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 0; color: #fff; }
.ig-heart-pop svg { width: 96px; height: 96px; fill: #fff; stroke: #fff; filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }
.ig-heart-pop.is-on { animation: ig-pop .8s ease; }
@keyframes ig-pop { 0% { opacity: 0; transform: scale(.4); } 20% { opacity: 1; transform: scale(1.1); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }

.ig-actions { display: flex; align-items: center; gap: 16px; padding: 8px 16px 4px; }
.ig-actions .ig-right { margin-left: auto; }
.ig-like.is-liked svg { fill: var(--ig-red); stroke: var(--ig-red); }
.ig-like.is-bump svg { animation: ig-bump .35s ease; }
@keyframes ig-bump { 50% { transform: scale(1.25); } }
.ig-likes { padding: 0 16px; font-weight: 600; }
.ig-caption { padding: 6px 16px 0; white-space: pre-line; word-break: break-word; }
.ig-caption strong { font-weight: 600; margin-right: 4px; }
.ig-caption .ig-title { display: block; font-weight: 700; margin-bottom: 2px; }
.ig-people { padding: 4px 16px 0; color: var(--ig-muted); font-size: 13px; }
.ig-people span { color: var(--ig-text); font-weight: 600; }
.ig-comments-link { display: block; padding: 6px 16px 0; color: var(--ig-muted); }
.ig-time { display: block; padding: 6px 16px 0; color: var(--ig-muted); font-size: 11px; letter-spacing: .2px; }

/* 스토리 카드(피드 안) */
.ig-story-card-cover { position: relative; aspect-ratio: 4 / 3; background: var(--ig-soft) center / cover no-repeat; display: flex; align-items: flex-end; }
.ig-story-card-cover.is-empty { background: linear-gradient(135deg, #fde7f3, #e0e7ff); align-items: center; justify-content: center; }
.ig-story-card-shade { width: 100%; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); color: #fff; }
.ig-story-card-cover.is-empty .ig-story-card-shade { background: none; color: #111; text-align: center; padding: 0 16px; }
.ig-story-card-title { font-size: 20px; font-weight: 700; line-height: 26px; }
.ig-story-card-meta { font-size: 13px; opacity: .9; margin-top: 2px; }
.ig-emoji { font-size: 40px; line-height: 1; margin-bottom: 8px; }

/* ── 프로필 ── */
.ig-profile { padding: 16px; }
.ig-profile-top { display: flex; align-items: center; gap: 24px; }
.ig-stats { flex: 1; display: flex; justify-content: space-around; text-align: center; }
.ig-stats strong { display: block; font-size: 16px; font-weight: 700; }
.ig-stats span { font-size: 13px; }
.ig-profile-name { margin-top: 12px; font-weight: 600; }
.ig-profile-bio { white-space: pre-line; }
.ig-profile-buttons { display: flex; gap: 8px; margin-top: 12px; }
.ig-profile-buttons .ig-btn { flex: 1; }
.ig-tabs { display: flex; border-top: 1px solid var(--ig-line-soft); }
.ig-tabs a { flex: 1; display: flex; justify-content: center; align-items: center; gap: 6px; height: 44px; color: var(--ig-faint); font-size: 12px; font-weight: 600; border-top: 1px solid transparent; margin-top: -1px; }
.ig-tabs a.is-active { color: var(--ig-text); border-top-color: var(--ig-text); }

/* 3열 격자(프로필·둘러보기·스토리 앨범) */
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-cell { position: relative; aspect-ratio: 1 / 1; background: var(--ig-soft) center / cover no-repeat; overflow: hidden; display: block; }
.ig-cell img { width: 100%; height: 100%; object-fit: cover; }
.ig-cell-badge { position: absolute; top: 6px; right: 6px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.ig-cell-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 6px 6px; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; font-size: 12px; font-weight: 600; line-height: 15px; }
.ig-cell.is-text { display: flex; align-items: center; justify-content: center; padding: 10px; text-align: center; font-size: 13px; line-height: 17px; color: #111; background: linear-gradient(135deg, #fff7ed, #fde7f3); }
.ig-cell.is-hidden { opacity: .45; }

/* ── 목록 줄(알림·사람·참여자) ── */
.ig-list { list-style: none; margin: 0; padding: 0; }
.ig-row { display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.ig-row-text { flex: 1; min-width: 0; font-size: 14px; line-height: 18px; word-break: break-word; }
.ig-row-text strong { font-weight: 600; }
.ig-row-text small { color: var(--ig-muted); }
.ig-row-thumb { width: 44px; height: 44px; object-fit: cover; flex: 0 0 auto; }
.ig-section-title { padding: 16px 16px 8px; font-size: 16px; font-weight: 700; }

/* ── 코멘트 ── */
.ig-comment { display: flex; gap: 12px; padding: 8px 16px; }
.ig-comment.is-hidden { opacity: .5; }
.ig-comment-body { flex: 1; min-width: 0; white-space: pre-line; word-break: break-word; }
.ig-comment-body strong { font-weight: 600; margin-right: 4px; }
.ig-comment-meta { display: flex; gap: 12px; margin-top: 4px; color: var(--ig-muted); font-size: 12px; }
.ig-comment-meta button { background: none; border: 0; padding: 0; color: var(--ig-muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.ig-comment-box {
  position: sticky;
  bottom: calc(var(--ig-tab-h) + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--ig-bg);
  border-top: 1px solid var(--ig-line-soft);
}
body:not(.has-tabbar) .ig-comment-box { bottom: 0; }
.ig-comment-box textarea { flex: 1; border: 0; resize: none; outline: none; font: inherit; min-height: 20px; max-height: 80px; padding: 6px 0; background: transparent; }
.ig-comment-box .error-message { position: absolute; bottom: 100%; left: 16px; }

/* ── 입력(새 이야기·설정) ── */
.ig-form { padding: 0 0 16px; }
.ig-field { padding: 12px 16px; border-bottom: 1px solid var(--ig-line-soft); }
.ig-field > label, .ig-label { display: block; font-size: 12px; color: var(--ig-muted); margin-bottom: 6px; }
.ig-input, .ig-textarea, .ig-select {
  width: 100%;
  border: 1px solid var(--ig-line);
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
  background: var(--ig-input);
  color: var(--ig-text);
  outline: none;
}
.ig-input:focus, .ig-textarea:focus, .ig-select:focus { border-color: var(--ig-muted); background: var(--ig-bg); }
.ig-textarea { resize: vertical; min-height: 64px; }
.ig-textarea.is-plain { border: 0; background: transparent; padding: 0; min-height: 80px; }
.ig-inline { display: flex; gap: 8px; }
.ig-inline > * { flex: 1; min-width: 0; }
.ig-check { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
.ig-check input { width: 20px; height: 20px; accent-color: var(--ig-blue); }
.ig-hint { color: var(--ig-muted); font-size: 12px; margin-top: 6px; }
body.ig .error-message { color: var(--ig-red); font-size: 12px; display: block; margin-top: 4px; }
body.ig .field-error { border-color: var(--ig-red) !important; }

/* 알약(종류·공개범위 고르기) */
.ig-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ig-chip { position: relative; }
.ig-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ig-chip span { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ig-line); font-size: 13px; font-weight: 600; background: var(--ig-bg); color: var(--ig-text); }
.ig-chip input:checked + span { background: var(--ig-text); color: var(--ig-bg); border-color: var(--ig-text); }
.ig-chip input:focus-visible + span { outline: 2px solid var(--ig-blue); }

/* 새 이야기 - 사진 고르기 칸과 미리보기 */
.ig-picker { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; aspect-ratio: 1 / 1; background: var(--ig-input); border-bottom: 1px solid var(--ig-line-soft); text-align: center; color: var(--ig-muted); cursor: pointer; position: relative; }
.ig-picker input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ig-picker.has-files { aspect-ratio: auto; padding: 0; background: #000; display: block; cursor: default; }
.ig-picker.has-files input[type=file] { display: none; }
.ig-picker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--ig-bg); }
.ig-picker-grid > div { aspect-ratio: 1 / 1; background: var(--ig-soft) center / cover no-repeat; position: relative; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--ig-muted); }
.ig-picker-grid > div.is-video::after { content: "▶"; position: absolute; right: 4px; bottom: 2px; color: #fff; text-shadow: 0 1px 2px #000; }
.ig-picker-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; background: var(--ig-bg); border-bottom: 1px solid var(--ig-line-soft); }

/* 옵션 줄(+ 날짜 · 장소 · 행사 …) - 인스타그램의 "위치 추가 · 사람 태그" 줄 */
.ig-opt { border-bottom: 1px solid var(--ig-line-soft); }
.ig-opt > button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 15px;
  color: var(--ig-text);
  cursor: pointer;
  text-align: left;
}
.ig-opt > button .ig-opt-value { margin-left: auto; color: var(--ig-muted); font-size: 13px; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-opt > button .ig-opt-plus { margin-left: 8px; color: var(--ig-faint); }
.ig-opt.is-open > button .ig-opt-plus { transform: rotate(45deg); }
.ig-opt.is-on > button { font-weight: 600; }
.ig-opt-body { display: none; padding: 0 16px 14px; }
.ig-opt.is-open .ig-opt-body { display: block; }

/* 태그 입력(함께한 사람) */
.ig-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--ig-line); border-radius: 8px; padding: 6px 8px; background: var(--ig-input); }
.ig-tags input { flex: 1; min-width: 90px; border: 0; outline: none; background: transparent; font: inherit; padding: 4px; }
.ig-tag { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--ig-text); color: var(--ig-bg); font-size: 13px; font-weight: 600; }
.ig-tag button { background: none; border: 0; color: var(--ig-bg); cursor: pointer; padding: 0; font-size: 14px; line-height: 1; }

/* ── 스토리 화면 ── */
.ig-invite { color: #111; position: relative; padding: 36px 20px 28px; text-align: center; background: linear-gradient(160deg, #fff7ed 0%, #fde7f3 55%, #ede9fe 100%) center / cover no-repeat; }
.ig-invite.is-memorial { background: linear-gradient(160deg, #f5f5f4, #e7e5e4); }
.ig-invite-kicker { font-size: 12px; letter-spacing: 3px; color: var(--ig-muted); text-transform: uppercase; }
.ig-invite-title { font-size: 26px; line-height: 32px; font-weight: 800; margin: 10px 0 6px; }
.ig-invite-hero { font-size: 15px; color: var(--ig-muted); }
.ig-invite-when { margin-top: 16px; font-size: 17px; font-weight: 700; }
.ig-invite-where { margin-top: 4px; color: #444; }
.ig-invite-msg { margin: 16px auto 0; max-width: 320px; white-space: pre-line; line-height: 21px; }
.ig-invite .ig-btn { margin-top: 16px; }
.ig-story-head { padding: 14px 16px; border-bottom: 1px solid var(--ig-line-soft); }
.ig-story-title { font-size: 20px; font-weight: 800; line-height: 26px; }
.ig-story-meta { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; color: var(--ig-text); }
.ig-story-meta div { display: flex; align-items: center; gap: 6px; }
.ig-story-meta svg { color: var(--ig-muted); }
.ig-rsvp { padding: 14px 16px; border-bottom: 1px solid var(--ig-line-soft); }
.ig-rsvp-sum { color: var(--ig-muted); font-size: 13px; margin-bottom: 10px; }
.ig-rsvp-sum strong { color: var(--ig-text); }

/* ── 바닥 시트(… 메뉴) ── */
dialog.ig-sheet {
  margin: auto auto 0;
  width: 100%;
  max-width: var(--ig-w);
  border: 0;
  border-radius: 16px 16px 0 0;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  background: var(--ig-bg);
  color: var(--ig-text);
}
dialog.ig-sheet::backdrop { background: rgba(0, 0, 0, .45); }
dialog.ig-sheet .ig-sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--ig-line); margin: 4px auto 8px; }
dialog.ig-sheet form, dialog.ig-sheet a, dialog.ig-sheet > button { display: block; }
.ig-sheet-item { width: 100%; display: block; padding: 14px 16px; background: none; border: 0; border-top: 1px solid var(--ig-line-soft); font: inherit; font-size: 15px; text-align: center; cursor: pointer; color: var(--ig-text); }
.ig-sheet-item.is-danger { color: var(--ig-red); font-weight: 600; }
.ig-sheet-body { padding: 8px 16px 16px; }
.ig-sheet-title { text-align: center; font-weight: 700; padding: 6px 16px 12px; }

/* 빈 화면 */
.ig-empty { padding: 48px 32px; text-align: center; color: var(--ig-muted); }
.ig-empty-icon { width: 62px; height: 62px; margin: 0 auto 14px; border: 2px solid var(--ig-text); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ig-text); }
.ig-empty h2 { color: var(--ig-text); font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.ig-empty .ig-btn { margin-top: 16px; }

.ig-more { display: block; margin: 16px auto; text-align: center; }
.ig-search { padding: 8px 16px; }
.ig-search input { width: 100%; height: 36px; border: 0; border-radius: 8px; background: var(--ig-soft); padding: 0 16px; font: inherit; outline: none; }

/* 토스트는 탭바 위로 */
body.has-tabbar .bs-scope .toast-container { bottom: calc(var(--ig-tab-h) + 12px) !important; }

@media (min-width: 600px) {
  .ig-app { margin-top: 0; box-shadow: 0 0 0 1px var(--ig-line-soft); }
}

/* 서버가 돌려준 칸 오류가 접힌 옵션 안에 있으면 펼쳐 보인다(새 이야기) */
.ig-opt:has(.field-error) .ig-opt-body,
.ig-opt:has(.error-message:not(:empty)) .ig-opt-body { display: block; }

/* hidden 속성은 display를 준 클래스보다 늘 이긴다(새 이야기의 "다시 고르기" 줄이 사진 없이도 보이던 것, 2026-09-28) */
body.ig [hidden] { display: none !important; }
.ig-check > span { display: inline-flex; align-items: center; gap: 6px; }
.ig-check svg { display: inline-block; }
/* 사진을 고르면 고르기 안내(카메라·문구)는 숨기고 미리보기 격자만 */
.ig-picker.has-files > svg, .ig-picker.has-files > strong, .ig-picker.has-files > span { display: none; }


/* ── PC(768px 이상) - 인스타그램 PC처럼 왼쪽 아이콘 세로줄 + 가운데 피드 (+ 넓으면 오른쪽 칸) ──
   사용자가 보여 준 인스타 PC 화면(2026-09-28): 세로줄 72px(1264px 이상은 글자까지 244px), 피드 470px, 오른쪽 319px(1160px 이상, 홈) */
.ig-rail, .ig-side { display: none; }
.ig-shell { display: block; }
@media (min-width: 768px) {
  body.ig .ig-tabbar { display: none; }
  body.has-tabbar .ig-app { padding-bottom: 0; }
  .ig-rail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: fixed;
    z-index: 30;
    left: 0;
    top: 0;
    bottom: 0;
    width: 72px;
    padding: 24px 12px 20px;
    background: var(--ig-bg);
    border-right: 1px solid var(--ig-line-soft);
  }
  .ig-rail a {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 48px;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--ig-text);
    font-size: 16px;
    white-space: nowrap;
  }
  .ig-rail a:hover { background: var(--ig-soft); }
  .ig-rail a.is-active { font-weight: 700; }
  .ig-rail a.is-active svg { stroke-width: 2.6; }
  .ig-rail a span.ig-rail-label { display: none; }
  .ig-rail .ig-rail-logo { height: 56px; margin-bottom: 18px; }
  .ig-rail .ig-rail-logo .ig-brand { display: none; }
  .ig-rail .ig-rail-more { margin-top: auto; }
  .ig-shell { display: flex; justify-content: center; gap: 64px; margin-left: 72px; }
  .ig-app { max-width: 470px; margin: 0; border: 0; box-shadow: none; } /* 휴대폰의 margin: 0 auto가 flex에서 남는 폭을 먹어 오른쪽 칸이 밀렸다 */
  body.ig { background: var(--ig-bg); }
  .ig-top.is-home { display: none; }
  .ig-top .ig-brand { display: none; }
  .ig-main { padding-top: 12px; }
  .ig-top + .ig-main { padding-top: 0; }
  .ig-comment-box { bottom: 0; }
  .ig-post { border: 0; margin-bottom: 20px; }
  .ig-post-head { padding-left: 4px; padding-right: 4px; }
  .ig-media, .ig-story-card-cover { border-radius: 4px; overflow: hidden; }
  /* 여러 장 - 마우스로는 밀기 어려우니 좌우 화살표 */
  .ig-nav {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    color: #000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
    z-index: 2;
  }
  .ig-nav.is-prev { left: 10px; }
  .ig-nav.is-next { right: 10px; }
  .ig-nav[disabled] { display: none; }
  dialog.ig-sheet { margin: auto; border-radius: 12px; max-width: 420px; }
}
.ig-nav { display: none; }
@media (min-width: 768px) { .ig-media .ig-nav { display: flex; } .ig-media .ig-nav[disabled] { display: none; } }
@media (min-width: 1264px) {
  .ig-rail { width: 244px; }
  .ig-rail a span.ig-rail-label { display: inline; }
  .ig-rail .ig-rail-logo .ig-brand { display: inline; }
  .ig-rail .ig-rail-logo svg { display: none; }
  .ig-shell { margin-left: 244px; }
}
@media (min-width: 1160px) {
  .ig-side { display: block; width: 319px; padding-top: 36px; flex: 0 0 auto; }
}
.ig-side-me { display: flex; align-items: center; gap: 12px; }
.ig-side-me .ig-row-text small { display: block; }
.ig-side-head { display: flex; justify-content: space-between; margin: 24px 0 8px; color: var(--ig-muted); font-weight: 600; }
.ig-side-head a { color: var(--ig-text); font-size: 12px; }
.ig-side .ig-row { padding: 8px 0; }
.ig-side-foot { margin-top: 24px; color: var(--ig-faint); font-size: 12px; line-height: 16px; }
.ig-side-foot a { color: var(--ig-faint); }
.ig-ring-mini { width: 44px; height: 44px; border-radius: 50%; padding: 2px; background: var(--ig-ring); flex: 0 0 auto; display: flex; }
.ig-ring-mini > span { flex: 1; border-radius: 50%; border: 2px solid var(--ig-bg); background: var(--ig-soft) center / cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 18px; }
