:root {
  color-scheme: light;
  --bg: #f5f8fc;
  --card: #ffffff;
  --text: #17243a;
  --muted: #65748b;
  --line: #dbe5f1;
  --blue: #3478f6;
  --blue-dark: #2462d5;
  --blue-soft: #edf5ff;
  --amber: #f59e0b;
  --amber-soft: #fff8e8;
  --shadow: 0 14px 38px rgba(30, 68, 120, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 50% -20%, #fff 0, var(--bg) 38rem);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.reading-progress { position: fixed; z-index: 100; inset: 0 0 auto; height: 4px; background: rgba(52, 120, 246, .1); }
.reading-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #5d9bff, var(--blue)); transition: width .12s linear; }
.site-header {
  position: sticky; top: 4px; z-index: 90; width: min(100% - 24px, 720px); height: 58px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; padding: 0 18px;
  background: rgba(255,255,255,.86); border: 1px solid rgba(219,229,241,.9); border-top: 0; border-radius: 0 0 18px 18px;
  box-shadow: 0 8px 28px rgba(34,67,110,.08); backdrop-filter: blur(16px);
}
.brand { color: var(--blue); font-size: 23px; font-weight: 850; font-style: italic; letter-spacing: -.8px; }
.menu-button { width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.menu-button span { width: 22px; height: 2px; border-radius: 9px; background: var(--text); transition: .2s ease; }
.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { position: absolute; top: 66px; left: 0; right: 0; display: none; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.mobile-menu.open { display: grid; }
.mobile-menu a { min-height: 46px; display: flex; align-items: center; padding: 0 14px; border-radius: 10px; color: var(--muted); font-weight: 650; }
.mobile-menu a:active { background: var(--blue-soft); color: var(--blue); }

.page-shell { width: min(100% - 28px, 720px); margin: 22px auto 0; }
.breadcrumb { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 13px; margin: 8px 2px 18px; }
.breadcrumb a:hover { color: var(--blue); }
.article-header h1 { margin: 0; font-size: clamp(30px, 8.7vw, 46px); line-height: 1.18; letter-spacing: -1.4px; }
.meta { margin: 16px 0 22px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; color: var(--muted); font-size: 13px; }
.meta > span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.category-pill { color: var(--blue) !important; border: 1px solid #bcd4ff; background: var(--blue-soft); border-radius: 999px; padding: 5px 12px; font-weight: 750; }
.hero { position: relative; margin: 0; height: clamp(210px, 60vw, 350px); overflow: hidden; border-radius: 20px; background: #e9eef4; box-shadow: var(--shadow); }
.hero img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 60% center; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,28,49,.6), rgba(13,28,49,.02) 62%); }
.hero figcaption { position: absolute; z-index: 1; left: 20px; bottom: 20px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.hero figcaption span { display: inline-block; margin-bottom: 7px; color: #15233b; background: rgba(255,255,255,.88); border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; text-shadow: none; }
.hero figcaption strong { display: block; font-size: clamp(24px, 7vw, 39px); line-height: 1.08; letter-spacing: -.8px; }
.lead { color: #52627a; font-size: 17px; line-height: 1.85; margin: 22px 2px; }

.prep-card, .toc-card, .step-card, .completion-card { border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.prep-card { padding: 20px; background: linear-gradient(145deg, #f8fbff, var(--blue-soft)); border-color: #cfe1ff; }
.section-heading { display: flex; align-items: center; gap: 12px; }
.section-heading h2, .section-heading { margin: 0; font-size: 19px; font-weight: 820; }
.heading-icon { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 10px; font-weight: 900; }
.list-icon { color: var(--blue); background: var(--blue-soft); font-size: 25px; line-height: 1; }
.prep-card ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; color: #55667e; }
.prep-card li { display: flex; gap: 11px; align-items: flex-start; line-height: 1.5; }
.prep-card li span { flex: 0 0 22px; height: 22px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 50%; font-size: 12px; margin-top: 1px; }
.toc-card { margin: 18px 0; padding: 10px 18px 16px; }
.toc-toggle { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.chevron { font-size: 20px; transition: transform .2s ease; }
.toc-toggle[aria-expanded="false"] .chevron { transform: rotate(180deg); }
.toc-card ol { list-style: none; margin: 3px 0 0; padding: 0; display: grid; gap: 4px; }
.toc-card li a { min-height: 43px; display: flex; align-items: center; gap: 12px; padding: 4px 6px; border-radius: 10px; color: #52627a; }
.toc-card li a:hover { background: var(--blue-soft); color: var(--blue); }
.toc-card li span { width: 34px; height: 30px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); border-radius: 999px; font-weight: 800; font-size: 12px; }

.steps { display: grid; gap: 20px; }
.step-card { padding: 20px; scroll-margin-top: 82px; outline: none; }
.step-title { display: flex; gap: 14px; align-items: flex-start; }
.step-title > span { flex: 0 0 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-size: 18px; font-weight: 900; }
.step-title h2 { margin: 1px 0 4px; font-size: 22px; letter-spacing: -.4px; }
.step-title p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.demo-frame { display: grid; place-items: center; min-height: 280px; margin: 22px 0 18px; padding: 18px; background: linear-gradient(150deg, #f8fbff, #eef4fb); border: 1px solid #e0e8f2; border-radius: 16px; overflow: hidden; }
.login-visual, .phone-visual, .success-visual { width: min(100%, 340px); padding: 24px 20px; text-align: center; background: #fff; border: 1px solid #dce5f0; border-radius: 24px; box-shadow: 0 16px 28px rgba(28,60,100,.09); }
.muse-logo { display: flex; justify-content: center; align-items: center; gap: 9px; font-size: 22px; }
.muse-logo > span, .app-mark { display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #8b5cf6, #2fd0ca); clip-path: polygon(50% 0, 100% 100%, 0 100%); font-size: 11px; font-weight: 900; }
.muse-logo > span { width: 34px; height: 31px; }
.login-visual > p, .phone-visual > p, .success-visual > p { color: var(--muted); margin: 8px 0 17px; font-size: 13px; }
.login-visual label { min-height: 44px; display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 0 12px; color: #7a899c; border: 1px solid #d8e2ef; border-radius: 9px; text-align: left; font-size: 13px; }
.login-visual label span { flex: 1; }
.login-visual label i { width: 24px; height: 24px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 50%; font-style: normal; font-weight: 800; }
.login-visual button { width: 100%; height: 44px; margin-top: 12px; color: #fff; background: linear-gradient(135deg, #3f86ff, #276cec); border: 0; border-radius: 9px; font-weight: 800; }
.phone-visual { position: relative; padding-top: 16px; }
.phone-top { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; margin-bottom: 20px; }
.app-mark { width: 42px; height: 38px; margin: 0 auto 8px; }
.code { margin: 16px 0 12px; font-size: 34px; font-weight: 850; letter-spacing: 4px; color: #24324a; }
.timer { height: 5px; background: #e7edf5; border-radius: 9px; overflow: hidden; }
.timer span { display: block; width: 62%; height: 100%; background: var(--blue); border-radius: inherit; }
.phone-visual small { display: block; margin-top: 9px; color: #8794a5; }
.otp { display: flex; justify-content: center; gap: 6px; }
.otp span { width: 35px; height: 42px; display: grid; place-items: center; border: 1px solid #cfdced; border-radius: 8px; font-weight: 850; font-size: 17px; }
.success-ring { width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #42d392, #1caf72); border-radius: 50%; font-size: 31px; box-shadow: 0 10px 22px rgba(28,175,114,.2); }
.success-visual > strong { font-size: 21px; }
.account-row { display: flex; gap: 10px; align-items: center; padding: 12px; text-align: left; border: 1px solid #e0e8f2; border-radius: 12px; }
.account-row i { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(145deg, #d8e8ff, #78a8ff); }
.account-row span { display: grid; }
.account-row b { font-size: 12px; }
.account-row small { color: var(--muted); margin-top: 3px; }
.instruction-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.instruction-list li { display: flex; gap: 10px; color: #4f6078; line-height: 1.55; }
.instruction-list li > span { flex: 0 0 24px; height: 24px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 50%; font-size: 12px; font-weight: 800; }
.instruction-list p { margin: 0; }
.notice { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin-top: 18px; padding: 14px; color: #7a5b1a; background: var(--amber-soft); border: 1px solid #f7cf77; border-radius: 12px; }
.notice strong { display: flex; gap: 7px; align-items: center; color: #e58b00; }
.notice strong span { width: 22px; height: 22px; display: grid; place-items: center; color: #fff; background: var(--amber); border-radius: 50%; }
.notice p { margin: 0; font-size: 13px; line-height: 1.55; }

.faq-section { padding: 42px 0 14px; }
.eyebrow { margin: 0 0 5px; color: var(--blue); font-size: 13px; font-weight: 800; }
.faq-section > h2 { margin: 0 0 16px; font-size: 28px; }
.faq-section details { margin: 10px 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 8px 25px rgba(30,68,120,.05); }
.faq-section summary { min-height: 58px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 17px; cursor: pointer; font-weight: 750; list-style: none; }
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary span { color: var(--blue); font-size: 23px; font-weight: 400; transition: transform .2s; }
.faq-section details[open] summary span { transform: rotate(45deg); }
.faq-section details p { margin: 0; padding: 0 17px 17px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.completion-card { display: flex; gap: 14px; align-items: center; padding: 18px; margin: 12px 0 22px; }
.completion-mark { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: #20b67a; border-radius: 50%; font-weight: 900; }
.completion-card strong { font-size: 17px; }
.completion-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.step-nav { position: fixed; z-index: 80; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 24px), 696px); height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 8px; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 40px rgba(28,56,98,.17); backdrop-filter: blur(16px); }
.step-nav button { height: 46px; border: 1px solid #d5e0ed; border-radius: 11px; background: #fff; color: #52627a; font-weight: 750; cursor: pointer; }
.step-nav button:disabled { opacity: .45; cursor: default; }
.step-nav .primary { color: #fff; background: linear-gradient(135deg, #4287ff, #276cec); border-color: transparent; }
.step-nav span { min-width: 42px; color: var(--muted); font-size: 12px; text-align: center; }

@media (min-width: 760px) {
  body { padding-bottom: 100px; }
  .page-shell { margin-top: 34px; }
  .article-header h1 { max-width: 620px; }
  .prep-card, .toc-card, .step-card { padding-left: 28px; padding-right: 28px; }
  .hero figcaption { left: 32px; bottom: 30px; }
  .step-card { padding-top: 28px; padding-bottom: 28px; }
  .notice { grid-template-columns: 112px 1fr; align-items: center; }
}

@media (max-width: 390px) {
  .page-shell { width: min(100% - 20px, 720px); }
  .site-header { width: calc(100% - 16px); }
  .article-header h1 { font-size: 29px; }
  .hero { height: 220px; }
  .hero figcaption strong { font-size: 24px; }
  .step-card, .prep-card { padding: 17px; }
  .demo-frame { margin-left: -4px; margin-right: -4px; padding: 12px; }
  .notice { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Tutorial collection */
.collection-header { position: relative; top: 0; width: min(100% - 28px, 1180px); margin-top: 4px; }
.header-link { min-height: 42px; display: flex; align-items: center; padding: 0 14px; color: var(--muted); background: var(--blue-soft); border-radius: 11px; font-size: 13px; font-weight: 750; }
.collection-shell { width: min(100% - 28px, 1180px); margin: 0 auto; }
.collection-hero { padding: clamp(62px, 10vw, 118px) 0 42px; text-align: center; }
.hero-kicker { display: inline-flex; color: var(--blue); background: var(--blue-soft); border: 1px solid #d1e2ff; border-radius: 999px; padding: 7px 12px; font-size: 11px; font-weight: 850; letter-spacing: 1.2px; }
.collection-hero h1 { margin: 16px 0 10px; font-size: clamp(43px, 8vw, 72px); line-height: 1; letter-spacing: -3px; }
.collection-hero > p { max-width: 580px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.75; }
.search-box { width: min(100%, 580px); height: 62px; display: flex; align-items: center; gap: 12px; margin: 30px auto 0; padding: 0 18px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.search-box svg { width: 20px; fill: none; stroke: #63748c; stroke-width: 1.8; stroke-linecap: round; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; }
.search-box a { width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); background: #edf2f8; border-radius: 50%; font-size: 20px; }
.collection-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.collection-toolbar strong { color: var(--text); font-size: 18px; }
.tutorial-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.tutorial-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 35px rgba(30,68,120,.07); transition: transform .2s ease, box-shadow .2s ease; }
.tutorial-card:hover { transform: translateY(-5px); box-shadow: 0 20px 45px rgba(30,68,120,.13); }
.card-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #e9eef5; }
.card-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(14,27,49,.24)); }
.card-cover img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease; }
.tutorial-card:hover .card-cover img { transform: scale(1.04); }
.card-cover > span { position: absolute; z-index: 1; left: 14px; bottom: 12px; color: #fff; background: rgba(36,98,213,.9); border-radius: 999px; padding: 5px 10px; font-size: 11px; font-weight: 800; }
.card-body { flex: 1; display: flex; flex-direction: column; padding: 20px; }
.card-body time { color: #8592a4; font-size: 11px; font-family: ui-monospace, monospace; }
.card-body h2 { margin: 10px 0 8px; font-size: 20px; line-height: 1.35; letter-spacing: -.35px; }
.card-body p { display: -webkit-box; margin: 0 0 18px; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.read-more { margin-top: auto; padding-top: 15px; border-top: 1px solid #edf1f6; color: #5b6b82; font-size: 13px; font-weight: 750; }
.read-more b { display: inline-block; margin-left: 5px; color: var(--blue); transition: transform .2s; }
.tutorial-card:hover .read-more b { transform: translateX(4px); }
.site-footer { padding: 55px 20px 90px; color: #8a96a7; font-size: 12px; text-align: center; }
.empty-state { padding: 90px 20px; text-align: center; background: #fff; border: 1px dashed #cfdbea; border-radius: 20px; }
.empty-state > span { color: var(--blue); font-size: 45px; }
.empty-state h2 { margin: 12px 0 5px; }
.empty-state p { color: var(--muted); }

/* Tutorial detail additions */
.detail-hero img { object-position: center; }
.detail-hero figcaption { max-width: 72%; }
.detail-hero figcaption strong { font-size: clamp(22px, 6vw, 34px); }
.step-image { margin: 22px 0 18px; overflow: hidden; background: #eef3f8; border: 1px solid #e0e8f2; border-radius: 16px; text-align: center; }
.step-image img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.step-copy { color: #4f6078; font-size: 16px; line-height: 1.8; }
.back-collection { min-height: 48px; display: flex; align-items: center; justify-content: center; margin: 18px 0 30px; color: var(--blue); background: var(--blue-soft); border: 1px solid #cfe1ff; border-radius: 13px; font-weight: 800; }
.learning-cta { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 16px; align-items: center; margin: 22px 0 34px; padding: 24px; overflow: hidden; color: #fff; background: linear-gradient(135deg,#2367e5,#4a8bff); border-radius: 20px; box-shadow: 0 18px 40px rgba(35,103,229,.22); }
.learning-cta::after { content:""; position:absolute; width:180px; height:180px; right:-70px; top:-90px; border:28px solid rgba(255,255,255,.08); border-radius:50%; pointer-events:none; }
.learning-cta-icon { position:relative; z-index:1; width:48px; height:48px; display:grid; place-items:center; color:#2868dc; background:#fff; border-radius:15px; font-size:22px; box-shadow:0 8px 20px rgba(13,45,105,.18); }
.learning-cta > div:nth-child(2) { position:relative; z-index:1; }
.learning-cta span { display:block; margin-bottom:5px; color:#dce9ff; font-size:11px; font-weight:850; letter-spacing:.5px; }
.learning-cta h2 { margin:0 0 5px; color:#fff; font-size:21px; letter-spacing:-.3px; }
.learning-cta p { margin:0; color:#e8f0ff; font-size:13px; line-height:1.55; }
.learning-cta > a { position:relative; z-index:1; min-height:44px; display:flex; align-items:center; gap:7px; padding:0 15px; color:#2367e5; background:#fff; border-radius:11px; font-size:13px; font-weight:850; white-space:nowrap; }
.learning-cta > a b { transition:transform .2s; }
.learning-cta > a:hover b { transform:translateX(3px); }
.related-tutorials { margin: 0 0 28px; }
.related-heading { display:flex; align-items:end; justify-content:space-between; gap:18px; margin-bottom:14px; }
.related-heading span { color:var(--blue); font-size:11px; font-weight:850; letter-spacing:.8px; }
.related-heading h2 { margin:4px 0 0; font-size:26px; letter-spacing:-.6px; }
.related-heading > a { color:var(--blue); font-size:12px; font-weight:800; }
.related-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.related-card { min-width:0; overflow:hidden; background:#fff; border:1px solid var(--line); border-radius:15px; box-shadow:0 9px 26px rgba(30,68,120,.06); transition:transform .2s,box-shadow .2s; }
.related-card:hover { transform:translateY(-3px); box-shadow:0 15px 30px rgba(30,68,120,.12); }
.related-card > img { width:100%; aspect-ratio:16/9; display:block; object-fit:cover; background:#e8eef5; }
.related-card > div { padding:13px; }
.related-card span { display:inline-flex; margin-bottom:7px; padding:3px 7px; color:var(--blue); background:var(--blue-soft); border-radius:999px; font-size:9px; font-weight:850; }
.related-card h3 { min-height:42px; margin:0 0 5px; font-size:14px; line-height:1.45; }
.related-card p { display:-webkit-box; min-height:35px; margin:0 0 12px; overflow:hidden; color:var(--muted); font-size:11px; line-height:1.55; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.related-card b { color:var(--blue); font-size:11px; }

@media (max-width: 900px) { .tutorial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) {
  .tutorial-grid { grid-template-columns: 1fr; gap: 16px; }
  .collection-hero { padding-top: 52px; }
  .collection-hero h1 { letter-spacing: -2px; }
  .collection-toolbar { padding: 0 2px; }
  .card-body { padding: 18px; }
  .tutorial-card { border-radius: 17px; }
  .detail-hero figcaption { max-width: 86%; }
  .learning-cta { grid-template-columns:auto minmax(0,1fr); padding:19px; }
  .learning-cta > a { grid-column:1/-1; justify-content:center; }
  .learning-cta h2 { font-size:19px; }
  .related-grid { grid-template-columns:1fr; }
  .related-card { display:grid; grid-template-columns:110px minmax(0,1fr); }
  .related-card > img { width:110px; height:100%; aspect-ratio:auto; }
  .related-card h3,.related-card p { min-height:0; }
}
