/* The guide: each chapter is a small copy of the app that plays its steps, with a cursor that
   clicks what the step says. huong-dan.js drives it; the mock itself is drawn here. */

.guide-hero { padding: 88px 0 24px; text-align: center; }
.guide-hero h1 { margin: 18px auto 18px; max-width: 820px; font-size: clamp(32px, 4.6vw, 58px); font-weight: 800; line-height: 1.1; letter-spacing: -.04em; text-wrap: balance; }
.guide-hero .lead { margin: 0 auto; }
.chapters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 860px; margin: 40px auto 0; list-style: none; text-align: left; }
.chapters a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: 14.5px; font-weight: 600; line-height: 1.3; transition: border-color .2s, transform .2s var(--ease); }
.chapters a:hover { border-color: var(--brand); transform: translateY(-2px); }
.chapters i { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 10px; font-style: normal; font-size: 13px; font-weight: 800; color: var(--brand); background: var(--mist); }

/* Install: the two existing install videos side by side */
.install-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.install-pair figure { padding: 14px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); }
.install-pair video { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--video-bg); }
.install-pair figcaption { display: flex; align-items: baseline; gap: 10px; padding: 14px 6px 2px; font-weight: 700; }
.install-pair figcaption span { font-size: 14px; font-weight: 500; color: var(--muted); }

/* A chapter: the steps beside the playing mock */
.tut { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 36px; align-items: start; }
.tut-head h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; line-height: 1.15; letter-spacing: -.03em; }
.tut-head p { margin-top: 10px; color: var(--muted); }
.tut-num { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 11px; font-size: 15px; font-weight: 800; color: #fff; background: var(--fill); box-shadow: var(--shadow-brand); }
.tut-steps { display: grid; gap: 6px; margin-top: 22px; list-style: none; counter-reset: step; }
.tut-steps button { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 0 12px; width: 100%; padding: 12px 14px; overflow: hidden; border-radius: 14px; border: 1px solid transparent; background: none; color: var(--muted); font: inherit; font-size: 14.5px; line-height: 1.5; text-align: left; cursor: pointer; transition: background .25s, border-color .25s, color .25s; }
.tut-steps button:hover { background: var(--mist); }
.tut-steps button::before { counter-increment: step; content: counter(step); display: grid; place-items: center; grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--mist); transition: background .25s, color .25s; }
.tut-steps b { color: var(--ink); font-weight: 650; }
.tut-steps span { grid-column: 2; }
.tut-steps .active button { color: var(--ink); background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-sm); }
.tut-steps .active button::before, .tut-steps .done button::before { color: #fff; background: var(--fill); }
.tut-steps .active button::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--fill); transform-origin: left; animation: step-time var(--ms, 3s) linear both; }
.tut.paused .tut-steps .active button::after { animation-play-state: paused; }
@keyframes step-time { from { transform: scaleX(0); } }
.tut-tip { margin-top: 14px; padding: 12px 14px; border-radius: 14px; font-size: 14px; color: var(--muted); background: var(--mist); }
.tut-tip b { color: var(--ink); }

.tut-stage { position: relative; width: 100%; height: 470px; border-radius: 18px; overflow: hidden; border: 1px solid var(--border-strong); box-shadow: var(--shadow); background: #fffcfe; }
.tut.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
.tut.flip .tut-stage { order: -1; }

/* ---------- The app, drawn at 760 × 470 and scaled to fit ---------- */
.app {
  --a-ink: #131a2e; --a-muted: #646fbb; --a-accent: #4d5ebe; --a-line: rgba(77, 94, 190, .16); --a-line-2: rgba(77, 94, 190, .28); --a-soft: rgba(173, 168, 255, .16);
  position: absolute; left: 0; top: 0; width: 760px; height: 470px; transform: scale(var(--s, 1)); transform-origin: 0 0;
  display: flex; flex-direction: column; overflow: hidden; color: var(--a-ink); background: #fffcfe;
  font: 12px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", "Be Vietnam Pro", sans-serif; letter-spacing: 0; text-align: left; user-select: none;
  transition: opacity .45s;
}
.app.resetting { opacity: 0; }
.app * { box-sizing: border-box; }
.app svg.ic { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.a-bar { display: flex; align-items: center; gap: 6px; height: 24px; flex: none; padding: 0 10px; background: #f6f4f9; border-bottom: 1px solid var(--a-line); }
.a-bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.a-bar i:nth-child(2) { background: #febc2e; } .a-bar i:nth-child(3) { background: #28c840; }
.a-body { position: relative; display: flex; flex: 1; min-height: 0; }

.a-side { position: relative; display: flex; flex-direction: column; width: 162px; flex: none; padding: 12px 10px; background: rgba(255, 255, 255, .78); border-right: 1px solid var(--a-line); }
.a-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.a-brand img { width: 26px; height: 26px; border-radius: 7px; }
.a-brand b { display: block; font-size: 13.5px; line-height: 1.1; }
.a-brand small { font-size: 6.5px; font-weight: 700; letter-spacing: .08em; color: var(--a-muted); }
.a-cap { margin: 0 0 6px 6px; font-size: 8px; font-weight: 800; letter-spacing: .12em; color: var(--a-muted); }
.a-nav { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 9px; margin-bottom: 3px; border-radius: 9px; border: 1px solid transparent; color: var(--a-muted); font-weight: 500; }
.a-nav.cur { color: var(--a-ink); font-weight: 650; background: var(--a-soft); border-color: var(--a-line); }
.a-acct { margin-top: auto; padding: 9px 10px; border-radius: 11px; border: 1px solid rgba(239, 70, 160, .28); background: linear-gradient(120deg, rgba(255, 159, 203, .16), rgba(173, 168, 255, .2)); }
.a-acct b { display: block; font-size: 11px; }
.a-acct small { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--a-muted); }
.a-acct small i { width: 6px; height: 6px; border-radius: 50%; background: #74c6ff; }

.a-main { position: relative; flex: 1; min-width: 0; padding: 20px 26px; overflow: hidden;
  background: radial-gradient(circle at 100% 0%, rgba(255, 159, 203, .42), transparent 34%), radial-gradient(circle at 0% 100%, rgba(116, 198, 255, .38), transparent 36%), radial-gradient(circle at 70% 110%, rgba(173, 168, 255, .35), transparent 34%), #fffcfe; }
.a-eyebrow { font-size: 8.5px; font-weight: 800; letter-spacing: .16em; color: var(--a-accent); }
.a-h { margin: 3px 0 2px; font-size: 20px; font-weight: 750; letter-spacing: -.02em; line-height: 1.2; }
.a-sub { font-size: 11px; color: var(--a-muted); }
.a-card { position: relative; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .8); border: 1px solid var(--a-line); box-shadow: 0 12px 30px -16px rgba(19, 26, 46, .3); }
.a-label { display: block; margin-bottom: 5px; font-size: 8.5px; font-weight: 800; letter-spacing: .12em; color: var(--a-muted); }
.a-row { display: flex; align-items: center; gap: 8px; }
.a-grow { flex: 1; min-width: 0; }
.a-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 13px; flex: none; border-radius: 99px; border: 1px solid var(--a-line-2); background: #fff; font-weight: 650; font-size: 11px; white-space: nowrap; transition: transform .15s, background .2s; }
.a-btn.primary { color: #fff; background: var(--a-ink); border-color: var(--a-ink); }
.a-btn.pressed { transform: scale(.94); }
.a-input { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--a-line-2); background: #fff; color: var(--a-ink); white-space: nowrap; overflow: hidden; }
.a-input .ph { color: #9aa1cf; }
.a-select { justify-content: space-between; font-weight: 600; }
.a-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--a-line-2); background: #fff; font-size: 10.5px; font-weight: 600; color: var(--a-muted); transition: background .25s, color .25s, border-color .25s; }
.a-chip.sel, .a-chip.st { color: var(--a-ink); background: rgba(173, 168, 255, .3); border-color: var(--a-accent); }
.a-switch { position: relative; width: 32px; height: 18px; flex: none; border-radius: 99px; background: #d5d7ea; transition: background .25s; }
.a-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
.a-switch.on, .a-switch.st { background: var(--a-accent); }
.a-switch.on::after, .a-switch.st::after { transform: translateX(14px); }
.a-toast { position: absolute; left: 50%; bottom: 18px; display: flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 99px; color: #fff; background: var(--a-ink); font-weight: 600; box-shadow: 0 14px 30px -10px rgba(19, 26, 46, .5); white-space: nowrap; transform: translateX(-50%); z-index: 6; }
.a-toast.on { animation: toast-in .5s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px); } }
.a-modal { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(19, 26, 46, .22); backdrop-filter: blur(2px); z-index: 5; }
.a-dialog { width: 360px; padding: 18px 20px; border-radius: 18px; background: #fff; box-shadow: 0 30px 70px -20px rgba(19, 26, 46, .45); }
.a-dialog .a-h { font-size: 16px; }
.a-pop { position: absolute; z-index: 4; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--a-line); box-shadow: 0 20px 44px -14px rgba(19, 26, 46, .35); }
.a-wave { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.a-wave b { width: 2.5px; height: 100%; border-radius: 2px; background: currentColor; animation: wave 1s ease-in-out infinite; }
.a-wave b:nth-child(2n) { animation-delay: -.3s; } .a-wave b:nth-child(3n) { animation-delay: -.6s; }
@keyframes wave { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.typing::after { content: ''; display: inline-block; width: 1.5px; height: 1.1em; margin-left: 1px; vertical-align: -2px; background: currentColor; animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Shown from its step on, rising in; --d staggers what shows together */
.app [data-on]:not(.on) { display: none !important; }
.app [data-on].on:not(.a-toast) { animation: a-in .5s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes a-in { from { opacity: 0; transform: translateY(8px); } }

/* The cursor, and the ring it leaves where it clicks */
.cursor { position: absolute; left: 0; top: 0; width: 20px; height: 20px; margin: -3px 0 0 -4px; z-index: 20; pointer-events: none; opacity: 0; transform: translate(560px, 420px); transition: transform .7s cubic-bezier(.45, 0, .2, 1), opacity .3s; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3l14 8-6.5 1.5L9.5 19z' fill='%23131a2e' stroke='%23fff' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
.cursor.show { opacity: 1; }
.cursor::after { content: ''; position: absolute; left: -11px; top: -11px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #ef3184; opacity: 0; }
.cursor.click::after { animation: click .5s ease-out; }
@keyframes click { from { opacity: .9; transform: scale(.3); } to { opacity: 0; transform: scale(1.3); } }
.app [data-t].hit { box-shadow: 0 0 0 3px rgba(239, 49, 132, .3); }

/* ---------- Chapter mocks ---------- */
/* Home: the big start button */
.m-start { display: grid; place-items: center; margin: 22px auto 0; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(173, 168, 255, .22) 58%, transparent 59%), radial-gradient(circle, transparent 66%, rgba(77, 94, 190, .14) 67%, transparent 68%); }
.m-start span { display: grid; place-items: center; gap: 4px; width: 118px; height: 118px; border-radius: 50%; color: #fff; text-align: center; font-weight: 700; font-size: 11px; background: linear-gradient(160deg, #1f2547, #3c4aa0); box-shadow: 0 16px 34px -12px rgba(36, 44, 110, .7); }
.m-start svg.ic { width: 22px; height: 22px; }
.m-hint { margin-top: 10px; text-align: center; }
.m-hint b { display: block; font-size: 14px; }
.m-hint small { color: var(--a-muted); }
.m-hint a { font-weight: 700; color: var(--a-accent); margin-left: 6px; }

.m-live { display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; margin-top: 12px; height: 300px; }
.m-live .a-card { overflow: hidden; }
.m-line { padding: 7px 8px; margin: 0 -8px 2px; border-radius: 9px; transition: background .3s; }
.m-line.st { background: rgba(239, 49, 132, .14); }
.m-who { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; }
.m-who i { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: #fff; font-size: 9px; font-style: normal; }
.m-who small { font-weight: 500; color: var(--a-muted); }
.m-line p { margin-top: 2px; }
.m-vi { margin-top: 2px; color: var(--a-accent); font-weight: 550; }
.m-point { padding: 7px 9px; margin-bottom: 6px; border-radius: 9px; background: rgba(173, 168, 255, .14); }
.m-point small { display: block; font-size: 8.5px; font-weight: 800; letter-spacing: .1em; color: var(--a-muted); }
.m-task { display: flex; gap: 7px; }
.m-task .tick { display: grid; place-items: center; width: 15px; height: 15px; flex: none; margin-top: 1px; border-radius: 5px; color: #fff; background: var(--a-accent); }
.m-task .tick svg.ic { width: 10px; height: 10px; stroke-width: 3; }
.m-task em { display: block; font-style: normal; font-size: 10px; color: var(--a-muted); }
.m-ask { left: 110px; top: 158px; width: 270px; }
.m-ask .a-row { flex-wrap: wrap; gap: 5px; }
.m-answer { margin-top: 9px; padding: 8px 10px; border-radius: 10px; background: #f4f3fb; }
.m-answer b { color: var(--a-accent); }

/* Interpreter */
.m-tr-setup { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.m-drop { top: 104px; left: 40px; width: 240px; padding: 6px; }
.m-drop div { padding: 7px 9px; border-radius: 8px; font-weight: 550; }
.m-drop div.sel { background: var(--a-soft); color: var(--a-ink); }
.m-block { padding: 8px 0; border-bottom: 1px solid var(--a-line); }
.m-block small { display: block; margin: 4px 0 1px; font-size: 8.5px; font-weight: 800; letter-spacing: .1em; color: var(--a-accent); }
.m-block .m-vi { display: flex; align-items: center; gap: 8px; color: var(--a-ink); font-size: 12.5px; font-weight: 600; }
.m-block .a-wave { color: #ef3184; }
.m-voice { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 2px 8px; border-radius: 99px; font-size: 9.5px; font-weight: 600; color: #c42cb8; background: rgba(239, 49, 132, .1); }

/* Island: a full-screen video with the island under the notch */
.m-desk { position: absolute; inset: 0; z-index: 3; overflow: hidden; background: #0b0d18; }
.m-film { position: absolute; inset: 0; background: radial-gradient(circle at 30% 60%, rgba(255, 170, 120, .55), transparent 30%), radial-gradient(circle at 70% 40%, rgba(110, 140, 255, .5), transparent 32%), linear-gradient(160deg, #1d2240, #3a2a44 60%, #1a1424); animation: film 9s ease-in-out infinite alternate; }
.m-film::before, .m-film::after { content: ''; position: absolute; bottom: 0; width: 150px; height: 230px; border-radius: 75px 75px 0 0; background: rgba(10, 10, 20, .55); }
.m-film::before { left: 180px; } .m-film::after { right: 160px; height: 200px; }
@keyframes film { to { transform: scale(1.08) translateX(-14px); } }
.m-notch { position: absolute; left: 50%; top: 0; width: 150px; height: 22px; margin-left: -75px; border-radius: 0 0 12px 12px; background: #000; z-index: 2; }
.m-island { position: absolute; left: 50%; top: 0; width: 420px; margin-left: -210px; padding: 28px 18px 12px; border-radius: 0 0 24px 24px; color: #fff; background: #000; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .6); transition: all .6s var(--ease); z-index: 1; }
.m-island small { display: block; color: rgba(255, 255, 255, .55); font-size: 10.5px; }
.m-island p { font-size: 13.5px; font-weight: 650; }
.m-island .a-wave { color: #ff6fb5; float: right; margin-top: -22px; }
.m-island-menu { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .15); }
.m-island-menu div { display: flex; align-items: center; gap: 8px; padding: 5px 4px; color: rgba(255, 255, 255, .85); }
.m-island-menu em { margin-left: auto; font-style: normal; font-size: 10px; color: #7ee2b0; }
.m-island.st-menu .m-island-menu { display: block; }
.m-island.st-sub { top: 360px; width: 520px; margin-left: -260px; padding: 12px 18px; border-radius: 16px; background: rgba(0, 0, 0, .72); text-align: center; }
.m-island.st-sub .a-wave, .m-island.st-sub small { display: none; }
.m-island.st-sub p { font-size: 16px; }
.m-caps { position: relative; height: 40px; }
.m-caps > div { position: absolute; inset: 0; opacity: 0; animation: caps 9s infinite; }
.m-caps > div:nth-child(2) { animation-delay: 3s; } .m-caps > div:nth-child(3) { animation-delay: 6s; }
@keyframes caps { 0%, 2% { opacity: 0; transform: translateY(4px); } 5%, 30% { opacity: 1; transform: none; } 33%, 100% { opacity: 0; } }
.m-island.st-sub .m-caps { height: 26px; }

/* Watch */
.m-player { position: relative; height: 262px; margin-top: 12px; border-radius: 14px; overflow: hidden; background: #0b0d18; }
.m-player .m-film { animation-duration: 12s; }
.m-player .m-sub { position: absolute; left: 0; right: 0; bottom: 16px; height: 46px; text-align: center; }
.m-player .m-sub > div { position: absolute; left: 50%; transform: translateX(-50%); padding: 5px 12px; border-radius: 8px; white-space: nowrap; color: #fff; background: rgba(0, 0, 0, .66); font-size: 14px; font-weight: 600; opacity: 0; animation: caps 9s infinite; }
.m-player .m-sub > div:nth-child(2) { animation-delay: 3s; } .m-player .m-sub > div:nth-child(3) { animation-delay: 6s; }
.m-player .m-time { position: absolute; left: 14px; right: 14px; bottom: 7px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .25); }
.m-player .m-time::after { content: ''; position: absolute; inset: 0; border-radius: 3px; background: #ff3d6e; transform-origin: left; animation: playhead 30s linear infinite; }
@keyframes playhead { from { transform: scaleX(.05); } to { transform: scaleX(1); } }
.m-prep { position: absolute; left: 50%; top: 50%; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 99px; color: #fff; background: rgba(0, 0, 0, .6); transform: translate(-50%, -50%); animation: prep 1.8s var(--ease) both; }
@keyframes prep { 0%, 75% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.m-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.m-player .m-sub { animation: a-in .5s 1.6s both; }
.m-dubbing { position: absolute; right: 12px; top: 12px; display: flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 99px; color: #fff; background: rgba(239, 49, 132, .85); font-size: 10.5px; font-weight: 600; }

/* File */
.m-dropzone { display: grid; place-items: center; gap: 5px; height: 132px; margin-top: 12px; border-radius: 14px; border: 1.5px dashed var(--a-line-2); background: rgba(255, 255, 255, .7); text-align: center; }
.m-dropzone .m-up { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--a-accent); background: var(--a-soft); }
.m-dropzone b { font-size: 13px; }
.m-dropzone small { color: var(--a-muted); font-size: 10px; }
.m-or { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 10px; color: var(--a-muted); }
.m-or::before, .m-or::after { content: ''; flex: 1; height: 1px; background: var(--a-line); }
.m-file { display: flex; align-items: center; gap: 10px; }
.m-file .m-up { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: linear-gradient(150deg, #ef3184, #c42cb8); }
.m-file b { display: block; font-size: 12.5px; }
.m-file small { color: var(--a-muted); }
.m-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.m-facts div { padding: 8px 10px; border-radius: 10px; background: #f5f4fb; }
.m-facts b { font-size: 12.5px; }
.m-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.m-progress { height: 6px; margin: 12px 0 8px; border-radius: 6px; background: #e6e6f3; overflow: hidden; }
.m-progress i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #4d5ebe, #ef3184); transform-origin: left; animation: fill 3.6s cubic-bezier(.3, .1, .3, 1) both; }
@keyframes fill { from { transform: scaleX(.04); } }
.m-phase { position: relative; height: 18px; font-weight: 600; }
.m-phase span { position: absolute; inset: 0; opacity: 0; animation: phase 3.6s both; }
.m-phase span:nth-child(2) { animation-name: phase2; } .m-phase span:nth-child(3) { animation-name: phase3; }
@keyframes phase { 0%, 30% { opacity: 1; } 33%, 100% { opacity: 0; } }
@keyframes phase2 { 0%, 33% { opacity: 0; } 36%, 63% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes phase3 { 0%, 66% { opacity: 0; } 70%, 100% { opacity: 1; } }
.m-done { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 700; }
.m-done .tick { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: #2f9e6f; }
.m-menu { width: 220px; padding: 6px; }
.m-menu div { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; font-weight: 550; }
.m-menu div:hover, .m-menu div.sel { background: var(--a-soft); }
.m-menu .a-label { margin: 6px 9px 2px; }

/* Notes */
.m-notes { display: grid; grid-template-columns: 196px 1fr; gap: 12px; height: 100%; }
.m-list .a-input { height: 28px; margin-bottom: 10px; }
.m-day { margin: 0 0 5px 4px; font-size: 8.5px; font-weight: 800; letter-spacing: .1em; color: var(--a-muted); }
.m-note { padding: 8px 10px; margin-bottom: 4px; border-radius: 10px; border: 1px solid transparent; transition: background .25s; }
.m-note b { display: block; font-size: 11.5px; line-height: 1.3; }
.m-note small { font-size: 9.5px; color: var(--a-accent); }
.m-note.st { background: #fff; border-color: var(--a-line); box-shadow: 0 8px 20px -12px rgba(19, 26, 46, .3); }
.m-detail { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.m-detail .a-h { font-size: 16px; }
.m-tabs { display: inline-flex; padding: 2px; border-radius: 99px; background: #eeedf8; }
.m-tabs span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: 99px; font-size: 10.5px; font-weight: 650; color: var(--a-muted); transition: background .25s; }
.m-tabs span.st { color: var(--a-ink); background: #fff; box-shadow: 0 1px 4px rgba(19, 26, 46, .15); }
.m-empty { display: grid; place-items: center; height: 100%; color: var(--a-muted); }
.m-chat { margin-top: auto; }
.m-bubble { max-width: 82%; margin: 6px 0; padding: 7px 10px; border-radius: 12px; }
.m-bubble.me { margin-left: auto; color: #fff; background: var(--a-ink); border-bottom-right-radius: 4px; }
.m-bubble.ai { background: #f1f0fa; border-bottom-left-radius: 4px; }
.m-bubble em { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 99px; font-style: normal; font-size: 9.5px; color: var(--a-accent); background: #fff; }
.m-doc h4 { margin: 8px 0 4px; font-size: 13px; }
.m-doc p { margin-bottom: 4px; color: #3a405c; }

/* Credits */
.m-shop { width: 470px; }
.m-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.m-plan { position: relative; padding: 12px 10px; border-radius: 12px; border: 1px solid var(--a-line-2); text-align: center; }
.m-plan.hl { border-color: #ef3184; background: rgba(239, 49, 132, .05); }
.m-plan b { display: block; font-size: 12px; }
.m-plan strong { display: block; margin: 4px 0 2px; font-size: 16px; }
.m-plan small { color: var(--a-muted); font-size: 10px; }
.m-plan .tag { position: absolute; top: -8px; left: 50%; padding: 1px 8px; border-radius: 99px; font-size: 9px; font-weight: 700; color: #fff; background: #ef3184; transform: translateX(-50%); white-space: nowrap; }
.m-plan .ph-bar { display: block; height: 14px; margin: 6px auto; width: 70%; border-radius: 4px; background: #ecebf5; }
.m-qr { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.m-qr svg { width: 150px; height: 150px; padding: 8px; border-radius: 12px; border: 1px solid var(--a-line); background: #fff; }
.m-qr b { display: block; font-size: 15px; margin-bottom: 4px; }
.m-bank { display: inline-flex; gap: 6px; margin-top: 10px; }
.m-bank span { padding: 3px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; color: var(--a-accent); background: var(--a-soft); }
.m-acct-pop { left: 12px; bottom: 74px; width: 190px; }

@media (max-width: 1100px) {
  .tut, .tut.flip { grid-template-columns: 1fr; gap: 22px; }
  .tut.flip .tut-stage { order: 0; }
  /* One column: the heading, the mock, then the steps under it */
  .tut-text { display: contents; }
  .tut-head { max-width: 640px; }
  .tut-stage, .tut.flip .tut-stage { order: 1; }
  .tut-steps { order: 2; margin-top: 0; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .tut-tip { order: 3; margin-top: 0; }
}
@media (max-width: 860px) {
  .chapters { grid-template-columns: 1fr; max-width: 420px; gap: 6px; }
  .install-pair { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .guide-hero { padding-top: 40px; }
  .tut-stage { border-radius: 12px; }
  .tut-steps { grid-template-columns: 1fr; }
  .chapters a { padding: 9px 12px; font-size: 14px; }
}
