/* css/mk-studio.css */
/* ==========================================================================
   R70 · /features/studio (Content OS & Video Studio). Prefix: mkso-. Mobile first; light and dark via tokens
   (the page sets [data-theme] with mk-theme.js). Motion runs only while on screen ([data-art].is-live, toggled by
   mk-art-b.js) and never with prefers-reduced-motion: the final state is shown instead.
   ========================================================================== */
@layer components {
  .mkso-page { background: var(--canvas); color: var(--text); }
  .mkso { overflow-x: clip; }
  /* off screen (and before mk-art-b.js marks it live) a stage shows its designed still frame: no animation at all */
  .mkso [data-art]:not(.is-live) *, .mkso [data-art]:not(.is-live) { animation: none !important; }
  .mkso .kicker { color: var(--accent-text); }
  .mkso .mk-h2 { color: var(--ink); }
  .mkso-head { max-width: 760px; margin-bottom: clamp(24px, 4vw, 40px); }
  .mkso-truth { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 12px 14px; border-radius: 16px; background: var(--assist-soft); color: var(--text); font-size: 14.5px; line-height: 1.5; max-width: 520px; }
  .mkso-truth svg { flex: none; width: 18px; height: 18px; color: var(--assist-text); margin-top: 2px; }

  /* ---- Hero -------------------------------------------------------------------------------------------------- */
  .mkso-hero { padding: 10px clamp(10px, 2vw, 20px) 0; }
  .mkso-hero-frame { position: relative; isolation: isolate; overflow: hidden; border-radius: clamp(24px, 4vw, 40px); background: #06140F; color: #F4FBF7; padding: clamp(100px, 11vw, 140px) clamp(18px, 5vw, 64px) clamp(32px, 6vw, 72px); }
  .mkso-aurora { position: absolute; inset: 0; z-index: -1; }
  .mkso-aurora i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(70px); opacity: .55; animation: mkso-drift 16s ease-in-out infinite alternate; }
  .mkso-aurora i:nth-child(1) { background: radial-gradient(circle, #0BC284 0, transparent 60%); top: -30vmax; inset-inline-start: -18vmax; }
  .mkso-aurora i:nth-child(2) { background: radial-gradient(circle, #7C5CFF 0, transparent 62%); bottom: -34vmax; inset-inline-end: -20vmax; animation-delay: -5s; }
  .mkso-aurora i:nth-child(3) { background: radial-gradient(circle, #E5487F 0, transparent 60%); top: 20%; inset-inline-start: 40%; width: 34vmax; height: 34vmax; opacity: .3; animation-delay: -9s; }
  .mkso-hero-in { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; max-width: 1240px; margin: 0 auto; }
  .mkso-pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .14); font-size: 13.5px; color: rgb(255 255 255 / .82); }
  .mkso-pill b { color: #fff; }
  .mkso-pill-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #C2F45B; color: #06140F; }
  .mkso-pill-ico svg { width: 15px; height: 15px; }
  .mkso-title { font-family: var(--font-display); font-size: clamp(2.6rem, 1.4rem + 5vw, 5.2rem); line-height: .98; letter-spacing: -0.05em; font-weight: 700; margin: 18px 0 16px; color: #fff; }
  .mkso-title em { display: block; font-family: var(--font-accent, var(--font-display)); font-style: italic; font-weight: 400; letter-spacing: -0.02em; background: linear-gradient(95deg, #C2F45B, #5FE6AE 40%, #C4B5FF); -webkit-background-clip: text; background-clip: text; color: transparent; padding-inline-end: .08em; }
  .mkso-lead { font-size: clamp(1.02rem, .95rem + .4vw, 1.2rem); line-height: 1.6; color: rgb(255 255 255 / .76); max-width: 560px; }
  .mkso-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
  .mkso-cta, .mkso-ghost { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 8px 6px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform var(--t-base, .2s) var(--ease-out), background var(--t-base, .2s); }
  .mkso-cta { background: #C2F45B; color: #06140F; }
  .mkso-cta:hover { transform: translateY(-2px); }
  .mkso-cta-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #06140F; color: #C2F45B; }
  .mkso-cta-ico svg { width: 16px; height: 16px; }
  .mkso-ghost { padding: 6px 20px; color: #fff; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .18); }
  .mkso-ghost:hover { background: rgb(255 255 255 / .14); }
  .mkso-ghost svg { width: 16px; height: 16px; }
  .mkso-proof { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: rgb(255 255 255 / .7); }
  .mkso-proof li { display: inline-flex; align-items: center; gap: 7px; }
  .mkso-proof svg { width: 16px; height: 16px; color: #5FE6AE; }
  .mkso-hero-art { position: relative; padding: 18px 0 36px; }
  .mkso-window { margin: 0; border-radius: 18px; overflow: hidden; background: #0E1A15; border: 1px solid rgb(255 255 255 / .12); box-shadow: 0 50px 90px -40px rgb(0 0 0 / .8); transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); animation: mkso-float 8s var(--ease-out) infinite alternate; }
  [dir="rtl"] .mkso-window { transform: perspective(1400px) rotateY(6deg) rotateX(2deg); }
  .mkso-window-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: rgb(255 255 255 / .05); font-size: 11.5px; color: rgb(255 255 255 / .6); }
  .mkso-window-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgb(255 255 255 / .2); }
  .mkso-window-bar b { margin-inline-start: 8px; font-weight: 600; }
  .mkso-window img { display: block; width: 100%; height: auto; }
  .mkso-float { position: absolute; display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-radius: 14px; background: rgb(255 255 255 / .94); color: #0B0F0D; box-shadow: 0 18px 40px -18px rgb(0 0 0 / .6); font-size: 12.5px; line-height: 1.2; animation: mkso-bob 5s ease-in-out infinite alternate; }
  .mkso-float svg { width: 18px; height: 18px; color: #6441F2; flex: none; }
  .mkso-float span { display: grid; }
  .mkso-float b { color: #0B0F0D; }
  .mkso-float small { color: #5A6660; font-size: 11.5px; }
  .mkso-float.f1 { top: 2px; inset-inline-start: 6%; }
  .mkso-float.f2 { bottom: 4px; inset-inline-start: 2%; animation-delay: -1.6s; }
  .mkso-float.f2 svg { color: #07A06C; }
  .mkso-float.f3 { bottom: 46px; inset-inline-end: -2%; animation-delay: -3s; }
  .mkso-float.f3 svg { color: #E5487F; }
  @media (min-width: 960px) {
    .mkso-hero-in { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
    .mkso-hero-art { padding: 24px 0 44px; }
  }
  @keyframes mkso-drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(6vmax, 4vmax, 0) scale(1.15); } }
  @keyframes mkso-float { from { translate: 0 0; } to { translate: 0 -10px; } }
  @keyframes mkso-bob { from { translate: 0 0; } to { translate: 0 -8px; } }

  /* ---- Product film ------------------------------------------------------------------------------------------ */
  .mkso-film { position: relative; border-radius: clamp(18px, 3vw, 28px); overflow: hidden; background: #06140F; box-shadow: var(--e3); aspect-ratio: 16 / 9; }
  .mkso-video { display: block; width: 100%; height: 100%; object-fit: cover; }
  .mkso-film-btn { position: absolute; inset-inline-end: 14px; bottom: 14px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .3); background: rgb(6 20 15 / .6); color: #fff; backdrop-filter: blur(8px); cursor: pointer; }
  .mkso-film-btn svg { width: 18px; height: 18px; }
  .mkso-film-btn .is-play, .mkso-film-btn.is-paused .is-pause { display: none; }
  .mkso-film-btn.is-paused .is-play { display: block; }
  .mkso-film-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

  /* ---- Split sections ---------------------------------------------------------------------------------------- */
  .mkso-split { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
  @media (min-width: 960px) {
    .mkso-split { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
    .mkso-split.is-flip > .mkso-copy { order: 2; }
  }
  .mkso-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
  .mkso-points li { display: flex; gap: 12px; align-items: center; color: var(--text); font-weight: 600; }
  .mkso-points span { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
  .mkso-points svg { width: 17px; height: 17px; }
  .mkso-stage { position: relative; border-radius: 26px; padding: clamp(14px, 3vw, 22px); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--e2); overflow: hidden; }
  .mkso-stage-label { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--text-muted); }
  .mkso-stage-label svg { width: 16px; height: 16px; color: var(--accent-text); }

  /* ---- Timeline mock ----------------------------------------------------------------------------------------- */
  .mkso-tl-preview { position: relative; aspect-ratio: 16 / 8; border-radius: 16px; background: linear-gradient(135deg, #0B7A55, #0BC284 55%, #6441F2); overflow: hidden; display: grid; place-items: center; }
  .mkso-tl-badge { position: absolute; top: 10%; padding: 4px 10px; border-radius: 6px; background: #5FE6AE; color: #062A1E; font-weight: 800; font-size: clamp(11px, 1.6vw, 14px); }
  .mkso-tl-caps { position: absolute; bottom: 14%; inset-inline: 6%; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: clamp(15px, 2.6vw, 24px); color: #fff; text-shadow: 0 2px 10px rgb(0 0 0 / .35); }
  .mkso-tl-caps b { display: inline-block; animation: mkso-word 6s var(--ease-spring, ease-out) infinite; animation-delay: calc(var(--i) * .32s); }
  .mkso-tl-caps b:nth-child(3), .mkso-tl-caps b:nth-child(7) { color: #C2F45B; }
  .mkso-tl-time { position: absolute; top: 10px; inset-inline-end: 12px; font-family: var(--font-mono); font-size: 11px; color: rgb(255 255 255 / .8); }
  .mkso-tl-time b { color: #fff; }
  .mkso-tl-tracks { position: relative; margin-top: 12px; display: grid; gap: 6px; padding-top: 2px; }
  .mkso-tl-ruler { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-subtle); padding-bottom: 4px; border-bottom: 1px solid var(--line); }
  .mkso-tl-row { display: flex; gap: 4px; height: 22px; align-items: stretch; }
  .mkso-tl-row.is-cap i { width: var(--w); border-radius: 6px; background: var(--violet-500, #7C5CFF); opacity: .25; animation: mkso-capon 6s infinite; animation-delay: calc(var(--i) * .7s); }
  .mkso-tl-row.is-clips { height: 46px; }
  .mkso-tl-row.is-clips i { position: relative; display: flex; align-items: flex-start; padding: 5px 7px; border-radius: 9px; border: 2px solid transparent; overflow: hidden; }
  .mkso-tl-row.is-clips b { font-size: 10.5px; font-weight: 700; color: #fff; padding: 1px 6px; border-radius: 5px; background: rgb(0 0 0 / .35); white-space: nowrap; }
  .mkso-tl-row.is-clips .c1 { flex: 0 0 26%; background: linear-gradient(90deg, #067C55, #0BC284); }
  .mkso-tl-row.is-clips .c2 { flex: 0 0 40%; background: linear-gradient(90deg, #0BC284, #25D695 60%, #067C55); border-color: #C2F45B; animation: mkso-trim 6s var(--ease-out) infinite; }
  .mkso-tl-row.is-clips .c3 { flex: 1 1 auto; background: linear-gradient(90deg, #E5487F, #A08BFF); }
  .mkso-tl-row.is-clips .c2::before, .mkso-tl-row.is-clips .c2::after { content: ""; position: absolute; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: #fff; }
  .mkso-tl-row.is-clips .c2::before { inset-inline-start: 3px; }
  .mkso-tl-row.is-clips .c2::after { inset-inline-end: 3px; }
  .mkso-tl-row.is-audio { position: relative; height: 30px; border-radius: 8px; background: var(--info-soft, #E4EDFF); padding: 3px 6px; }
  .mkso-tl-wave { display: flex; align-items: center; gap: 2px; width: 100%; }
  .mkso-tl-wave i { flex: 1; height: var(--h); border-radius: 2px; background: var(--info, #3B6FE0); opacity: .75; transform-origin: center; animation: mkso-duck 6s ease-in-out infinite; }
  .mkso-tl-duck { position: absolute; inset-inline-start: 8px; top: 50%; translate: 0 -50%; display: inline-flex; gap: 5px; align-items: center; padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 10.5px; font-weight: 700; box-shadow: var(--e1); animation: mkso-ducklabel 6s ease-in-out infinite; }
  .mkso-tl-duck svg { width: 12px; height: 12px; color: var(--info, #3B6FE0); }
  .mkso-tl-head { position: absolute; top: 0; bottom: -4px; inset-inline-start: 0; width: 2px; background: var(--ink); border-radius: 2px; animation: mkso-head 6s linear infinite; }
  .mkso-tl-head::before { content: ""; position: absolute; top: -2px; left: -5px; width: 12px; height: 12px; border-radius: 3px 3px 6px 6px; background: var(--ink); }
  @keyframes mkso-head { from { inset-inline-start: 0; } to { inset-inline-start: calc(100% - 2px); } }
  @keyframes mkso-word { 0% { opacity: 0; transform: translateY(8px) scale(.7); } 6%, 72% { opacity: 1; transform: none; } 80%, 100% { opacity: 0; transform: translateY(-4px); } }
  @keyframes mkso-capon { 0%, 8% { opacity: .25; } 14%, 70% { opacity: .9; } 85%, 100% { opacity: .25; } }
  @keyframes mkso-trim { 0%, 25% { flex-basis: 40%; } 45%, 85% { flex-basis: 28%; } 100% { flex-basis: 40%; } }
  @keyframes mkso-duck { 0%, 20% { transform: scaleY(1); } 30%, 70% { transform: scaleY(.35); } 80%, 100% { transform: scaleY(1); } }
  @keyframes mkso-ducklabel { 0%, 24% { opacity: 0; } 32%, 68% { opacity: 1; } 76%, 100% { opacity: 0; } }

  /* ---- Transcript edit --------------------------------------------------------------------------------------- */
  .mkso-tx-text { margin: 0; font-size: clamp(16px, 2.2vw, 20px); line-height: 1.75; color: var(--ink); font-weight: 550; }
  .mkso-tx-w { transition: none; }
  .mkso-tx-w.is-cut { position: relative; color: var(--danger); border-radius: 5px; animation: mkso-cut 7s var(--ease-out) infinite; animation-delay: calc(var(--i) * .45s); background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 0 55%; background-size: 0 2px; }
  @keyframes mkso-cut {
    0%, 8% { color: var(--text-muted); background-size: 0 2px; background-color: transparent; opacity: 1; }
    16% { color: var(--danger); background-size: 100% 2px; background-color: var(--danger-soft); opacity: 1; }
    40%, 82% { color: var(--danger); background-size: 100% 2px; background-color: var(--danger-soft); opacity: .45; }
    92%, 100% { color: var(--text-muted); background-size: 0 2px; background-color: transparent; opacity: 1; }
  }
  .mkso-tx-clip { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
  .mkso-tx-bar { flex: 1; height: 40px; border-radius: 10px; background: var(--surface-sunken); overflow: hidden; }
  .mkso-tx-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: repeating-linear-gradient(90deg, #0BC284 0 22%, #07A06C 22% 23%), #0BC284; animation: mkso-shrink 7s var(--ease-out) infinite; }
  .mkso-tx-len { position: relative; min-width: 46px; font-family: var(--font-mono); font-weight: 700; color: var(--ink); }
  .mkso-tx-len b { display: block; }
  .mkso-tx-len .is-b { position: absolute; inset: 0; color: var(--accent-text); opacity: 0; animation: mkso-swap 7s infinite; }
  .mkso-tx-len .is-a { animation: mkso-swap 7s infinite reverse; }
  .mkso-tx-note { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 13px; color: var(--text-muted); }
  .mkso-tx-note svg { width: 15px; height: 15px; }
  @keyframes mkso-shrink { 0%, 30% { width: 100%; } 46%, 84% { width: 82%; } 94%, 100% { width: 100%; } }
  @keyframes mkso-swap { 0%, 36% { opacity: 0; } 44%, 84% { opacity: 1; } 92%, 100% { opacity: 0; } }

  /* ---- Studio AI --------------------------------------------------------------------------------------------- */
  .mkso-ai { background: linear-gradient(160deg, var(--surface), var(--assist-soft)); }
  .mkso-ai-head { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); }
  .mkso-ai-head svg { width: 18px; height: 18px; color: var(--assist); }
  .mkso-ai-prompt { margin-top: 14px; min-height: 52px; padding: 14px 16px; border-radius: 16px; background: var(--surface-sunken); color: var(--ink); font-weight: 600; line-height: 1.4; }
  .mkso-ai-caret { display: inline-block; width: 2px; height: 1.1em; margin-inline-start: 2px; vertical-align: -2px; background: var(--assist); animation: mkso-blink 1s steps(1) infinite; }
  .mkso-ai.is-run .mkso-ai-caret, .mkso-ai.is-done .mkso-ai-caret { opacity: 0; animation: none; }
  .mkso-ai-steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
  .mkso-ai-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--text); opacity: .35; }
  .mkso-ai-ico { position: relative; display: grid; place-items: center; width: 22px; height: 22px; flex: none; }
  .mkso-ai-ico svg { width: 18px; height: 18px; color: var(--success); opacity: 0; }
  .mkso-ai-ico .is-spin { position: absolute; inset: 2px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--assist); }
  .mkso-ai.is-run .mkso-ai-steps li { animation: mkso-step-in .3s var(--ease-out) both; animation-delay: calc(var(--i) * 1.05s); }
  .mkso-ai.is-run .mkso-ai-ico .is-spin { animation: mkso-spin .8s linear infinite, mkso-out .2s forwards; animation-delay: 0s, calc(var(--i) * 1.05s + .9s); }
  .mkso-ai.is-run .mkso-ai-ico svg { animation: mkso-in .25s var(--ease-out) forwards; animation-delay: calc(var(--i) * 1.05s + .9s); }
  .mkso-ai.is-done .mkso-ai-steps li { opacity: 1; animation: none; }
  .mkso-ai.is-done .mkso-ai-ico .is-spin { opacity: 0; animation: none; }
  .mkso-ai.is-done .mkso-ai-ico svg { opacity: 1; animation: none; }
  .mkso-ai-done { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px dashed var(--assist); font-size: 13.5px; color: var(--text-muted); opacity: 0; translate: 0 6px; transition: opacity .3s, translate .3s var(--ease-out); }
  .mkso-ai-done b { font-family: var(--font-mono); color: var(--ink); }
  .mkso-ai-done em { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: auto; font-style: normal; font-weight: 700; color: var(--text); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); }
  .mkso-ai-done em svg { width: 14px; height: 14px; }
  .mkso-ai.is-done .mkso-ai-done { opacity: 1; translate: 0 0; }
  @keyframes mkso-blink { 50% { opacity: 0; } }
  @keyframes mkso-spin { to { transform: rotate(360deg); } }
  @keyframes mkso-step-in { from { opacity: .35; } to { opacity: 1; } }
  @keyframes mkso-in { to { opacity: 1; } }
  @keyframes mkso-out { to { opacity: 0; } }

  /* ---- Board + planner --------------------------------------------------------------------------------------- */
  .mkso-duo { display: grid; gap: 16px; }
  @media (min-width: 960px) { .mkso-duo { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
  .mkso-kb-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .mkso-kb-col { display: grid; align-content: start; gap: 6px; min-height: 190px; padding: 8px 6px; border-radius: 14px; background: var(--surface-sunken); }
  .mkso-kb-col > b { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mkso-kb-col > b i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--tc); }
  .mkso-kb-col.tone-violet { --tc: #7C5CFF; } .mkso-kb-col.tone-blue { --tc: #3B6FE0; } .mkso-kb-col.tone-amber { --tc: #E8A317; } .mkso-kb-col.tone-green { --tc: #0BC284; }
  .mkso-kb-ghost { height: 52px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
  .mkso-kb-ghost.is-short { height: 34px; }
  .mkso-kb-card { position: absolute; top: calc(clamp(14px, 3vw, 22px) + 30px + 30px); inset-inline-start: calc(clamp(14px, 3vw, 22px) + 6px); width: calc((100% - 2 * clamp(14px, 3vw, 22px) - 18px) / 4 - 12px); min-height: 92px; display: grid; gap: 4px; align-content: start; padding: 8px; border-radius: 11px; background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 16px 30px -16px rgb(0 0 0 / .45); font-size: 11px; animation: mkso-move 9s var(--ease-out) infinite; }
  .mkso-kb-card small { color: var(--accent-text); font-weight: 700; font-size: 10px; }
  .mkso-kb-card b { color: var(--ink); line-height: 1.25; font-size: 11.5px; overflow-wrap: anywhere; hyphens: auto; }
  .mkso-kb-card { overflow: hidden; }
  @media (max-width: 520px) { .mkso-kb-card { padding: 6px; font-size: 10px; } .mkso-kb-card b { font-size: 10.5px; } .mkso-kb-card small { font-size: 9px; } .mkso-kb-col > b { font-size: 10px; } .mkso-tl-time { display: none; } }
  .mkso-kb-card > span { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
  .mkso-kb-card i { display: inline-flex; align-items: center; gap: 3px; font-style: normal; color: var(--text-muted); font-size: 10px; }
  .mkso-kb-card i svg { width: 11px; height: 11px; }
  .mkso-kb-stamp { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-weight: 800; font-size: 9.5px; color: var(--success); opacity: 0; animation: mkso-stampin 9s infinite; }
  .mkso-kb-stamp svg { width: 10px; height: 10px; }
  /* one column = (track - 3 gaps) / 4 + gap; moves To do → In progress → Under review → Ready and back */
  @keyframes mkso-move {
    0%, 14% { transform: translateX(0) rotate(0); }
    20% { transform: translateX(0) rotate(-3deg) scale(1.04); }
    28%, 38% { transform: translateX(calc(100% + 18px)) rotate(0); }
    46%, 58% { transform: translateX(calc(200% + 36px)) rotate(0); }
    66%, 92% { transform: translateX(calc(300% + 54px)) rotate(0); }
    100% { transform: translateX(0); }
  }
  [dir="rtl"] .mkso-kb-card { animation-name: mkso-move-rtl; }
  @keyframes mkso-move-rtl {
    0%, 14% { transform: translateX(0); } 28%, 38% { transform: translateX(calc(-100% - 18px)); } 46%, 58% { transform: translateX(calc(-200% - 36px)); } 66%, 92% { transform: translateX(calc(-300% - 54px)); } 100% { transform: translateX(0); }
  }
  @keyframes mkso-stampin { 0%, 60% { opacity: 0; } 68%, 92% { opacity: 1; } 100% { opacity: 0; } }

  .mkso-wk-grid { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .mkso-wk-day { display: grid; gap: 4px; }
  .mkso-wk-day > b { font-size: 11px; color: var(--text-muted); text-align: center; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
  .mkso-wk-slot { height: 46px; border-radius: 8px; background: var(--surface-sunken); }
  .mkso-wk-chip { position: absolute; top: calc(19px + var(--s) * 50px); inset-inline-start: calc(var(--d) * (100% + 4px) / 7); width: calc((100% - 24px) / 7); height: 46px; display: flex; flex-direction: column; gap: 3px; padding: 5px; border-radius: 8px; font-size: 9.5px; font-weight: 700; line-height: 1.15; color: var(--ink); overflow: hidden; background: var(--nc-soft); border-inline-start: 3px solid var(--nc); animation: mkso-fill 10s var(--ease-spring, ease-out) infinite; animation-delay: calc(var(--i) * .4s); }
  .mkso-wk-chip i { width: 9px; height: 9px; border-radius: 3px; background: var(--nc); flex: none; }
  .mkso-n-ig { --nc: #E5487F; --nc-soft: #FFE6F0; } .mkso-n-in { --nc: #0A66C2; --nc-soft: #E2EEFB; } .mkso-n-yt { --nc: #E53935; --nc-soft: #FDE7E7; } .mkso-n-fb { --nc: #1877F2; --nc-soft: #E4EDFF; } .mkso-n-x { --nc: #3A3F3C; --nc-soft: #ECEEEC; }
  :root[data-theme="dark"] .mkso-wk-chip { --nc-soft: color-mix(in srgb, var(--nc) 22%, var(--surface)); }
  @keyframes mkso-fill { 0% { opacity: 0; transform: scale(.6); } 5%, 86% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: scale(.9); } }

  /* ---- Repurpose fan-out ------------------------------------------------------------------------------------- */
  .mkso-rp { display: grid; gap: 22px; align-items: center; }
  .mkso-rp-src { display: grid; justify-items: start; gap: 6px; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, #062A1E, #067C55); color: #fff; }
  .mkso-rp-play { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgb(255 255 255 / .16); }
  .mkso-rp-play svg { width: 20px; height: 20px; }
  .mkso-rp-src b { color: #fff; }
  .mkso-rp-src small { color: rgb(255 255 255 / .7); }
  .mkso-rp-outs { display: grid; gap: 12px; }
  .mkso-rp-out { position: relative; display: grid; gap: 6px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--e1); animation: mkso-fan 8s var(--ease-out) infinite; animation-delay: calc(.4s + var(--i) * .5s); }
  .mkso-rp-out > span:first-child { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
  .mkso-rp-out > span:first-child svg { width: 16px; height: 16px; color: var(--accent-text); }
  .mkso-rp-out > i { display: block; height: 7px; border-radius: 6px; background: var(--surface-sunken); }
  .mkso-rp-out em { font-style: normal; font-size: 12px; color: var(--assist-text); font-weight: 700; }
  .mkso-rp-slides { display: flex; gap: 6px; }
  .mkso-rp-slides i { flex: 1; aspect-ratio: 4 / 5; border-radius: 8px; background: linear-gradient(160deg, var(--accent-soft-2), var(--assist-soft)); border: 1px solid var(--line); }
  .mkso-w90 { width: 90%; } .mkso-w80 { width: 80%; } .mkso-w70 { width: 70%; } .mkso-w60 { width: 60%; } .mkso-w50 { width: 50%; }
  /* connectors: vertical on phones, horizontal beside the source on wide screens */
  .mkso-rp-out::before { content: ""; position: absolute; inset-inline-start: 50%; bottom: 100%; width: 2px; height: 12px; background: var(--accent); transform-origin: bottom; }
  .mkso-rp-out:first-child::before { height: 22px; }
  @media (min-width: 600px) {
    .mkso-rp { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; }
    .mkso-rp-out::before, .mkso-rp-out:first-child::before { inset-inline-start: auto; inset-inline-end: 100%; bottom: auto; top: 50%; width: 40px; height: 2px; transform-origin: right; }
    [dir="rtl"] .mkso-rp-out::before { transform-origin: left; }
  }
  @keyframes mkso-fan { 0% { opacity: 0; transform: translateX(-14px) scale(.96); } 8%, 84% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }

  /* ---- Spot-art tiles ---------------------------------------------------------------------------------------- */
  .mkso-tiles { display: grid; gap: 14px; }
  @media (min-width: 640px) { .mkso-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 1024px) { .mkso-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .mkso-tile { padding: 14px 14px 20px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
  .mkso-tile h3 { display: flex; align-items: center; gap: 10px; margin: 16px 6px 6px; font-size: 1.12rem; color: var(--ink); letter-spacing: -0.015em; }
  .mkso-tile p { margin: 0 6px; color: var(--text-muted); line-height: 1.55; font-size: 15px; }
  .mkso-tile-ico { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
  .mkso-tile-ico svg { width: 16px; height: 16px; }
  .mkso-spot { position: relative; height: 150px; border-radius: 18px; background: var(--surface-sunken); overflow: hidden; display: grid; place-content: center; gap: 10px; padding: 16px; }
  .mkso-spot.is-voice { place-content: stretch; align-content: center; }
  .mkso-sl { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; font-size: 12px; color: var(--text); }
  .mkso-sl i { height: 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
  .mkso-sl em { display: block; height: 100%; width: var(--v); background: var(--grad-brand, var(--accent)); border-radius: inherit; animation: mkso-slide 5s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -1.3s); }
  @keyframes mkso-slide { from { width: calc(var(--v) - 18%); } to { width: var(--v); } }
  .mkso-doc { display: grid; gap: 8px; width: 150px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--e1); }
  .mkso-doc i { height: 7px; border-radius: 6px; background: var(--surface-sunken); }
  .mkso-stamp { position: absolute; inset-inline-end: 22%; bottom: 22px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 8px; border: 2px solid var(--success); color: var(--success); font-weight: 800; font-size: 12px; background: var(--surface); rotate: -8deg; animation: mkso-stamp 4s var(--ease-spring, ease-out) infinite; }
  .mkso-stamp svg { width: 14px; height: 14px; }
  @keyframes mkso-stamp { 0%, 20% { opacity: 0; transform: scale(1.8); } 30%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
  .mkso-net { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-muted); }
  .mkso-net i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-sunken); }
  .mkso-net svg { width: 14px; height: 14px; }
  .mkso-net.is-on { color: var(--ink); border-color: var(--accent); animation: mkso-pulse 2.6s ease-in-out infinite; }
  .mkso-net.is-on i { background: var(--accent); color: #fff; }
  @keyframes mkso-pulse { 50% { box-shadow: 0 0 0 6px var(--accent-soft); } }
  .mkso-bars { display: flex; align-items: flex-end; gap: 8px; height: 100px; }
  .mkso-bars i { width: 22px; height: var(--h); border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--accent), var(--accent-soft-2)); transform-origin: bottom; animation: mkso-grow 4s var(--ease-out) infinite; animation-delay: calc(var(--i) * .12s); }
  @keyframes mkso-grow { 0% { transform: scaleY(.15); } 25%, 85% { transform: none; } 100% { transform: scaleY(.15); } }
  .mkso-spot.is-ideas { display: flex; align-items: center; justify-content: center; gap: 0; }
  .mkso-note { display: grid; gap: 6px; width: 84px; height: 84px; padding: 12px; margin-inline: -6px; border-radius: 10px; rotate: var(--r); box-shadow: var(--e1); align-content: start; animation: mkso-note 5s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -1.4s); }
  .mkso-note i { height: 6px; border-radius: 4px; background: rgb(0 0 0 / .14); }
  .mkso-note.tone-violet { background: #E6DFFF; } .mkso-note.tone-lime { background: #E6FBB7; } .mkso-note.tone-amber { background: #FFE6B8; }
  @keyframes mkso-note { from { translate: 0 0; } to { translate: 0 -8px; } }
  .mkso-wave2 { display: flex; align-items: center; gap: 4px; height: 90px; }
  .mkso-wave2 i { width: 5px; height: var(--h); border-radius: 4px; background: var(--info, #3B6FE0); opacity: .8; animation: mkso-eq 1.6s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.13s); }
  @keyframes mkso-eq { from { transform: scaleY(.35); } to { transform: scaleY(1); } }

  /* ---- Real screens ------------------------------------------------------------------------------------------ */
  .mkso-rail { list-style: none; margin: 0; padding: 4px 2px 18px; display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 640px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; }
  .mkso-rail:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 16px; }
  .mkso-rail > li { scroll-snap-align: start; }
  .mkso-rail > li:has(.is-phone) { width: min(62vw, 250px); }
  .mkso-fig { margin: 0; }
  .mkso-fig img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--e2); background: var(--surface); }
  .mkso-fig.is-phone img { border-radius: 26px; }
  .mkso-fig figcaption { margin-top: 10px; font-size: 14px; color: var(--text-muted); font-weight: 600; }
  /* light/dark screenshots follow the page theme (only the shown one loads) */
  .mkso-shot.is-dark { display: none; }
  :root[data-theme="dark"] .mkso-shot.is-dark { display: block; }
  :root[data-theme="dark"] .mkso-shot.is-light { display: none; }

  .mkso .mkso-final .mk-h2 { color: #fff; font-size: clamp(1.9rem, 1.2rem + 3vw, 3.6rem); }
  .mkso .mkso-final p { color: rgb(255 255 255 / .78); }
  .mkso-final { background: radial-gradient(120% 140% at 0% 0%, #0B7A55 0, transparent 50%), radial-gradient(120% 140% at 100% 100%, #6441F2 0, transparent 50%), #06140F; color: #fff; }

  /* staggered pieces hold their first keyframe during their delay (no flash of the still frame) */
  .mkso-tl-caps b, .mkso-tl-row.is-cap i, .mkso-wk-chip, .mkso-rp-out, .mkso-tx-w.is-cut, .mkso-bars i { animation-fill-mode: backwards; }

  /* ---- Reduced motion: final states, nothing moves ----------------------------------------------------------- */
  @media (prefers-reduced-motion: reduce) {
    .mkso *, .mkso *::before, .mkso *::after { animation: none !important; transition: none !important; }
    .mkso-tl-caps b, .mkso-wk-chip, .mkso-rp-out, .mkso-kb-stamp, .mkso-tl-duck, .mkso-stamp { opacity: 1; }
    .mkso-tl-row.is-clips .c2 { flex-basis: 28%; }
    .mkso-tl-head { inset-inline-start: 46%; }
    .mkso-tl-wave i { transform: scaleY(.6); }
    .mkso-tx-w.is-cut { color: var(--danger); background-size: 100% 2px; background-color: var(--danger-soft); opacity: .55; }
    .mkso-tx-bar i { width: 82%; }
    .mkso-tx-len .is-a { opacity: 0; } .mkso-tx-len .is-b { opacity: 1; }
    .mkso-kb-card { transform: translateX(calc(300% + 54px)); }
    [dir="rtl"] .mkso-kb-card { transform: translateX(calc(-300% - 54px)); }
    .mkso-window { transform: none; }
  }
}

/* css/mk-studio-movie.css */
/* ==========================================================================
   R72 · /features/studio "See it move": the scripted spot-art story (resources/views/marketing/partials/studio-movie
   .blade.php, resources/js/mk-studio-movie.js). Prefix mksm-. Mobile first: a 4:5 stage, 16:10 from 600px of stage
   width (container query). Every layer sits in stage units (1cqw = 1% of the stage width) and only transform/opacity
   move. Scene state is cumulative classes on the stage: .is-2 … .is-5. The stage keeps its own palette (a framed
   illustration), with dark values in mk-dark.css (R72); the stepper follows the page tokens.
   ========================================================================== */
@layer components {
  .mksm { --sm-ink: #0B0F0D; --sm-muted: #5F6761; --sm-line: rgb(11 15 13 / .08); --sm-brand: #0BC284; --sm-brand-ink: #067C55; --sm-lime: #C2F45B; --sm-violet: #7C5CFF; --sm-pink: #E5487F; --sm-amber: #F5A524;
    --sm-ease: cubic-bezier(.2, .8, .2, 1); --sm-spring: cubic-bezier(.34, 1.4, .5, 1); --sm-fly: cubic-bezier(.7, 0, .2, 1);
    position: relative; container: mksm / inline-size; }
  .mksm-stage { position: relative; aspect-ratio: 4 / 5; border-radius: clamp(18px, 3vw, 28px); overflow: hidden; isolation: isolate; font-size: 2.7cqw; color: var(--sm-ink);
    background: color-mix(in oklab, #F6F7F2 var(--mk-tint), var(--mk-paper)); box-shadow: 0 1px 2px rgb(16 24 20 / .06), 0 40px 80px -40px rgb(16 24 20 / .4); }
  @container mksm (min-width: 600px) { .mksm-stage { aspect-ratio: 16 / 10; font-size: 1.15cqw; } }

  .mksm-mesh { position: absolute; inset: 0; z-index: -2; background:
      radial-gradient(60% 50% at 12% 10%, color-mix(in oklab, #D9F7E8 var(--mk-tint), var(--mk-paper)) 0%, transparent 70%), radial-gradient(50% 45% at 92% 18%, color-mix(in oklab, #ECE6FF var(--mk-tint), var(--mk-paper)) 0%, transparent 70%),
      radial-gradient(55% 55% at 80% 95%, color-mix(in oklab, #FFE9DB var(--mk-tint), var(--mk-paper)) 0%, transparent 70%), radial-gradient(45% 45% at 10% 92%, color-mix(in oklab, #E4EDFF var(--mk-tint), var(--mk-paper)) 0%, transparent 70%), color-mix(in oklab, #F7F8F3 var(--mk-tint), var(--mk-paper)); }
  .mksm-grain { position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: radial-gradient(rgb(11 15 13 / .06) .6px, transparent .8px); background-size: 4px 4px; }
  .mksm-orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(30px); opacity: .55; animation: mksm-drift 9s ease-in-out infinite alternate; }
  .mksm-orb.o1 { width: 30cqw; height: 30cqw; left: -6cqw; top: 20cqw; background: color-mix(in oklab, #BFF3DA var(--mk-tint), var(--mk-paper)); }
  .mksm-orb.o2 { width: 26cqw; height: 26cqw; right: -4cqw; top: -6cqw; background: #DCD2FF; animation-delay: -4s; }
  @keyframes mksm-drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(5cqw, 3cqw, 0) scale(1.12); } }

  /* Layers in stage units: the phone layout by default, the wide one from 600px. */
  .mksm-l { position: absolute; left: calc(var(--mx) * 1cqw); top: calc(var(--my) * 1cqw); width: calc(var(--mw) * 1cqw); height: calc(var(--mh) * 1cqw); }
  @container mksm (min-width: 600px) { .mksm-l { left: calc(var(--dx) * 1cqw); top: calc(var(--dy) * 1cqw); width: calc(var(--dw) * 1cqw); height: calc(var(--dh) * 1cqw); } }
  .mksm-l, .mksm-l * { transition-timing-function: var(--sm-ease); }

  /* Glass cards */
  .mksm-ed, .mksm-ai, .mksm-plan, .mksm-ch { border-radius: 1.2em; background: rgb(var(--mk-paper-rgb) / 0.82); border: 1px solid rgb(255 255 255 / .9); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 1px 2px rgb(16 24 20 / .05), 0 1.6em 3em -1.4em rgb(16 24 20 / .35); }

  /* ---- 1 · editor ---- */
  .mksm-ed { z-index: 2; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; transition: opacity .6s, transform .7s; transform-origin: 30% 40%; }
  .mksm-bar { display: flex; align-items: center; gap: .45em; padding: .55em .8em; border-bottom: 1px solid var(--sm-line); font-size: .9em; }
  .mksm-bar > i { width: .55em; height: .55em; border-radius: 50%; background: #DADDD6; }
  .mksm-bar b { display: inline-flex; align-items: center; gap: .35em; margin-inline-start: .4em; font-weight: 700; }
  .mksm-bar b svg { width: 1.1em; height: 1.1em; color: var(--sm-brand); }
  .mksm-saved { margin-inline-start: auto; color: var(--sm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mksm-view { position: relative; display: grid; place-items: center; padding: .7em .8em .3em; min-height: 0; }
  .mksm-frame { position: relative; width: 100%; height: 100%; min-height: 0; border-radius: .8em; overflow: hidden; background: linear-gradient(140deg, #0E5A40, #0B7A55 45%, #3A2F7A); }
  .mksm-shape { position: absolute; border-radius: 50%; opacity: .55; }
  .mksm-shape.s1 { width: 45%; aspect-ratio: 1; right: -8%; top: -25%; background: radial-gradient(circle at 30% 30%, #C2F45B, transparent 65%); }
  .mksm-shape.s2 { width: 30%; aspect-ratio: 1; left: 8%; bottom: -12%; background: radial-gradient(circle at 50% 50%, #7C5CFF, transparent 70%); }
  .mksm-shape.s3 { width: 14%; aspect-ratio: 1; left: 44%; top: 26%; border-radius: 30%; transform: rotate(45deg); background: rgb(255 255 255 / .18); }
  .mksm-title { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); padding: .25em .7em; border-radius: .5em; background: var(--sm-lime); color: var(--sm-ink); font-weight: 750; font-size: .9em; white-space: nowrap; }
  .mksm-cap { position: absolute; left: 6%; right: 6%; bottom: 10%; text-align: center; font-weight: 800; font-size: 1.15em; line-height: 1.2; color: #fff; text-shadow: 0 .1em .4em rgb(0 0 0 / .35); }
  .mksm-w { display: inline-block; opacity: 0; transform: translateY(.5em) scale(.9); transition: opacity .3s, transform .4s var(--sm-spring); }
  .mksm-w:nth-child(7) { color: var(--sm-lime); }
  .mksm-time { position: absolute; inset-inline-end: 1.3em; top: 1.1em; padding: .2em .55em; border-radius: 999px; background: rgb(11 15 13 / .55); color: #fff; font-size: .78em; font-weight: 700; backdrop-filter: blur(6px); }
  .mksm-time b { display: inline-block; opacity: 0; transform: translateX(-.4em); transition: opacity .3s, transform .4s; color: var(--sm-lime); }

  .mksm-tl { position: relative; container: mksmtl / inline-size; margin: .3em .8em .8em; padding: .4em 0 .2em; }
  .mksm-ruler { display: flex; justify-content: space-between; height: .6em; margin-bottom: .3em; }
  .mksm-ruler i { width: 1px; background: rgb(11 15 13 / .18); }
  .mksm-cols { position: relative; height: 6.6em; }
  .mksm-col { position: absolute; top: 0; bottom: 0; left: calc(var(--l) * 1cqw); width: calc(var(--w) * 1cqw); display: grid; grid-template-rows: 1.8em 2.4em 2.2em; gap: .1em; transition: transform .6s, opacity .5s; transform-origin: left center; }
  [dir="rtl"] .mksm-col { transform-origin: right center; }
  .mksm-row { display: flex; align-items: center; gap: .25em; min-width: 0; overflow: hidden; }
  .mksm-word { flex: none; padding: .15em .45em; border-radius: .4em; background: color-mix(in oklab, #EFEAFE var(--mk-tint), var(--mk-paper)); color: color-mix(in oklab, #4B33C8 var(--mk-lift), #fff); font-size: .78em; font-weight: 650; white-space: nowrap; transition: opacity .35s, transform .35s; }
  .mksm-word.is-filler { background: color-mix(in oklab, #FFE3E3 var(--mk-tint), var(--mk-paper)); color: color-mix(in oklab, #C2364A var(--mk-lift), #fff); text-decoration: line-through; text-decoration-color: rgb(194 54 74 / 0); }
  .mksm-seg { width: calc(100% - 2px); height: 100%; border-radius: .45em; background: linear-gradient(90deg, #0B7A55, #13A16F); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .25); }
  .g1 .mksm-seg { background: linear-gradient(90deg, #13A16F, #0E8C60); }
  .mksm-hatch { width: 100%; height: 100%; border-radius: .45em; background: repeating-linear-gradient(135deg, #FFD9D9 0 .35em, color-mix(in oklab, #FFF1F1 var(--mk-tint), var(--mk-paper)) .35em .7em); box-shadow: inset 0 0 0 1px #F5B5B5; }
  .mksm-pause { flex: none; padding: .1em .35em; border-radius: .35em; background: color-mix(in oklab, #FFE3E3 var(--mk-tint), var(--mk-paper)); color: color-mix(in oklab, #C2364A var(--mk-lift), #fff); font-size: .7em; font-weight: 750; }
  .mksm-row.is-wave { gap: 1px; align-items: center; }
  .mksm-row.is-wave i { flex: 1 1 0; min-width: 1px; height: 100%; border-radius: 2px; background: #9FB5AA; transform: scaleY(var(--h)); transition: transform .6s var(--sm-spring), background .4s; }
  .mksm-flat { width: 100%; height: 2px; background: #E5B5B5; }
  .mksm-bed { display: flex; align-items: center; gap: .5em; margin-top: .35em; height: 1.6em; padding-inline-end: .2em; border-radius: .45em; background: color-mix(in oklab, #FFF4E6 var(--mk-tint), var(--mk-paper)); box-shadow: inset 0 0 0 1px #FBE1BE; }
  .mksm-bed-l { flex: none; display: inline-flex; align-items: center; gap: .3em; padding-inline-start: .5em; font-size: .72em; font-weight: 700; color: color-mix(in oklab, #A0620A var(--mk-lift), #fff); white-space: nowrap; }
  .mksm-bed-l svg { width: 1.2em; height: 1.2em; }
  .mksm-bed-bars { flex: 1; display: flex; gap: 2px; height: 70%; align-items: center; }
  .mksm-bed-bars i { flex: 1; height: 100%; border-radius: 99px; background: var(--sm-amber); opacity: .75; transform: scaleY(var(--h)); transition: transform .7s var(--sm-ease); }
  .mksm-head { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; border-radius: 2px; background: var(--sm-ink); box-shadow: 0 0 0 3px rgb(11 15 13 / .08); animation: mksm-play 3s linear infinite; }
  .mksm-head::before { content: ""; position: absolute; top: -.3em; left: 50%; width: .7em; height: .7em; margin-left: -.35em; border-radius: .2em .2em 50% 50%; background: var(--sm-ink); }
  @keyframes mksm-play { from { transform: translateX(0); } to { transform: translateX(calc(100cqw - 2px)); } }
  .mksm-sweep { position: absolute; top: -.4em; bottom: -.4em; left: 0; width: 22cqw; opacity: 0; pointer-events: none; border-radius: .6em;
    background: linear-gradient(90deg, transparent, rgb(124 92 255 / .22), rgb(194 244 91 / .35), transparent); mix-blend-mode: multiply; transform: translateX(-30cqw); }

  /* ---- 2 · Studio AI ---- */
  .mksm-ai { z-index: 3; height: auto !important; display: grid; align-content: start; gap: .6em; padding: .9em; transition: opacity .5s, transform .6s var(--sm-spring); }
  .mksm-ai-h { display: inline-flex; align-items: center; gap: .4em; font-weight: 750; color: var(--sm-violet); }
  .mksm-ai-h svg { width: 1.2em; height: 1.2em; }
  .mksm-ask { justify-self: end; max-width: 92%; padding: .5em .75em; border-radius: .9em .9em .2em .9em; background: color-mix(in oklab, #F1F2EE var(--mk-tint), var(--mk-paper)); font-size: .92em; line-height: 1.35; }
  .mksm-todo { display: grid; gap: .35em; padding: .6em; border-radius: .9em; background: linear-gradient(160deg, color-mix(in oklab, #F5F2FF var(--mk-tint), var(--mk-paper)), var(--mk-paper)); box-shadow: inset 0 0 0 1px #E3DCFF; }
  .mksm-do { display: flex; align-items: center; gap: .5em; font-size: .86em; font-weight: 600; opacity: .4; transition: opacity .3s; }
  .mksm-do-i { display: grid; place-items: center; flex: none; width: 1.8em; height: 1.8em; border-radius: .55em; background: var(--mk-paper); box-shadow: 0 0 0 1px #E3DCFF; color: var(--sm-violet); }
  .mksm-do-i svg { width: 1em; height: 1em; }
  .mksm-do-ok { margin-inline-start: auto; display: grid; place-items: center; width: 1.4em; height: 1.4em; border-radius: 50%; background: var(--sm-brand); color: #fff; transform: scale(0); transition: transform .45s var(--sm-spring); }
  .mksm-do-ok svg { width: .85em; height: .85em; stroke-width: 3; }

  /* ---- 3 · post ---- */
  .mksm-post { z-index: 5; --tx: var(--mtx); --ty: var(--mty); --ts: var(--mts); display: grid; grid-template-rows: 1fr auto; border-radius: 1.3em; overflow: hidden; background: var(--mk-paper); transform-origin: 0 0;
    box-shadow: 0 2em 4em -1.6em rgb(16 24 20 / .55), 0 0 0 1px rgb(11 15 13 / .06); opacity: 0; transform: translate(-10cqw, 8cqw) scale(.7) rotate(-4deg); transition: opacity .5s, transform .8s var(--sm-spring); }
  @container mksm (min-width: 600px) { .mksm-post { --tx: var(--dtx); --ty: var(--dty); --ts: var(--dts); } }
  .mksm-cover { position: relative; overflow: hidden; background: linear-gradient(160deg, #0E5A40, #0B7A55 50%, #3A2F7A); }
  .mksm-ratio { position: absolute; top: .7em; inset-inline-start: .7em; padding: .15em .5em; border-radius: 999px; background: rgb(255 255 255 / .2); color: #fff; font-size: .75em; font-weight: 700; backdrop-filter: blur(6px); }
  .mksm-post-cap { position: absolute; left: 8%; right: 8%; top: 55%; text-align: center; color: #fff; font-weight: 800; font-size: 1.15em; line-height: 1.15; text-shadow: 0 .1em .4em rgb(0 0 0 / .35); }
  .mksm-post-f { display: grid; gap: .15em; padding: .7em .8em .8em; }
  .mksm-post-f b { font-size: .92em; line-height: 1.2; }
  .mksm-post-f small { color: var(--sm-muted); font-size: .75em; }

  /* ---- 4 · planner ---- */
  .mksm-plan { z-index: 1; padding: .8em 1em; opacity: 0; transform: translateY(3cqw) scale(.98); transition: opacity .55s, transform .7s var(--sm-ease); }
  .mksm-plan-h { display: inline-flex; align-items: center; gap: .45em; font-weight: 750; }
  .mksm-plan-h svg { width: 1.2em; height: 1.2em; color: var(--sm-brand); }
  .mksm-plan-h small { padding: .1em .5em; border-radius: 999px; background: color-mix(in oklab, #E3F8EE var(--mk-tint), var(--mk-paper)); color: var(--sm-brand-ink); font-size: .75em; font-weight: 700; }
  .mksm-day { z-index: 1; display: grid; place-items: center; font-size: .72em; font-weight: 700; color: var(--sm-muted); letter-spacing: .04em; text-transform: uppercase; opacity: 0; transition: opacity .4s; }
  .mksm-cell { z-index: 1; border-radius: .6em; background: color-mix(in oklab, #F4F5F1 var(--mk-tint), var(--mk-paper)); box-shadow: inset 0 0 0 1px rgb(11 15 13 / .05); opacity: 0; transform: translateY(1.2em) scale(.9);
    transition: opacity .35s, transform .5s var(--sm-spring); transition-delay: calc((var(--r) * 7 + var(--c)) * 18ms); }
  .mksm-chip { position: absolute; left: 12%; right: 12%; top: 18%; height: 26%; border-radius: .3em; }
  .mksm-chip.t-v { background: #DCD2FF; } .mksm-chip.t-g { background: color-mix(in oklab, #BFF3DA var(--mk-tint), var(--mk-paper)); } .mksm-chip.t-p { background: #FFD3E2; } .mksm-chip.t-a { background: #FFE6B8; }
  .mksm-cell.is-slot::after { content: ""; position: absolute; inset: -.25em; border-radius: .8em; border: 2px dashed var(--sm-brand); opacity: 0; transition: opacity .3s; }
  .mksm-cell.is-slot::before { content: ""; position: absolute; inset: -.6em; border-radius: 1em; background: radial-gradient(closest-side, rgb(11 194 132 / .35), transparent); opacity: 0; transform: scale(.6); transition: opacity .5s, transform .7s var(--sm-ease); }
  .mksm-when { position: absolute; left: 50%; bottom: calc(100% + .4em); z-index: 6; transform: translate(-50%, .4em) scale(.85); padding: .25em .6em; border-radius: 999px; background: var(--sm-ink); color: #fff; font-size: .75em; font-weight: 700; white-space: nowrap; opacity: 0;
    transition: opacity .3s, transform .45s var(--sm-spring); }

  /* ---- 5 · channels and burst ---- */
  .mksm-ch { z-index: 4; display: flex; align-items: center; gap: .6em; padding: .5em .7em; opacity: 0; transform: translateY(1.2em) scale(.9); transition: opacity .4s, transform .55s var(--sm-spring); }
  .mksm-ch-g { display: grid; place-items: center; flex: none; width: 2.4em; height: 2.4em; border-radius: .8em; background: color-mix(in oklab, #F1F2EE var(--mk-tint), var(--mk-paper)); color: var(--sm-ink); transition: background .3s, color .3s; }
  .mksm-ch-g svg { width: 1.25em; height: 1.25em; }
  .mksm-ch-t { display: grid; min-width: 0; }
  .mksm-ch-t b { font-size: .88em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mksm-ch-t small { display: inline-flex; align-items: center; gap: .3em; color: var(--sm-brand-ink); font-size: .76em; font-weight: 700; opacity: 0; transform: translateX(-.4em); transition: opacity .3s, transform .4s; }
  .mksm-ch-t small svg { width: 1.1em; height: 1.1em; stroke-width: 3; }
  .mksm-burst { z-index: 6; pointer-events: none; }
  .mksm-burst i { position: absolute; left: -.4em; top: -.4em; width: .8em; height: .8em; opacity: 0; }
  .mksm-burst i.is-c { border-radius: 50%; background: var(--sm-lime); }
  .mksm-burst i.is-s { border-radius: .15em; background: var(--sm-violet); }
  .mksm-burst i.is-t { width: 0; height: 0; border-left: .45em solid transparent; border-right: .45em solid transparent; border-bottom: .8em solid var(--sm-pink); background: none; }
  .mksm-burst i:nth-child(3n) { filter: hue-rotate(40deg); }
  @keyframes mksm-burst { 0% { opacity: 0; transform: translate(0, 0) scale(.3) rotate(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(var(--x) * 1cqw), calc(var(--y) * 1cqw)) scale(1) rotate(var(--rot)); } }

  /* ---- scene states ---- */
  .is-2 .mksm-sweep { animation: mksm-sweep 1.8s var(--sm-ease) .15s 1 both; }
  @keyframes mksm-sweep { 0% { opacity: 0; transform: translateX(-30cqw); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateX(110cqw); } }
  .is-2 .mksm-head { animation-play-state: paused; opacity: 0; }
  .is-2 .mksm-do { opacity: 1; transition-delay: calc(.3s + var(--k) * .7s); }
  .is-2 .mksm-do-ok { transform: scale(1); transition-delay: calc(.55s + var(--k) * .7s); }
  .is-2 .mksm-col.is-gap { opacity: 0; transform: scaleX(0); transition-delay: .5s; }
  .is-2 .mksm-col.g1 { transform: translateX(-8cqw); transition-delay: .5s; }
  .is-2 .mksm-col.g2 { transform: translateX(-14cqw); transition-delay: .5s; }
  [dir="rtl"] .is-2 .mksm-col.g1 { transform: translateX(8cqw); }
  [dir="rtl"] .is-2 .mksm-col.g2 { transform: translateX(14cqw); }
  .is-2 .mksm-word.is-filler { opacity: 0; transform: scale(.5); transition-delay: .5s; }
  .is-2 .mksm-time b { opacity: 1; transform: none; transition-delay: .9s; }
  .is-2 .mksm-w { opacity: 1; transform: none; transition-delay: calc(1.1s + var(--i) * .11s); }
  .is-2 .mksm-row.is-quiet i { transform: scaleY(calc(var(--h) * 3.2)); background: var(--sm-brand); transition-delay: 1.9s; }
  .is-2 .mksm-bed-bars i.is-speech { transform: scaleY(calc(var(--h) * .32)); transition-delay: 2.6s; }

  .is-3 .mksm-ed { opacity: .16; transform: scale(.92) translateY(2cqw); }
  .is-4 .mksm-ed { opacity: 0; }
  .is-3 .mksm-ai { opacity: 0; transform: translateY(-1em) scale(.97); transition-delay: 0s; }
  .is-3 .mksm-post { opacity: 1; transform: none; transition-delay: .25s; }

  .is-4 .mksm-plan, .is-4 .mksm-day { opacity: 1; transform: none; }
  .is-4 .mksm-cell { opacity: 1; transform: none; }
  .is-4 .mksm-post { transform: translate(calc(var(--tx) * 1cqw), calc(var(--ty) * 1cqw)) scale(var(--ts)); transition: opacity .5s, transform 1s var(--sm-fly) .75s; }
  .is-4 .mksm-cell.is-slot::after { opacity: 1; transition-delay: .5s; }
  .is-4 .mksm-cell.is-slot::before { opacity: 1; transform: scale(1.1); transition-delay: 1.6s; }
  .is-4 .mksm-when { opacity: 1; transform: translate(-50%, 0) scale(1); transition-delay: 1.75s; }

  .is-5 .mksm-ch { opacity: 1; transform: none; transition-delay: calc(var(--k) * .14s); }
  .is-5 .mksm-ch-g { background: var(--sm-ink); color: var(--sm-lime); transition-delay: calc(.5s + var(--k) * .14s); }
  .is-5 .mksm-ch-t small { opacity: 1; transform: none; transition-delay: calc(.6s + var(--k) * .14s); }
  .is-5 .mksm-burst i { animation: mksm-burst 1.5s cubic-bezier(.15, .7, .3, 1) calc(.15s + var(--k) * 25ms) 1 both; }
  .is-5 .mksm-when { background: var(--sm-brand); }

  /* Jumping (stepper) skips the choreography; a reset snaps back to the start; a pause freezes loops. */
  .mksm-stage.is-jump *, .mksm-stage.is-jump *::before, .mksm-stage.is-jump *::after { transition-delay: 0s !important; transition-duration: .3s !important; }
  .mksm-stage.is-reset *, .mksm-stage.is-reset *::before, .mksm-stage.is-reset *::after { transition: none !important; animation: none !important; }
  .mksm-stage.is-paused *, .mksm-stage.is-paused { animation-play-state: paused !important; }
  .mksm-stage.is-fade { opacity: 0; transition: opacity .35s; }
  .mksm-stage { transition: opacity .35s; }

  /* Still frame: reduced motion (and before the script runs, the composed final scene). */
  .mksm-stage.is-still *, .mksm-stage.is-still *::before, .mksm-stage.is-still *::after { transition: none !important; animation: none !important; }
  .mksm-stage.is-still .mksm-head { opacity: 0; }
  .mksm-stage.is-still.is-5 .mksm-burst i { opacity: 0; }

  /* Controls */
  .mksm-btn { z-index: 8; background: rgb(11 15 13 / .62); }
  .mksm > .mksm-btn { bottom: auto; top: calc(min(100cqw * 1.25, 100cqw * 1.25) - 56px); }
  @container mksm (min-width: 600px) { .mksm > .mksm-btn { top: calc(100cqw * .625 - 56px); } }
  .mksm-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
  .mksm-step { position: relative; display: grid; justify-items: center; gap: 6px; width: 100%; min-height: 44px; padding: 8px 4px 12px; border: 0; border-radius: 14px; background: transparent; color: var(--text-muted); font: inherit; cursor: pointer; text-align: center; overflow: hidden; transition: background .2s, color .2s; }
  .mksm-step:hover { background: var(--surface-2, rgb(11 15 13 / .04)); }
  .mksm-step:focus-visible { outline: none; box-shadow: var(--focus-ring, 0 0 0 3px #0BC284); }
  .mksm-step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface, #fff); box-shadow: inset 0 0 0 1px var(--line, #E8EAE5); transition: background .2s, color .2s; }
  .mksm-step-n svg { width: 16px; height: 16px; }
  .mksm-step-t b { display: block; font-size: 11px; line-height: 1.25; color: var(--text, #0B0F0D); }
  .mksm-step-t small { display: none; }
  .mksm-step.is-on { color: var(--text, #0B0F0D); }
  .mksm-step.is-on .mksm-step-n { background: var(--ink, #0B0F0D); color: var(--sm-lime); box-shadow: none; }
  .mksm-step-bar { position: absolute; left: 14%; right: 14%; bottom: 4px; height: 3px; border-radius: 3px; background: var(--line, #E8EAE5); overflow: hidden; }
  .mksm-step-bar i { display: block; height: 100%; background: var(--sm-brand); transform-origin: left; transform: scaleX(0); }
  [dir="rtl"] .mksm-step-bar i { transform-origin: right; }
  .mksm-step.is-done .mksm-step-bar i { transform: scaleX(1); }
  .mksm-caption { margin: 6px auto 0; max-width: 60ch; min-height: 2.8em; text-align: center; color: var(--text-muted); font-size: 14.5px; line-height: 1.45; }
  @media (min-width: 760px) {
    .mksm-steps { gap: 10px; margin-top: 18px; }
    .mksm-step { justify-items: start; grid-template-columns: 34px minmax(0, 1fr); align-items: start; text-align: start; padding: 10px 12px 14px; column-gap: 10px; }
    .mksm-step-t small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--text-muted); }
    .mksm-step-t b { font-size: 14px; }
    .mksm-caption { display: none; }
  }
  @media (prefers-reduced-motion: reduce) { .mksm-orb, .mksm-head { animation: none; } }
}
