/* Levers 7 and 8 (ch-levers-7-8.js). Every selector starts with l78-. Instagram pieces come from ig.css (ik-).
 * Compact = (max-width: 959px), (max-height: 599px); phone = (max-width: 759px) and (orientation: portrait).
 * Mock and data visuals live in size containers (l78s, l78h, l78p) so they drop secondary parts on small frames. */

/* ---------- shared ---------- */
.l78-stack { display: grid; }
.l78-stack__i { grid-area: 1 / 1; display: grid; gap: 10px; align-content: start; }
.l78-tags { display: flex; gap: 8px; }
.scene .l78-lab { font-size: 15px; line-height: 1.25; color: #fff; transition: opacity .45s; }
.scene .l78-lab.is-off { opacity: 0; }
.scene .l78-lab--o { color: #FFB27A; }
.scene .l78-lab--gold { color: #FFD9A0; }
.scene .l78-lab--aqua { color: #A8F0E6; }
.scene .l78-lab--lilac { color: #DCD0F5; }
.scene .l78-lab--blue { color: #BFE6FA; }
.l78-w .ig-note { color: rgb(255 255 255 / .86); }
.l78-lscrim { display: none; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgb(5 5 6 / .88) 0, rgb(5 5 6 / .7) 36%, transparent 56%); }
/* compact landscape 3D: title and text keep to the left half, so the world gets the full height of the right half */
@media (max-width: 959px) and (orientation: landscape), (max-height: 599px) and (orientation: landscape) {
  .l78-w .ig--full .ig-side { max-width: min(20em, 50%); }
  .l78-w .ig--full .ig-t { max-width: min(13.5em, 54%); }
  .l78-lscrim { display: block; }
}

/* ---------- mock scenes: the phone stage (l8-how) ---------- */
.l78-stage { position: relative; height: 100%; min-height: 0; display: grid; place-items: center; container: l78s / size; }
.l78-stage .l78-ph { position: relative; z-index: 2; height: 100%; width: auto; max-width: 100%; aspect-ratio: 9 / 17.4; }
.l78-ex { position: absolute; left: 0; top: 0; z-index: 3; }
.l78-ph .l78-ex.l78-ex--bar { position: static; height: 20px; padding: 0 6px; background: #fff; }
.ik-status:has(.l78-ex--bar) .ik-notch { display: none; }
.ik-phone.l78-ph .ik-bar { flex: none; }
@container l78s (max-height: 540px) {
  .l78-stage .l78-ph { aspect-ratio: auto; width: min(100%, 310px); height: 100%; }
}
/* compact landscape mocks: title and text in the left column, the visual takes the full height on the right */
@media (max-width: 959px) and (orientation: landscape), (max-height: 599px) and (orientation: landscape) {
  .scene.l78-mock .ig--split, .scene.l78-data .ig--split { grid-template-columns: minmax(0, 1fr) clamp(250px, 46%, 400px); grid-template-rows: auto minmax(0, 1fr); }
  .l78-mock .ig--split .ig-t, .l78-data .ig--split .ig-t { grid-column: 1; grid-row: 1; max-width: 100%; }
  .l78-mock .ig--split .ig-side, .l78-data .ig--split .ig-side { grid-column: 1; grid-row: 2; max-width: none; }
  .l78-mock .ig--split .ig-vis, .l78-data .ig--split .ig-vis { grid-column: 2; grid-row: 1 / 3; }
}

/* ---------- l7-how: the Saved collection, then a chat with Muse ---------- */
.l78-view { position: absolute; inset: 0; overflow: hidden; background: #fff; transition: transform .62s cubic-bezier(.3, .7, .2, 1), opacity .5s; }
.l78-view.is-next { transform: translateX(100%); visibility: hidden; transition: transform .62s cubic-bezier(.3, .7, .2, 1), opacity .5s, visibility 0s .62s; }
.l78-view.is-past { transform: translateX(-28%); opacity: 0; visibility: hidden; transition: transform .62s cubic-bezier(.3, .7, .2, 1), opacity .5s, visibility 0s .62s; }
.l78-h7__saved, .l78-h7__chat { display: grid; align-content: start; }
.l78-h7__hd { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #EFEFEF; }
.l78-h7__hd b { text-align: center; font-size: 16px; font-weight: 700; }
.l78-h7__grid, .l78-h7__more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.l78-h7__grid { padding-top: 2px; }
.l78-h7__more { margin-top: 2px; opacity: .55; }
.l78-h7__ghost { aspect-ratio: 9 / 13; }
.l78-h7__tile { position: relative; aspect-ratio: 9 / 13; opacity: 0; transition: opacity .4s var(--d), filter .6s .9s; }
.l78-h7.is-active .l78-h7__tile { opacity: 1; }
.l78-h7.is-active .l78-h7__tile:not(.is-out) { filter: saturate(.55) brightness(.94); }
.l78-h7__n { position: absolute; left: 6px; bottom: 5px; z-index: 2; display: inline-flex; align-items: center; gap: 3px; color: #fff; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px rgb(0 0 0 / .7); }
.l78-h7__tile.is-out .l78-h7__n { font-size: 15px; font-weight: 700; }
.l78-h7__tile.is-out { z-index: 1; transition: opacity .4s var(--d), box-shadow .5s .6s; }
.l78-h7__x { position: absolute; left: 6px; top: 6px; z-index: 4; padding: 2px 7px; border-radius: 4px; background: #FF7F32; color: #fff; font-size: 14px; font-weight: 700; opacity: 0; transition: opacity .3s .85s; }
.l78-h7.is-active .l78-h7__tile.is-out { box-shadow: inset 0 0 0 3px #FF7F32, 0 0 0 2px #fff, 0 0 18px 3px rgb(255 127 50 / .85); }
.l78-h7.is-active .l78-h7__x { opacity: 1; }
.l78-h7__hd--chat { grid-template-columns: 28px 30px minmax(0, 1fr) 10px; gap: 8px; }
.l78-h7__muse { display: inline-block; width: 28px; height: 28px; border-radius: 50%; background: conic-gradient(from 200deg, #0064E0, #A033FF, #FF5C87, #0082FB, #0064E0); box-shadow: inset 0 0 0 5px #fff; }
.l78-h7__muse--sm { width: 24px; height: 24px; flex: none; box-shadow: inset 0 0 0 4px #fff; }
.l78-h7__msgs { display: grid; gap: 8px; padding: 12px 12px 0; }
.l78-h7__att { justify-self: end; display: flex; gap: 3px; }
.l78-h7__mini { width: 38px; aspect-ratio: 9 / 14; border-radius: 4px; }
.l78-h7__q.ik-bub { max-width: 88%; font-size: 15px; }
.l78-h7__ans { display: flex; align-items: flex-end; gap: 6px; }
.l78-h7__a.ik-bub { display: grid; gap: 2px; max-width: 86%; font-size: 15px; }
.l78-h7__q, .l78-h7__ans { opacity: 0; transform: translateY(8px); transition: opacity .45s, transform .45s; }
.l78-h7.is-active.l78-b1 .l78-h7__q { opacity: 1; transform: none; transition-delay: .55s; }
.l78-h7.is-active.l78-b1 .l78-h7__ans { opacity: 1; transform: none; transition-delay: 1.2s; }
.l78-h7__comp { position: absolute; left: 10px; right: 10px; bottom: 16px; display: flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 18px; box-shadow: inset 0 0 0 1px #DBDBDB; }
@container l78s (max-height: 420px) {
  .l78-h7__more { display: none; }
  .l78-h7__msgs { gap: 6px; padding-top: 8px; }
  .l78-h7__mini { width: 30px; }
  .l78-h7__comp { display: none; }
}
@container l78s (max-height: 300px) {
  .l78-h7__att { display: none; }
  .l78-h7__hd { padding: 4px 10px; }
  .l78-h7__q.ik-bub, .l78-h7__a.ik-bub { font-size: 14px; line-height: 1.25; padding: 5px 10px; }
  .l78-h7__hd--chat { display: none; }
  .l78-h7__msgs { gap: 4px; padding-top: 6px; }
  .l78-h7__a.ik-bub { gap: 0; }
  .l78-h7__tile { aspect-ratio: 9 / 11; }
}

/* ---------- l8-proof: the line that jumps ---------- */
.l78-lc { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
.l78-lc__hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.l78-lc__t { font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--s-fg); }
.l78-lc__plot { position: relative; min-height: 0; }
.l78-lc__svg { position: absolute; inset: 0; overflow: visible; }
.l78-lc__grid line { stroke: var(--s-line); stroke-width: 1; stroke-dasharray: 3 4; }
.l78-lc__grid line.is-base { stroke: var(--s-fg); stroke-dasharray: none; stroke-width: 1.5; }
.l78-lc__oth path { fill: none; stroke: #B9B5AE; stroke-width: 1.6; stroke-linejoin: round; opacity: .55; }
.l78-lc__pre { fill: none; stroke: #6E6A64; stroke-width: 2.4; stroke-linejoin: round; }
.l78-lc__post { fill: none; stroke: #FF7F32; stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.l78-p8.is-active .l78-lc__post { stroke-dashoffset: 0; transition: stroke-dashoffset 1.3s cubic-bezier(.45, .05, .25, 1) .45s; }
.l78-lc__mk { stroke: #111; stroke-width: 1.4; stroke-dasharray: 5 5; opacity: .7; }
.l78-lc__tk { position: absolute; left: 0; transform: translateY(-50%); text-align: right; font-size: 14px; font-weight: 500; color: var(--s-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.l78-lc__v { position: absolute; font-size: clamp(16px, 1.6vw, 22px); font-weight: 600; font-variant-numeric: tabular-nums; color: #4A4742; white-space: nowrap; }
.l78-lc__v--o { color: #E8620F; opacity: 0; transition: opacity .5s; }
.l78-p8.is-active .l78-lc__v--o { opacity: 1; transition-delay: 1.4s; }
.l78-lc__ml { position: absolute; padding: 2px 8px; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1px var(--s-line); font-size: 14px; font-weight: 500; color: var(--s-fg); white-space: nowrap; }

/* ---------- l8-how: the account switcher, then one video with three hooks ---------- */
.l78-h8__sw { position: absolute; inset: 0; }
.l78-h8__bg { position: absolute; inset: 0; display: grid; gap: 10px; align-content: start; padding: 6px 14px 0; }
.l78-h8__top { display: flex; align-items: center; gap: 6px; }
.l78-h8__top .ik-bar { height: 10px; background: #DADADA; }
.l78-h8__sp { flex: 1; }
.l78-h8__row { display: flex; align-items: center; gap: 16px; }
.l78-h8__stats { flex: 1; display: flex; justify-content: space-around; }
.l78-h8__stats > span { display: grid; gap: 5px; justify-items: center; }
.l78-h8__bio { display: grid; gap: 6px; }
.l78-h8__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin: 0 -14px; }
.l78-h8__grid > * { aspect-ratio: 3 / 4; }
.l78-h8__dim { position: absolute; inset: 0; background: rgb(0 0 0 / .42); }
.l78-h8__sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; padding: 8px 0 30px; border-radius: 16px 16px 0 0; background: #fff; box-shadow: 0 -10px 30px -10px rgb(0 0 0 / .35); }
.l78-h8__grip { justify-self: center; width: 38px; height: 4px; margin-bottom: 8px; border-radius: 2px; background: #D0D0D0; }
.l78-acct { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 9px 16px; }
.l78-acct__av.ik-av { width: 38px; height: 38px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ac), 0 0 14px 3px color-mix(in srgb, var(--ac) 55%, transparent); }
.l78-acct__h { overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.l78-acct__rd { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #C7C7C7; }
.l78-acct.is-cur .l78-acct__rd { background: #0095F6; color: #fff; box-shadow: none; }
.l78-acct--add { grid-template-columns: 38px minmax(0, 1fr); }
.l78-acct__plus { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #DBDBDB; }
.l78-h8__posts { display: grid; align-content: start; gap: 8px; padding-bottom: 10px; }
.l78-h8__ph { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #EFEFEF; }
.l78-h8__ph .ik-bar { justify-self: center; height: 10px; }
.l78-post { display: grid; grid-template-columns: 34% minmax(0, 1fr); gap: 10px; align-items: start; padding: 0 12px; opacity: 0; transform: translateY(10px); transition: opacity .45s var(--d), transform .45s var(--d); }
.l78-h8.is-active.l78-b1 .l78-post { opacity: 1; transform: none; }
.l78-post__v { position: relative; aspect-ratio: 9 / 13; overflow: hidden; border-radius: 6px; box-shadow: 0 0 0 2px var(--ac); }
.l78-post__cv { position: absolute; inset: 0; }
.l78-post__hk { position: absolute; left: 6%; right: 6%; top: 12%; z-index: 1; padding: 4px 5px; border-radius: 4px; background: rgb(0 0 0 / .62); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.2; text-align: center; }
.l78-post__b { display: grid; gap: 7px; padding-top: 2px; }
.l78-post__acc { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; font-size: 14px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.l78-post__av.ik-av { width: 22px; height: 22px; flex: none; box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px var(--ac); }
.l78-post__au { display: flex; align-items: center; gap: 5px; color: #111; }
.l78-post__au .ik-bar { flex: 1; background: #D9D9D9; }
@container l78s (max-height: 470px) {
  .l78-h8__sheet { padding-bottom: 22px; }
  .l78-acct { padding: 6px 14px; column-gap: 10px; grid-template-columns: 32px minmax(0, 1fr) auto; }
  .l78-acct--add { grid-template-columns: 32px minmax(0, 1fr); }
  .l78-acct__av.ik-av, .l78-acct__plus { width: 32px; height: 32px; }
  .l78-post { grid-template-columns: 30% minmax(0, 1fr); }
  .l78-post__v { aspect-ratio: 9 / 10; }
  .l78-post__b > .ik-bar { display: none; }
}
@container l78s (max-height: 360px) {
  .l78-acct { padding: 3px 12px; }
  .l78-h8__sheet { padding: 4px 0 6px; }
  .l78-h8__grip { margin-bottom: 2px; height: 3px; }
  .l78-acct__av.ik-av, .l78-acct__plus { width: 28px; height: 28px; }
  .l78-acct { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .l78-acct--add { grid-template-columns: 28px minmax(0, 1fr); }
  .l78-acct__h { font-size: 14px; }
  .l78-h8__ph { display: none; }
  .l78-h8__posts { gap: 5px; padding-top: 6px; }
  .l78-post { grid-template-columns: 38% minmax(0, 1fr); }
  .l78-post__v { aspect-ratio: 16 / 9; }
  .l78-post__hk { top: 50%; transform: translateY(-50%); }
  .l78-post__b { gap: 4px; }
  .l78-post__av.ik-av { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .l78-h7 *, .l78-p8 *, .l78-h8 * { transition-duration: 0s !important; transition-delay: 0s !important; animation-duration: 0s !important; animation-delay: 0s !important; }
}
