/* ============================================================================
   Demo động — "screencast" giao diện Hắc Trúc II tự chạy trong trang.
   Không dùng file .mp4: mọi thứ là HTML/CSS/JS, tự phát & lặp, nhẹ, offline-ok.
   Kế thừa design tokens của site.css (jade/teal + vàng son + Fraunces).
   ========================================================================= */

.demo-wrap { max-width: 980px; margin: 0 auto; }

/* Khung "cửa sổ ứng dụng" */
.demo-frame {
  position: relative;
  background: linear-gradient(180deg, #12181a 0%, #0b1012 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 40px 90px -34px rgba(0,0,0,.72), 0 0 0 1px rgba(217,183,94,.06) inset;
  overflow: hidden;
}
/* Viền vàng son mảnh phía trên cho ra chất Manusora */
.demo-frame::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 5;
  background: linear-gradient(90deg, transparent, var(--gold) 24%, var(--gold-soft) 50%, var(--gold) 76%, transparent);
  opacity: .55;
}

/* Thanh tiêu đề */
.demo-bar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 11px 16px;
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--line);
}
.demo-dots { display: flex; gap: 7px; }
.demo-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.demo-dots i:nth-child(1) { background: #d8695f; }
.demo-dots i:nth-child(2) { background: #d9b75e; }
.demo-dots i:nth-child(3) { background: #6f9b86; }
.demo-title { font-size: 13px; color: var(--ink-3); font-weight: 600; letter-spacing: .01em; }
.demo-title b { color: var(--ink); font-family: var(--font-serif); font-weight: 600; margin-left: 4px; }
.demo-live { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--teal-300); }
.demo-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal-500); box-shadow: 0 0 0 0 rgba(159,195,173,.5); animation: demo-pulse 1.6s ease-out infinite; }
@keyframes demo-pulse { 0% { box-shadow: 0 0 0 0 rgba(159,195,173,.5); } 70% { box-shadow: 0 0 0 7px rgba(159,195,173,0); } 100% { box-shadow: 0 0 0 0 rgba(159,195,173,0); } }

/* Thân: thanh điều hướng dọc + sân khấu */
.demo-body { display: grid; grid-template-columns: 54px 1fr; height: 392px; }
.demo-rail {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px 0; background: rgba(255,255,255,.015); border-right: 1px solid var(--line);
}
.demo-rail span {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 9px; font-size: 15px; color: var(--ink-3);
  transition: background .35s var(--ease), color .35s var(--ease);
}
.demo-rail span.on { background: rgba(159,195,173,.16); color: var(--teal-300); }

.demo-stage {
  position: relative; overflow: hidden;
  background: radial-gradient(130% 80% at 50% -14%, rgba(159,195,173,.07), transparent 58%);
}

/* Con trỏ giả */
.demo-cursor {
  position: absolute; z-index: 6; width: 20px; height: 20px; left: 0; top: 0;
  pointer-events: none; opacity: 0; transition: opacity .3s var(--ease);
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.5));
}
.demo-cursor svg { width: 100%; height: 100%; }

/* ---- Cảnh (scene) ------------------------------------------------------- */
.demo-scene {
  position: absolute; inset: 0; padding: 26px 30px;
  opacity: 0; transform: translateY(12px) scale(.995);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
  pointer-events: none;
}
.demo-scene.is-active { opacity: 1; transform: none; }

.demo-scene-h {
  font-family: var(--font-sans); font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--teal-500);
  margin-bottom: 16px;
}

/* Cảnh 1 — chọn dự án */
.demo-projects { display: grid; gap: 12px; }
.demo-proj {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--panel);
  transition: border-color .4s var(--ease), background .4s var(--ease), transform .4s var(--ease);
}
.demo-proj .sig { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--teal-900); color: var(--teal-300); font-family: var(--font-serif); font-size: 20px; }
.demo-proj .meta b { display: block; font-family: var(--font-serif); font-size: 17px; color: var(--ink); font-weight: 600; }
.demo-proj .meta span { font-size: 13px; color: var(--ink-3); }
.demo-scene.is-active .demo-proj.pick {
  animation: demo-pick 2.6s var(--ease) both;
}
@keyframes demo-pick {
  0%, 42% { border-color: var(--line); background: var(--panel); transform: none; }
  60%, 100% { border-color: var(--gold-line); background: #171d1a; transform: translateX(3px); box-shadow: 0 8px 24px -12px rgba(217,183,94,.3); }
}

/* Cảnh 2 — viết bản thảo */
.demo-ms { max-width: 460px; margin: 6px auto 0; }
.demo-ms .h { font-family: var(--font-serif); font-weight: 600; font-size: 30px; color: var(--ink);
  letter-spacing: -.01em; margin-bottom: 14px; }
.demo-ms .h::first-letter { color: var(--gold-soft); }
.demo-ms p { font-family: var(--font-serif); font-size: 16.5px; line-height: 1.85; color: var(--ink-2); margin: 0; min-height: 120px; }
.demo-ms .caret { display: inline-block; width: 2px; height: 1.05em; background: var(--teal-300);
  vertical-align: -2px; margin-left: 1px; animation: demo-caret 1s step-end infinite; }
@keyframes demo-caret { 50% { opacity: 0; } }

/* Cảnh 3 — Mây gợi ý */
.demo-may { position: relative; height: 100%; }
.demo-may .ms-faint { font-family: var(--font-serif); font-size: 16px; line-height: 1.85; color: var(--ink-3); max-width: 440px; opacity: .5; }
.demo-may-bubble {
  position: absolute; right: 6px; bottom: 10px; max-width: 300px;
  display: flex; gap: 12px; align-items: flex-end;
  opacity: 0; transform: translateY(16px);
}
.demo-scene.is-active .demo-may-bubble { animation: demo-rise .6s var(--ease) .5s both; }
@keyframes demo-rise { to { opacity: 1; transform: none; } }
.demo-may-bubble img { width: 54px; height: 54px; flex: none; filter: drop-shadow(0 8px 14px rgba(0,0,0,.4)); }
.demo-may-bubble .say {
  background: var(--panel-2); border: 1px solid var(--line-strong);
  border-radius: 14px 14px 4px 14px; padding: 12px 14px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.5;
  box-shadow: var(--shadow-2);
}
.demo-may-bubble .say small { display: block; font-weight: 500; font-size: 11.5px; color: var(--teal-500); margin-top: 4px; letter-spacing: .06em; text-transform: uppercase; }

/* Cảnh 4 — gác canh nhất quán */
.demo-checks { display: grid; gap: 10px; max-width: 460px; }
.demo-check {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 15px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--panel); font-size: 14.5px; color: var(--ink-2); font-weight: 500;
  opacity: 0; transform: translateX(-8px);
}
.demo-scene.is-active .demo-check { animation: demo-in .45s var(--ease) both; }
.demo-scene.is-active .demo-check:nth-child(1) { animation-delay: .25s; }
.demo-scene.is-active .demo-check:nth-child(2) { animation-delay: .65s; }
.demo-scene.is-active .demo-check:nth-child(3) { animation-delay: 1.05s; }
@keyframes demo-in { to { opacity: 1; transform: none; } }
.demo-check .ico { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.demo-check.ok .ico { background: rgba(111,155,134,.2); color: var(--teal-300); }
.demo-check.warn .ico { background: rgba(217,183,94,.16); color: var(--gold-soft); }
.demo-check b { color: var(--ink); font-weight: 700; }

/* Cảnh 5 — xuất bản */
.demo-export { display: grid; place-items: center; height: 100%; text-align: center; gap: 18px; }
.demo-formats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.demo-fmt {
  padding: 9px 16px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: var(--panel); font-size: 13px; font-weight: 700; color: var(--ink-2);
  opacity: 0; transform: scale(.9);
}
.demo-scene.is-active .demo-fmt { animation: demo-pop .4s var(--ease) both; }
.demo-scene.is-active .demo-fmt:nth-child(1){ animation-delay:.2s } .demo-scene.is-active .demo-fmt:nth-child(2){ animation-delay:.35s }
.demo-scene.is-active .demo-fmt:nth-child(3){ animation-delay:.5s } .demo-scene.is-active .demo-fmt:nth-child(4){ animation-delay:.65s }
@keyframes demo-pop { to { opacity: 1; transform: none; } }
.demo-done {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px; border-radius: var(--r-pill);
  background: var(--teal-900); border: 1px solid var(--teal-700);
  color: var(--mint); font-weight: 700; font-size: 15px;
  opacity: 0; transform: translateY(8px);
}
.demo-scene.is-active .demo-done { animation: demo-rise .5s var(--ease) 1s both; }
.demo-done .tick { width: 22px; height: 22px; border-radius: 50%; background: var(--teal-700); color: #0e1112; display: grid; place-items: center; font-size: 13px; font-weight: 900; }

/* ---- Thanh tua (scrubber) + chú thích ----------------------------------- */
.demo-scrub {
  display: flex; align-items: stretch; gap: 2px;
  padding: 12px 16px; border-top: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.demo-step {
  flex: 1; background: transparent; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 7px; padding: 0 6px;
  color: var(--ink-3); font-family: var(--font-sans); font-size: 11.5px; font-weight: 600;
  text-align: left; transition: color .3s var(--ease);
}
.demo-step .track { height: 3px; border-radius: 3px; background: var(--line-strong); overflow: hidden; }
.demo-step .track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal-600), var(--gold)); }
.demo-step.is-active { color: var(--ink); }
.demo-step.is-active .track i { animation: demo-fill linear both; }
.demo-step.is-done .track i { width: 100%; }
@keyframes demo-fill { from { width: 0; } to { width: 100%; } }

.demo-caption {
  text-align: center; margin-top: 20px;
  font-family: var(--font-serif); font-size: clamp(17px, 2.2vw, 21px);
  color: var(--ink); min-height: 1.6em;
}
.demo-caption b { color: var(--gold-soft); font-weight: 600; }

/* Nhãn "tự phát" nhỏ dưới khung */
.demo-note { text-align: center; margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.demo-note span { color: var(--teal-500); }

/* ===== Cảnh tính năng (khung demo thứ 2) ================================= */

/* AI viết nháp theo beats */
.demo-ai { display: grid; grid-template-columns: 210px 1fr; gap: 26px; align-content: start; }
.demo-beats { display: flex; flex-direction: column; gap: 9px; }
.demo-beats .beat {
  font-size: 13px; color: var(--ink-2); background: var(--panel);
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px;
  position: relative; padding-left: 26px;
}
.demo-beats .beat::before { content: ""; position: absolute; left: 11px; top: 15px; width: 5px; height: 5px; border-radius: 50%; background: var(--teal-500); }
.demo-beats .beat.go {
  background: var(--teal-900); border-color: var(--teal-700); color: var(--mint);
  font-weight: 700; text-align: center; padding-left: 12px; margin-top: 3px;
}
.demo-beats .beat.go::before { display: none; }
.demo-scene.is-active .demo-beats .beat.go { animation: demo-glow 2s var(--ease) infinite; }
@keyframes demo-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(176,212,184,0); } 50% { box-shadow: 0 0 0 4px rgba(176,212,184,.14); } }
.demo-ai-draft { font-family: var(--font-serif); font-size: 16px; line-height: 1.8; color: var(--ink-2); margin: 0; min-height: 120px; }

/* Nhân vật & Canon */
.demo-lore .ms-faint { font-family: var(--font-serif); font-size: 16.5px; line-height: 1.85; color: var(--ink-3); max-width: 540px; margin: 0; }
.demo-lore .hl { color: var(--teal-300); font-weight: 600; background: rgba(159,195,173,.12); border-radius: 4px; padding: 0 3px; }
.demo-pop { margin-top: 24px; display: grid; gap: 10px; max-width: 440px; }
.pop-row {
  display: flex; align-items: center; gap: 11px;
  background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 11px 14px; font-size: 14px; color: var(--ink-2);
  opacity: 0; transform: translateY(8px);
}
.pop-row b { color: var(--ink); }
.demo-scene.is-active .pop-row { animation: demo-rise .5s var(--ease) both; }
.demo-scene.is-active .pop-row:nth-child(1) { animation-delay: .5s; }
.demo-scene.is-active .pop-row:nth-child(2) { animation-delay: .95s; }
.pop-ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: rgba(159,195,173,.18); color: var(--teal-300); font-weight: 800; font-size: 14px; flex: none; }
.pop-ic.lock { background: rgba(217,183,94,.16); color: var(--gold-soft); font-size: 12px; }
.pop-btn { margin-left: auto; font-size: 12px; font-weight: 700; color: #0e1112; background: var(--mint); border-radius: 999px; padding: 4px 12px; flex: none; }

/* Vân tay văn phong */
.demo-stat { display: grid; gap: 15px; max-width: 540px; }
.stat-row { display: grid; grid-template-columns: 108px 1fr auto; align-items: center; gap: 13px; font-size: 13.5px; }
.stat-k { color: var(--ink-3); }
.stat-bar { height: 8px; border-radius: 999px; background: var(--line-strong); overflow: hidden; }
.stat-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-600), var(--gold)); border-radius: 999px; transform-origin: left; }
.demo-scene.is-active .stat-bar i { animation: demo-grow .85s var(--ease) both; }
.demo-scene.is-active .stat-row:nth-child(2) .stat-bar i { animation-delay: .15s; }
.demo-scene.is-active .stat-row:nth-child(3) .stat-bar i { animation-delay: .3s; }
@keyframes demo-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.stat-v { color: var(--ink); font-weight: 600; white-space: nowrap; }
.demo-avoid { margin-top: 4px; font-size: 14px; color: var(--teal-300); font-weight: 600; opacity: 0; }
.demo-scene.is-active .demo-avoid { animation: demo-rise .5s var(--ease) .8s both; }

/* Lộ trình arc */
.demo-arcs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.arc { border: 1px solid var(--line); border-radius: var(--r-md); padding: 15px; background: var(--panel); opacity: 0; transform: translateY(10px); }
.demo-scene.is-active .arc { animation: demo-rise .5s var(--ease) both; }
.demo-scene.is-active .arc:nth-child(1) { animation-delay: .2s; }
.demo-scene.is-active .arc:nth-child(2) { animation-delay: .4s; }
.demo-scene.is-active .arc:nth-child(3) { animation-delay: .6s; }
.arc b { font-family: var(--font-serif); font-size: 15px; color: var(--ink); display: block; margin-bottom: 5px; }
.arc span { font-size: 12.5px; color: var(--ink-3); display: block; line-height: 1.5; }
.arc.done b::after { content: " ✓"; color: var(--teal-500); }
.arc.cur { border-color: var(--gold-line); background: #171d1a; box-shadow: 0 10px 28px -16px rgba(217,183,94,.4); }
.arc.cur em { display: inline-block; margin-top: 10px; font-style: normal; font-size: 11.5px; font-weight: 700; color: #0e1112; background: var(--gold-soft); border-radius: 999px; padding: 3px 10px; }

/* ===== Cảnh tiện ích khi viết (khung demo thứ 3) ======================= */
.demo-editor { font-family: var(--font-serif); font-size: 16.5px; line-height: 1.85; color: var(--ink-2); max-width: 560px; }
.demo-editor .cur { display: inline-block; width: 2px; height: 1.05em; background: var(--teal-300); vertical-align: -2px; animation: demo-caret 1s step-end infinite; }
.demo-slashwrap { position: relative; }

/* Slash menu */
.slash-menu, .at-menu {
  margin-top: 12px; background: var(--panel-2); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 6px; box-shadow: var(--shadow-2); opacity: 0; transform: translateY(-6px);
}
.slash-menu { width: 268px; } .at-menu { width: 246px; }
.demo-scene.is-active .slash-menu, .demo-scene.is-active .at-menu { animation: demo-rise .35s var(--ease) .5s both; }
.slash-item, .at-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  font-family: var(--font-sans); font-size: 14px; color: var(--ink-2);
}
.slash-item.sel, .at-item.sel { background: rgba(159,195,173,.12); color: var(--ink); }
.slash-item .k { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: rgba(159,195,173,.14); color: var(--teal-300); font-size: 13px; font-weight: 700; }
.slash-item .hint, .at-item small { margin-left: auto; font-size: 12px; color: var(--ink-3); font-family: var(--mono, monospace); }
.at-item .av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-900); color: var(--teal-300); font-family: var(--font-serif); font-size: 13px; }

/* Focus */
.foc-toggle { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; font-family: var(--font-sans); font-size: 13px; font-weight: 700; color: var(--teal-300); }
.foc-toggle .sw { width: 34px; height: 19px; border-radius: 999px; background: var(--teal-700); position: relative; }
.foc-toggle .sw::after { content: ""; position: absolute; top: 2px; left: 17px; width: 15px; height: 15px; border-radius: 50%; background: #0e1112; }
.demo-focus .foc { font-family: var(--font-serif); font-size: 16.5px; line-height: 1.8; color: var(--ink-3); opacity: .3; transition: opacity .6s var(--ease), color .6s var(--ease); margin: 0 0 10px; max-width: 560px; }
.demo-scene.is-active .demo-focus .foc.on { opacity: 1; color: var(--ink); }

/* Mây viết lại đoạn */
.demo-rw { max-width: 600px; }
.demo-rw .rw-old { font-family: var(--font-serif); font-size: 16px; line-height: 1.8; color: var(--ink-3); margin: 0; }
.demo-rw .rw-old .sel { background: rgba(217,183,94,.18); color: var(--ink); border-radius: 3px; padding: 0 2px; box-shadow: inset 0 -1px 0 var(--gold-line); }
.rw-card { margin-top: 16px; display: flex; gap: 12px; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 14px; padding: 14px; opacity: 0; transform: translateY(10px); }
.demo-scene.is-active .rw-card { animation: demo-rise .5s var(--ease) .5s both; }
.rw-card img { width: 40px; height: 40px; flex: none; align-self: flex-start; }
.rw-body .rw-new { font-family: var(--font-serif); font-size: 15.5px; line-height: 1.7; color: var(--ink); margin: 0 0 10px; }
.rw-actions { display: flex; gap: 8px; }
.rw-actions .ok { font-size: 12.5px; font-weight: 700; color: #0e1112; background: var(--mint); border-radius: 999px; padding: 5px 13px; }
.rw-actions .no { font-size: 12.5px; font-weight: 700; color: var(--ink-2); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 13px; }

/* So sánh phiên bản (diff) */
.demo-diff { display: grid; gap: 8px; max-width: 600px; font-family: var(--font-serif); font-size: 15.5px; }
.demo-diff .d-meta { font-family: var(--font-sans); font-size: 12.5px; color: var(--ink-3); }
.demo-diff .d { padding: 9px 13px; border-radius: 8px; line-height: 1.6; opacity: 0; transform: translateX(-8px); }
.demo-scene.is-active .demo-diff .d { animation: demo-in .45s var(--ease) both; }
.demo-scene.is-active .demo-diff .d:nth-child(2) { animation-delay: .3s; }
.demo-scene.is-active .demo-diff .d:nth-child(3) { animation-delay: .6s; }
.d-del { background: rgba(208,106,96,.1); color: #c98d86; text-decoration: line-through; text-decoration-color: rgba(208,106,96,.5); }
.d-ins { background: rgba(111,155,134,.12); color: var(--mint); }

/* Trí nhớ dài kỳ */
.demo-mem { max-width: 600px; }
.demo-mem .mem-line { font-family: var(--font-serif); font-size: 16px; line-height: 1.8; color: var(--ink-2); margin: 0; }
.demo-mem .mem-line b { color: var(--ink); }
.mem-pull { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 9px; }
.mem-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-family: var(--font-sans); font-size: 13px; color: var(--ink-2); opacity: 0; transform: scale(.9); }
.demo-scene.is-active .mem-chip { animation: demo-pop .4s var(--ease) both; }
.demo-scene.is-active .mem-chip:nth-child(1) { animation-delay: .4s; }
.demo-scene.is-active .mem-chip:nth-child(2) { animation-delay: .6s; }
.demo-scene.is-active .mem-chip:nth-child(3) { animation-delay: .8s; }
.mem-chip b { color: var(--teal-300); font-family: var(--font-serif); }
.mem-note { margin-top: 16px; font-size: 13.5px; color: var(--teal-300); font-weight: 600; opacity: 0; }
.demo-scene.is-active .mem-note { animation: demo-rise .5s var(--ease) 1s both; }

@media (max-width: 640px) {
  .demo-editor, .demo-rw .rw-old, .demo-diff, .demo-mem .mem-line, .demo-focus .foc { font-size: 15px; }
  .slash-menu, .at-menu { width: 100%; }
  .demo-ai { grid-template-columns: 1fr; gap: 16px; }
  .demo-ai-draft { min-height: 80px; font-size: 15px; }
  .demo-arcs { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 92px 1fr; }
  .stat-row .stat-v { grid-column: 2; text-align: right; }
  .demo-lore .ms-faint { font-size: 15px; }
}

/* Reduced motion: bỏ hiệu ứng nặng, vẫn chuyển cảnh mượt */
@media (prefers-reduced-motion: reduce) {
  .demo-live::before, .demo-ms .caret { animation: none; }
  .demo-scene.is-active .demo-proj.pick,
  .demo-scene.is-active .demo-may-bubble,
  .demo-scene.is-active .demo-check,
  .demo-scene.is-active .demo-fmt,
  .demo-scene.is-active .demo-done,
  .demo-scene.is-active .pop-row,
  .demo-scene.is-active .demo-avoid,
  .demo-scene.is-active .arc,
  .demo-scene.is-active .demo-beats .beat.go,
  .demo-scene.is-active .slash-menu,
  .demo-scene.is-active .at-menu,
  .demo-scene.is-active .rw-card,
  .demo-scene.is-active .demo-diff .d,
  .demo-scene.is-active .mem-chip,
  .demo-scene.is-active .mem-note { animation: none; opacity: 1; transform: none; }
  .demo-scene.is-active .stat-bar i { animation: none; transform: scaleX(1); }
  .demo-editor .cur { animation: none; }
  .demo-step.is-active .track i { animation: none; width: 100%; }
}

/* Mobile */
@media (max-width: 640px) {
  .demo-body { height: 340px; grid-template-columns: 46px 1fr; }
  .demo-scene { padding: 20px; }
  .demo-ms .h { font-size: 24px; }
  .demo-step { font-size: 0; gap: 0; padding: 0 3px; }   /* chỉ còn thanh track */
  .demo-step .track { height: 4px; }
  .demo-may-bubble { position: static; margin-top: 16px; }
  .demo-may .ms-faint { display: none; }
}
