/* ============================================================
   INSTAGRAM — 03
   Konsep: feed Instagram terang. Story viewer, carousel, DM.
   ============================================================ */
:root {
  --ig-bg: #fafafa;
  --ig-card: #ffffff;
  --ig-ink: #262626;
  --ig-soft: #737373;
  --ig-faint: #a8a8a8;
  --ig-line: #efefef;
  --ig-line-2: #dbdbdb;
  --ig-blue: #0095f6;
  --ig-red: #ed4956;
  --ig-link: #00376b;
  --ig-grad: conic-gradient(from 200deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75);
  --ig-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ig-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  background: var(--ig-bg);
  color: var(--ig-ink);
  font-family: var(--ig-font);
  font-size: 15px;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.ig-locked { overflow: hidden; }
img { background: #f0f0f0; }

.ig-wordmark {
  font-family: "Grand Hotel", "Segoe Script", cursive;
  font-size: 1.95rem; font-weight: 400; letter-spacing: 0.01em; line-height: 1;
  color: #262626;
}
.ig-hash { color: var(--ig-link); font-weight: 500; }

/* ================= GATE ================= */
.ig-gate {
  position: fixed; inset: 0; z-index: 200; overflow: hidden;
  display: flex; flex-direction: column;
  background: #fdfdfd;
  transition: opacity 0.5s ease, visibility 0.5s;
}
.ig-gate::before, .ig-gate::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none;
}
.ig-gate::before { width: 60vw; height: 60vw; left: -18vw; top: -10vw; background: rgba(254, 218, 117, 0.4); }
.ig-gate::after { width: 55vw; height: 55vw; right: -16vw; bottom: -6vw; background: rgba(214, 41, 118, 0.22); }
.ig-gate.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
.ig-gate__top {
  position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 18px 10px;
}
.ig-gate__back {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, 0.7); border: 1px solid var(--ig-line);
  color: var(--ig-ink); text-decoration: none;
}
.ig-gate__back svg { width: 18px; }
.ig-gate__date { font-size: 0.6rem; letter-spacing: 0.14em; color: var(--ig-soft); }
.ig-gate__center {
  position: relative; z-index: 3; flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 10px 24px 20px; min-height: 0;
}
.ig-gate__handle { margin-top: 22px; font-size: 0.82rem; font-weight: 600; }
.ig-gate__handle span { color: var(--ig-soft); font-weight: 400; }
.ig-gate__title {
  font-size: clamp(2rem, 9vw, 2.7rem); font-weight: 800; letter-spacing: -0.045em;
  line-height: 1.05; margin: 2px 0 8px;
}
.ig-gate__title em {
  font-style: normal;
  background: linear-gradient(100deg, #fa7e1e, #d62976 55%, #962fbf);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ig-gate__tap { font-size: 0.74rem; color: var(--ig-soft); letter-spacing: 0.02em; margin-bottom: 18px; }
.ig-gate__guest {
  font-size: 0.72rem; color: var(--ig-soft); border: 1px solid var(--ig-line-2);
  background: rgba(255, 255, 255, 0.7); border-radius: 999px; padding: 7px 16px;
  max-width: 100%; margin-bottom: 18px;
}
.ig-gate__guest strong { color: var(--ig-ink); font-weight: 600; overflow-wrap: anywhere; }
.ig-gate__btn {
  background: var(--ig-blue); color: #fff; border: 0; border-radius: 999px;
  padding: 11px 26px; font-size: 0.82rem; font-weight: 700;
  transition: transform 0.25s var(--ig-ease), background 0.2s;
}
.ig-gate__btn:hover { background: #007cd6; transform: translateY(-1px); }
.ig-gate__hint { margin-top: 16px; font-size: 0.58rem; color: var(--ig-faint); max-width: 32ch; line-height: 1.5; }
.ig-gate__foot {
  position: relative; z-index: 3; padding: 0 22px calc(22px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; justify-content: center;
}
.ig-gate__faces { display: flex; }
.ig-gate__faces span { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; border: 2px solid #fff; }
.ig-gate__faces span + span { margin-left: -8px; }
.ig-gate__faces img { width: 100%; height: 100%; object-fit: cover; }
.ig-gate__foot p { font-size: 0.62rem; color: var(--ig-soft); }

.ig-ring { position: relative; display: inline-block; padding: 0; border: 0; background: none; }
.ig-ring__grad { display: block; padding: 3px; border-radius: 50%; background: var(--ig-grad); }
.ig-ring__gap { display: block; padding: 3px; border-radius: 50%; background: #fdfdfd; }
.ig-ring__inner { display: block; border-radius: 50%; overflow: hidden; }
.ig-ring__inner img { width: 100%; height: 100%; object-fit: cover; }
.ig-ring--gate .ig-ring__inner { width: min(40vw, 158px); height: min(40vw, 158px); }
.ig-ring--gate { transition: transform 0.4s var(--ig-ease); }
.ig-ring--gate:hover { transform: scale(1.035); }
.ig-ring__play {
  position: absolute; right: 4px; bottom: 6px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--ig-blue); color: #fff; display: grid; place-items: center;
  border: 3px solid #fdfdfd; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.ig-ring__play svg { width: 14px; fill: currentColor; margin-left: 1px; }

/* ================= APP ================= */
.ig-app { opacity: 0; visibility: hidden; transition: opacity 0.6s ease 0.05s, visibility 0.6s; }
body.ig-live .ig-app { opacity: 1; visibility: visible; }
body.ig-live .ig-gate { display: none; }

.ig-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; gap: 10px;
  padding: calc(9px + env(safe-area-inset-top)) 16px 9px;
  background: rgba(250, 250, 250, 0.92); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--ig-line);
}
.ig-top__back {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  color: var(--ig-ink); text-decoration: none; transition: background 0.2s;
}
.ig-top__back:hover { background: #efefef; }
.ig-top__back svg { width: 18px; }
.ig-wordmark--top { font-size: 1.6rem; margin-left: 2px; }
.ig-top__icons { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.ig-top__icon {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: none; border: 0; color: var(--ig-ink); text-decoration: none;
  transition: background 0.2s;
}
.ig-top__icon:hover { background: #efefef; }
.ig-top__icon svg { width: 22px; }

.ig-main { max-width: 640px; margin: 0 auto; padding-top: calc(54px + env(safe-area-inset-top)); padding-bottom: 100px; }
#profil, #feed, #cerita, #acara, #explore, #lokasi, #dm, #penutup { scroll-margin-top: calc(62px + env(safe-area-inset-top)); }

/* ================= PROFILE ================= */
.ig-profile { padding: 20px 16px 8px; background: var(--ig-bg); }
.ig-profile__top { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.ig-ring--profile .ig-ring__gap { background: var(--ig-bg); padding: 2px; }
.ig-ring--profile .ig-ring__grad { padding: 2.5px; }
.ig-ring--profile .ig-ring__inner { width: 82px; height: 82px; }
.ig-stats { flex: 1; display: flex; justify-content: space-around; text-align: center; min-width: 0; }
.ig-stats strong { display: block; font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.ig-stats span { display: block; font-size: 0.72rem; color: var(--ig-soft); margin-top: 1px; }
.ig-profile__bio h1 { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.015em; display: flex; align-items: center; gap: 5px; margin-bottom: 2px; }
.ig-verified {
  width: 14px; height: 14px; border-radius: 50%; background: var(--ig-blue); color: #fff;
  font-size: 0.55rem; display: inline-grid; place-items: center; font-weight: 800;
}
.ig-profile__role { font-size: 0.8rem; color: var(--ig-soft); margin-bottom: 6px; }
.ig-profile__bio p { font-size: 0.82rem; line-height: 1.45; margin-bottom: 3px; }
.ig-profile__date { color: var(--ig-soft); font-size: 0.76rem !important; }
.ig-profile__link { color: var(--ig-link); font-size: 0.78rem !important; }
.ig-profile__link strong { font-weight: 600; }
.ig-profile__hash { color: var(--ig-link); font-size: 0.78rem !important; }
.ig-profile__actions { display: grid; grid-template-columns: 1fr 1fr 38px; gap: 6px; margin: 14px 0 18px; }
.ig-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 8px; background: #efefef; color: var(--ig-ink);
  padding: 8px 12px; font-size: 0.78rem; font-weight: 600; text-decoration: none;
  transition: background 0.2s, transform 0.2s, color 0.2s;
}
.ig-btn:hover { background: #e4e4e4; }
.ig-btn--primary { background: var(--ig-blue); color: #fff; }
.ig-btn--primary:hover { background: #007cd6; }
.ig-btn--primary[aria-pressed="true"] { background: #efefef; color: var(--ig-ink); }
.ig-btn--icon { padding: 0; }
.ig-btn--icon svg { width: 18px; }
.ig-btn--icon:hover { transform: translateY(-1px); }

.ig-highlights {
  display: flex; gap: 18px; overflow-x: auto; padding: 4px 2px 16px;
  scrollbar-width: none; border-top: 1px solid var(--ig-line); padding-top: 14px;
}
.ig-highlights::-webkit-scrollbar { display: none; }
.ig-highlight { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; text-decoration: none; color: var(--ig-ink); }
.ig-highlight__ring {
  width: 58px; height: 58px; border-radius: 50%; padding: 2.5px;
  border: 1px solid var(--ig-line-2); background: #fff;
  transition: transform 0.25s var(--ig-ease), border-color 0.2s;
}
.ig-highlight__ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.ig-highlight:hover .ig-highlight__ring { transform: scale(1.06); border-color: var(--ig-faint); }
.ig-highlight span:last-child { font-size: 0.66rem; color: var(--ig-ink); }

.ig-collab { border-top: 1px solid var(--ig-line); padding: 14px 0 6px; }
.ig-collab__label { font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ig-soft); margin-bottom: 10px; }
.ig-collab__grid { display: grid; gap: 8px; }
.ig-person {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border: 1px solid var(--ig-line); border-radius: 10px; padding: 12px;
}
.ig-person__photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--ig-line); }
.ig-person h2 { font-size: 0.82rem; font-weight: 700; }
.ig-person a { font-size: 0.72rem; color: var(--ig-link); text-decoration: none; }
.ig-person p { font-size: 0.68rem; line-height: 1.5; color: var(--ig-soft); margin-top: 3px; }
.ig-person p:last-child { color: #8a8a8a; }

/* ================= POSTS ================= */
.ig-feed { border-top: 1px solid var(--ig-line); }
.ig-post { background: var(--ig-card); border-bottom: 1px solid var(--ig-line); margin-bottom: 10px; }
.ig-post__head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.ig-avatar { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; border: 1px solid var(--ig-line); }
.ig-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ig-post__who { min-width: 0; flex: 1; }
.ig-post__who strong { display: block; font-size: 0.8rem; font-weight: 600; }
.ig-post__who > span { display: block; font-size: 0.68rem; color: var(--ig-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-post__more { margin-left: auto; background: none; border: 0; font-size: 1.1rem; letter-spacing: 0.08em; color: var(--ig-ink); line-height: 1; padding: 4px; }
.ig-post__actions { display: flex; align-items: center; gap: 14px; padding: 10px 14px 5px; }
.ig-act { width: 28px; height: 28px; display: grid; place-items: center; background: none; border: 0; color: var(--ig-ink); padding: 0; }
.ig-act svg { width: 23px; height: 23px; }
.ig-act:hover { opacity: 0.6; }
.ig-act--save { margin-left: auto; }
.ig-act--like[aria-pressed="true"] svg path { fill: var(--ig-red); stroke: var(--ig-red); }
.ig-act--like[aria-pressed="true"] { color: var(--ig-red); }
.ig-act--save[aria-pressed="true"] svg path { fill: var(--ig-ink); }
.ig-post__body { padding: 0 14px 12px; }
.ig-likes { font-size: 0.78rem; font-weight: 400; margin-bottom: 5px; }
.ig-likes strong { font-weight: 700; }
.ig-post__caption { font-size: 0.8rem; line-height: 1.5; margin-bottom: 5px; overflow-wrap: anywhere; }
.ig-post__caption strong { font-weight: 600; margin-right: 4px; }
.ig-comments-link { background: none; border: 0; padding: 0; font-size: 0.78rem; color: var(--ig-soft); margin-bottom: 5px; }
.ig-post__time { font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ig-faint); }

.ig-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #eee; }
.ig-photo img { width: 100%; height: 100%; object-fit: cover; }
.ig-heartburst {
  position: absolute; left: 50%; top: 50%; width: 92px; height: 92px;
  transform: translate(-50%, -50%) scale(0); color: #fff; pointer-events: none;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35)); opacity: 0;
}
.ig-heartburst svg { width: 100%; height: 100%; fill: #fff; }
.ig-photo.is-burst .ig-heartburst { animation: igBurst 0.9s var(--ig-ease) forwards; }
@keyframes igBurst {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
  22% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  45% { transform: translate(-50%, -50%) scale(0.95); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.05); opacity: 0; }
}

/* Countdown post */
.ig-post--countdown { border-top: 0; }
.ig-countdown {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  background: linear-gradient(120deg, #feda75, #fa7e1e 26%, #d62976 58%, #962fbf 82%, #4f5bd5);
  padding: 22px 10px; color: #fff; text-align: center;
}
.ig-countdown strong { display: block; font-size: clamp(1.7rem, 8vw, 2.3rem); font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.12); }
.ig-countdown span { display: block; font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.82; margin-top: 6px; }

/* Carousel */
.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: start; position: relative; aspect-ratio: 4 / 5; overflow: hidden; border: 0; padding: 0; background: #ddd; text-align: left; color: #fff; }
.ig-slide img { width: 100%; height: 100%; object-fit: cover; }
.ig-slide__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 8, 12, 0.88), rgba(10, 8, 12, 0.1) 62%, rgba(0, 0, 0, 0.12)); }
.ig-slide__copy { position: absolute; left: 18px; right: 18px; bottom: 20px; }
.ig-slide__date { font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); margin-bottom: 6px; }
.ig-slide__title { font-size: clamp(1.3rem, 5.5vw, 1.7rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 8px; }
.ig-slide__text { font-size: 0.74rem; line-height: 1.6; color: rgba(255, 255, 255, 0.84); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ig-slide__date, .ig-slide__title { display: block; }
.ig-slide__hint { position: absolute; top: 14px; right: 14px; font-size: 0.54rem; letter-spacing: 0.14em; text-transform: uppercase; background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.3); padding: 4px 8px; border-radius: 999px; }
.ig-slide__index { position: absolute; top: 14px; left: 14px; font-size: 0.58rem; letter-spacing: 0.1em; background: rgba(0, 0, 0, 0.42); padding: 3px 8px; border-radius: 999px; }
.ig-slide--event .ig-event-card { position: absolute; left: 16px; right: 16px; bottom: 16px; background: rgba(255, 255, 255, 0.94); color: var(--ig-ink); border-radius: 12px; padding: 14px; backdrop-filter: blur(10px); }
.ig-event-card__tag { font-size: 0.55rem; letter-spacing: 0.18em; text-transform: uppercase; color: #d62976; margin-bottom: 4px; }
.ig-event-card h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 2px; }
.ig-event-card__time { font-size: 0.74rem; font-weight: 600; margin-bottom: 2px; }
.ig-event-card__venue { font-size: 0.72rem; color: var(--ig-soft); margin-bottom: 2px; }
.ig-event-card__addr { font-size: 0.66rem; line-height: 1.5; color: var(--ig-faint); margin-bottom: 10px; }
.ig-event-card__actions { display: flex; gap: 6px; }
.ig-event-card__actions .ig-btn { font-size: 0.68rem; padding: 6px 12px; border-radius: 7px; }
.ig-dots { display: flex; justify-content: center; gap: 4px; padding: 9px 0 2px; }
.ig-dot { width: 5px; height: 5px; border-radius: 50%; background: #c7c7c7; border: 0; padding: 0; transition: background 0.2s, transform 0.2s; }
.ig-dot.is-active { background: var(--ig-blue); transform: scale(1.25); }

/* ================= EXPLORE ================= */
.ig-explore { margin-top: 22px; padding: 0 0 8px; border-top: 1px solid var(--ig-line); background: var(--ig-bg); }
.ig-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 20px 16px 14px; }
.ig-kicker { font-size: 0.56rem; letter-spacing: 0.2em; text-transform: uppercase; color: #d62976; font-weight: 700; margin-bottom: 3px; }
.ig-section-head h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; }
.ig-section-head > span { font-size: 0.62rem; color: var(--ig-soft); }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 0 3px; }
.ig-tile { position: relative; aspect-ratio: 1; overflow: hidden; border: 0; padding: 0; background: #eee; }
.ig-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ig-ease); }
.ig-tile::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.28); opacity: 0; transition: opacity 0.25s; }
.ig-tile__likes {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 5px;
  color: #fff; font-size: 0.74rem; font-weight: 700; opacity: 0; transition: opacity 0.25s;
}
.ig-tile__likes svg { width: 16px; fill: #fff; }
.ig-tile:hover img { transform: scale(1.05); }
.ig-tile:hover::after, .ig-tile:hover .ig-tile__likes, .ig-tile:focus-visible .ig-tile__likes { opacity: 1; }
.ig-explore__note { text-align: center; font-size: 0.6rem; color: var(--ig-faint); padding: 12px 16px 4px; }

/* ================= LOCATION ================= */
.ig-location { margin-top: 18px; }
.ig-post--location { margin-bottom: 0; }
.ig-loc-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 0.68rem !important; color: var(--ig-ink) !important; }
.ig-loc-tag svg { width: 11px; color: var(--ig-soft); }
.ig-map { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #f3f0e9; }
.ig-map__art { position: absolute; inset: 0; }
.ig-map__art svg { width: 100%; height: 100%; display: block; }
.ig-map__tag {
  position: absolute; left: 12px; top: 12px; background: rgba(255, 255, 255, 0.94);
  border-radius: 999px; padding: 6px 12px; font-size: 0.68rem; font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12); backdrop-filter: blur(6px);
}
.ig-loc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.ig-loc-actions .ig-btn { font-size: 0.72rem; padding: 8px 14px; border-radius: 999px; }

/* ================= DM ================= */
.ig-dm { margin-top: 24px; padding: 0 12px; }
.ig-dm .ig-section-head { padding-left: 4px; padding-right: 4px; }
.ig-dm__card { background: #fff; border: 1px solid var(--ig-line); border-radius: 14px; overflow: hidden; box-shadow: 0 18px 50px -34px rgba(0, 0, 0, 0.35); }
.ig-dm__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--ig-line); }
.ig-avatar--dm { width: 38px; height: 38px; }
.ig-dm__head div { flex: 1; min-width: 0; }
.ig-dm__head strong { display: block; font-size: 0.82rem; font-weight: 600; }
.ig-dm__head span { display: flex; align-items: center; gap: 4px; font-size: 0.66rem; color: var(--ig-soft); }
.ig-dm__head span i { width: 6px; height: 6px; border-radius: 50%; background: #1cd14f; display: inline-block; }
.ig-dm__info { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--ig-line-2); background: none; font-size: 0.7rem; font-weight: 700; color: var(--ig-soft); }
.ig-dm__thread { padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 6px; background: #fafafa; max-height: 330px; overflow-y: auto; }
.ig-bubble { max-width: 82%; border-radius: 18px; padding: 9px 13px; font-size: 0.78rem; line-height: 1.45; }
.ig-bubble p { margin-bottom: 2px; }
.ig-bubble span { display: block; font-size: 0.54rem; color: var(--ig-faint); text-align: right; margin-top: 3px; }
.ig-bubble--them { align-self: flex-start; background: #fff; border: 1px solid var(--ig-line); border-bottom-left-radius: 5px; }
.ig-bubble--me { align-self: flex-end; background: linear-gradient(120deg, #7b2ff7, #d62976 70%, #fa7e1e); color: #fff; border-bottom-right-radius: 5px; }
.ig-bubble--me span { color: rgba(255, 255, 255, 0.7); }
.ig-dm__form { padding: 14px; border-top: 1px solid var(--ig-line); background: #fff; }
.ig-dm__fields { display: grid; gap: 5px; }
.ig-dm__fields label, .ig-choice legend { font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ig-soft); font-weight: 600; }
.ig-dm__fields input, .ig-dm__fields select, .ig-dm__fields textarea {
  width: 100%; border: 1px solid var(--ig-line-2); border-radius: 9px; background: #fafafa;
  padding: 9px 11px; font-size: 0.8rem; color: var(--ig-ink); transition: border-color 0.2s, background 0.2s;
}
.ig-dm__fields input:focus, .ig-dm__fields select:focus, .ig-dm__fields textarea:focus {
  outline: 0; border-color: var(--ig-blue); background: #fff; box-shadow: 0 0 0 3px rgba(0, 149, 246, 0.1);
}
.ig-dm__fields textarea { resize: vertical; min-height: 58px; }
.ig-choice { border: 0; padding: 0; margin: 6px 0 3px; display: flex; flex-wrap: wrap; gap: 5px; }
.ig-choice legend { width: 100%; margin-bottom: 3px; }
.ig-choice label { position: relative; cursor: pointer; }
.ig-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ig-choice span {
  display: inline-block; border: 1px solid var(--ig-line-2); border-radius: 999px;
  padding: 6px 13px; font-size: 0.7rem; font-weight: 500; color: var(--ig-ink);
  transition: all 0.2s;
}
.ig-choice input:checked + span { background: var(--ig-ink); border-color: var(--ig-ink); color: #fff; }
.ig-choice input:focus-visible + span { outline: 2px solid var(--ig-blue); outline-offset: 2px; }
.ig-dm__send { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ig-dm__hint { flex: 1; font-size: 0.6rem; color: var(--ig-faint); }
.ig-send {
  width: 42px; height: 42px; border-radius: 50%; border: 0; color: #fff;
  background: linear-gradient(120deg, #7b2ff7, #d62976 60%, #fa7e1e);
  display: grid; place-items: center; flex: 0 0 auto;
  transition: transform 0.2s, filter 0.2s;
}
.ig-send:hover { transform: scale(1.06); filter: brightness(1.05); }
.ig-send svg { width: 19px; }
.ig-dm__done { font-size: 0.7rem; color: #1a8f43; margin-top: 8px; line-height: 1.5; }
.ig-dm__deadline { text-align: center; font-size: 0.66rem; color: var(--ig-soft); padding: 10px 0 0; }
.ig-dm__deadline strong { color: var(--ig-ink); }

/* ================= CLOSING ================= */
.ig-closing { padding: 30px 12px 10px; }
.ig-closing__card { background: #fff; border: 1px solid var(--ig-line); border-radius: 16px; overflow: hidden; }
.ig-closing__media { position: relative; aspect-ratio: 4 / 3; }
.ig-closing__media img { width: 100%; height: 100%; object-fit: cover; }
.ig-closing__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 8, 12, 0.72), transparent 60%); }
.ig-closing__tag { position: absolute; left: 16px; bottom: 14px; color: #fff; font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase; }
.ig-closing__body { position: relative; padding: 30px 20px 24px; text-align: center; }
.ig-avatar--closing { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); width: 60px; height: 60px; border: 3px solid #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); }
.ig-closing__body h2 { font-size: clamp(1.7rem, 7vw, 2.2rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; margin: 10px 0 14px; }
.ig-closing__body blockquote { font-size: 0.8rem; line-height: 1.7; color: #4b4b4b; font-style: italic; max-width: 34ch; margin: 0 auto 12px; }
.ig-closing__body p { font-size: 0.72rem; line-height: 1.65; color: var(--ig-soft); max-width: 40ch; margin: 0 auto 12px; }
.ig-closing__body .ig-closing__hash { color: var(--ig-link); font-size: 0.76rem; letter-spacing: 0.1em; margin: 14px auto 6px; }
.ig-closing__body .ig-closing__thanks { font-size: 0.66rem; margin-bottom: 18px; }
.ig-closing__body .ig-btn { font-size: 0.72rem; padding: 8px 16px; border-radius: 999px; }
.ig-credit { text-align: center; font-size: 0.58rem; color: var(--ig-faint); padding: 16px 0 4px; }
.ig-credit a { color: var(--ig-soft); }

/* ================= BOTTOM NAV ================= */
.ig-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-around;
  height: calc(54px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(18px);
  border-top: 1px solid var(--ig-line);
}
.ig-nav__item {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center;
  color: #8e8e8e; text-decoration: none; border-radius: 50%;
  transition: color 0.2s, transform 0.2s;
}
.ig-nav__item svg { width: 24px; height: 24px; }
.ig-nav__item:hover { color: var(--ig-ink); transform: translateY(-1px); }
.ig-nav__item.is-active { color: var(--ig-ink); }
.ig-nav__item.is-active::after {
  content: ""; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 3px; border-radius: 50%; background: var(--ig-ink);
}
.ig-nav__avatar { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; border: 1px solid var(--ig-line-2); }
.ig-nav__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ig-nav__avatar.is-active { box-shadow: 0 0 0 2px var(--ig-ink); }

/* ================= STORY VIEWER ================= */
.ig-story { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; }
.ig-story[hidden] { display: none; }
.ig-story__backdrop { position: absolute; inset: 0; background: rgba(10, 10, 12, 0.94); backdrop-filter: blur(10px); }
.ig-story__frame {
  position: relative; z-index: 2; width: 100%; height: 100%;
  background: #000; overflow: hidden; display: flex; flex-direction: column;
  animation: igStoryIn 0.4s var(--ig-ease);
}
.ig-story__frame:focus { outline: none; }
@keyframes igStoryIn { from { opacity: 0; transform: scale(0.985); } }
.ig-story__progress {
  position: absolute; top: calc(9px + env(safe-area-inset-top)); left: 10px; right: 10px; z-index: 6;
  display: flex; gap: 3px;
}
.ig-seg { flex: 1; height: 2.5px; background: rgba(255, 255, 255, 0.32); border-radius: 99px; overflow: hidden; }
.ig-seg i { display: block; height: 100%; width: 0; background: #fff; border-radius: 99px; }
.ig-seg.is-done i { width: 100%; }
.ig-seg.is-active i { animation: igSegFill 5s linear forwards; }
@keyframes igSegFill { from { width: 0; } to { width: 100%; } }
.ig-story__head {
  position: absolute; top: calc(20px + env(safe-area-inset-top)); left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; gap: 9px; padding: 10px 12px;
}
.ig-story__avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.5); }
.ig-story__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ig-story__who { flex: 1; min-width: 0; color: #fff; }
.ig-story__who strong { display: block; font-size: 0.78rem; font-weight: 600; }
.ig-story__who span { display: block; font-size: 0.62rem; color: rgba(255, 255, 255, 0.72); }
.ig-story__close { width: 34px; height: 34px; border: 0; background: none; color: #fff; font-size: 1.7rem; line-height: 1; }
.ig-story__stage { position: absolute; inset: 0; overflow: hidden; }
.ig-story__media { position: absolute; inset: 0; }
.ig-story__media > img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.25s ease; }
.ig-story__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 6, 10, 0.9), rgba(8, 6, 10, 0.12) 58%, rgba(0, 0, 0, 0.42)); }
.ig-story__copy { position: absolute; left: 22px; right: 22px; bottom: calc(88px + env(safe-area-inset-bottom)); color: #fff; }
.ig-story__date { font-size: 0.56rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); margin-bottom: 8px; }
.ig-story__copy h2 { font-size: clamp(1.6rem, 7vw, 2.1rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; margin-bottom: 10px; }
.ig-story__copy > p:last-child { font-size: 0.8rem; line-height: 1.6; color: rgba(255, 255, 255, 0.86); max-width: 34ch; }
.ig-story__zone { position: absolute; top: 70px; bottom: 80px; width: 38%; background: none; border: 0; z-index: 3; }
.ig-story__zone--prev { left: 0; }
.ig-story__zone--next { right: 0; width: 62%; }
.ig-story__foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
}
.ig-story__reply {
  flex: 1; display: flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px; padding: 4px 4px 4px 16px;
  background: rgba(0, 0, 0, 0.18); backdrop-filter: blur(8px);
}
.ig-story__reply input {
  flex: 1; min-width: 0; background: none; border: 0; color: #fff; font-size: 0.78rem; padding: 7px 0;
}
.ig-story__reply input::placeholder { color: rgba(255, 255, 255, 0.65); }
.ig-story__reply input:focus { outline: 0; }
.ig-story__reply button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; color: #fff; display: grid; place-items: center; }
.ig-story__reply button svg { width: 20px; }
.ig-story__like { width: 42px; height: 42px; border: 0; background: none; color: #fff; display: grid; place-items: center; }
.ig-story__like svg { width: 26px; }
.ig-story__like[aria-pressed="true"] svg path { fill: #ed4956; stroke: #ed4956; }

/* ================= TOAST ================= */
.ig-toast {
  position: fixed; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 400;
  transform: translate(-50%, 10px); background: rgba(38, 38, 38, 0.94); color: #fff;
  font-size: 0.72rem; padding: 10px 18px; border-radius: 10px; max-width: calc(100vw - 40px);
  opacity: 0; transition: opacity 0.25s, transform 0.25s var(--ig-ease); text-align: center;
}
.ig-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ================= RESPONSIVE ================= */
@media (min-width: 480px) {
  .ig-collab__grid { grid-template-columns: 1fr 1fr; }
  .ig-person { flex-direction: column; align-items: flex-start; gap: 8px; }
  .ig-person__photo { width: 48px; height: 48px; }
}

@media (min-width: 620px) {
  .ig-top { padding-left: 22px; padding-right: 22px; }
  .ig-main { padding-top: calc(62px + env(safe-area-inset-top)); }
  .ig-profile { padding-top: 26px; }
  .ig-post { border: 1px solid var(--ig-line); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
  .ig-feed { border-top: 0; }
  .ig-post--countdown { border-top: 1px solid var(--ig-line); }
  .ig-explore { border-top: 0; margin-top: 30px; }
  .ig-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .ig-dm { padding: 0 16px; }
  .ig-closing { padding: 30px 16px 10px; }
  .ig-nav {
    left: 50%; right: auto; bottom: 16px; transform: translateX(-50%);
    width: 430px; height: 58px; border: 1px solid var(--ig-line);
    border-radius: 999px; box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.28);
    padding-bottom: 0;
  }
  .ig-story__frame { width: min(430px, 94vw); height: min(88svh, 860px); border-radius: 16px; box-shadow: 0 40px 100px -30px #000; }
  .ig-story__progress { top: 10px; }
  .ig-story__head { top: 18px; }
  .ig-toast { bottom: 92px; }
  .ig-gate__center { padding-bottom: 40px; }
}

@media (min-width: 900px) {
  .ig-main { max-width: 640px; }
  .ig-explore, .ig-location, .ig-dm, .ig-closing { max-width: 935px; margin-left: auto; margin-right: auto; }
  .ig-explore { padding: 0 16px; }
  .ig-explore .ig-grid { padding: 0; }
  .ig-location { padding: 0 16px; }
  .ig-post--location { max-width: 640px; margin: 0 auto; }
  .ig-dm { max-width: 640px; }
  .ig-closing { max-width: 640px; }
  .ig-profile { max-width: 640px; margin: 0 auto; }
  .ig-section-head { padding-left: 0; padding-right: 0; }
  .ig-explore .ig-section-head { padding-left: 0; }
  .ig-dm .ig-section-head { padding-left: 0; }
  .ig-closing__media { aspect-ratio: 16 / 9; }
}

@media (max-width: 374px) {
  .ig-profile__top { gap: 12px; }
  .ig-ring--profile .ig-ring__inner { width: 72px; height: 72px; }
  .ig-stats strong { font-size: 0.92rem; }
  .ig-stats span { font-size: 0.64rem; }
  .ig-profile__actions { grid-template-columns: 1fr 1fr 34px; }
  .ig-countdown strong { font-size: 1.55rem; }
  .ig-story__copy { left: 16px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .ig-photo.is-burst .ig-heartburst { animation: none; opacity: 0; }
  .ig-seg.is-active i { animation: none; width: 100%; }
  .ig-story__frame { animation: none; }
}
