/* 教程中心 — Liquid Glass */
body.tutorial-page { min-height: 100vh; }
.tutorial-page .bg-orbs { opacity: .78; }
.tutorial-main { padding: 132px 0 96px; }
.tutorial-shell { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.tutorial-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 30px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.72);
  background: linear-gradient(145deg, rgba(255,255,255,.58), rgba(255,255,255,.28));
  box-shadow: inset 0 1px 0 #fff, 0 24px 60px -28px rgba(40,60,120,.28);
}
.tutorial-header-copy { max-width: 650px; }
.tutorial-eyebrow {
  margin: 0 0 10px;
  color: oklch(0.55 0.16 245);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
}
.tutorial-header h1 {
  margin: 0;
  color: oklch(0.22 0.025 260);
  font-size: 36px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.03em;
}
.tutorial-header p {
  margin: 12px 0 0;
  color: oklch(0.48 0.025 260);
  font-size: 15px;
  line-height: 1.75;
}
.tutorial-types {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background: rgba(255,255,255,.45);
  box-shadow: inset 0 1px 0 #fff;
}
.tutorial-type {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  color: oklch(0.48 0.025 260);
  font-size: 13px;
  font-weight: 600;
  transition: all .25s ease;
}
.tutorial-type.active {
  color: #fff;
  background: linear-gradient(135deg, oklch(0.58 0.17 245), oklch(0.56 0.18 285));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 22px -12px oklch(0.55 0.18 270 / .5);
}

.tutorial-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 28px;
}
.tutorial-sidebar {
  position: sticky;
  top: 108px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.72);
  background: linear-gradient(145deg, rgba(255,255,255,.55), rgba(255,255,255,.28));
  box-shadow: inset 0 1px 0 #fff, 0 20px 48px -28px rgba(40,60,120,.28);
}
.tutorial-menu-group[hidden],
.tutorial-article[hidden] { display: none; }
.tutorial-menu-title {
  margin: 0 0 10px;
  color: oklch(0.58 0.02 260);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}
.tutorial-menu { display: grid; gap: 6px; }
.tutorial-menu-direct { margin-bottom: 10px; }
.tutorial-submenu {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.28);
  margin-bottom: 8px;
  overflow: hidden;
}
.tutorial-submenu[open] {
  background: rgba(255,255,255,.42);
  box-shadow: inset 0 1px 0 #fff;
}
.tutorial-submenu-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  color: oklch(0.32 0.04 260);
  font-size: 13px;
  font-weight: 650;
  user-select: none;
}
.tutorial-submenu-summary::-webkit-details-marker { display: none; }
.tutorial-submenu-summary::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 2px solid oklch(0.55 0.04 260);
  border-bottom: 2px solid oklch(0.55 0.04 260);
  transform: rotate(45deg);
  transition: transform .2s ease;
  flex: none;
  opacity: .7;
}
.tutorial-submenu[open] > .tutorial-submenu-summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.tutorial-submenu-summary em {
  margin-left: auto;
  margin-right: 6px;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .1);
  color: oklch(0.45 0.14 245);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.tutorial-submenu .tutorial-menu {
  padding: 0 8px 8px;
}
.tutorial-submenu-empty {
  margin: 0;
  padding: 8px 10px 4px;
  color: oklch(0.58 0.02 260);
  font-size: 12px;
}
.tutorial-menu button {
  position: relative;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  color: oklch(0.38 0.03 260);
  text-align: left;
  font-size: 13px;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.tutorial-menu button:hover {
  color: oklch(0.42 0.14 245);
  background: rgba(255,255,255,.55);
  transform: translateX(2px);
}
.tutorial-menu button.active {
  color: oklch(0.42 0.14 245);
  background: rgba(255,255,255,.7);
  font-weight: 650;
  box-shadow: inset 0 1px 0 #fff;
}
.tutorial-menu button.active::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, oklch(0.62 0.16 245), oklch(0.58 0.16 285));
}

.tutorial-content {
  min-width: 0;
  padding: 28px 30px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.72);
  background: linear-gradient(145deg, rgba(255,255,255,.58), rgba(255,255,255,.28));
  box-shadow: inset 0 1px 0 #fff, 0 24px 60px -28px rgba(40,60,120,.28);
}
.tutorial-article { animation: tutorialIn .42s cubic-bezier(.22,1,.36,1); }
@keyframes tutorialIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.article-kicker {
  color: oklch(0.52 0.16 245);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
}
.tutorial-article h2 {
  margin: 8px 0 0;
  color: oklch(0.22 0.025 260);
  font-size: 28px;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -.025em;
}
.article-lead {
  max-width: 720px;
  margin: 12px 0 0;
  color: oklch(0.48 0.025 260);
  font-size: 15px;
  line-height: 1.8;
}
.article-meta {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(40,60,120,.08);
  color: oklch(0.58 0.02 260);
  font-size: 12px;
}
.tutorial-section { margin-top: 30px; }
.tutorial-section h3 {
  margin: 0 0 12px;
  color: oklch(0.24 0.025 260);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.02em;
}
.tutorial-section p {
  margin: 0;
  color: oklch(0.45 0.025 260);
  font-size: 14px;
  line-height: 1.85;
}
/* 正文图片：按真实比例展示，限制最大宽高，避免小图被拉满 */
.tutorial-section img,
.tutorial-section p > img {
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  max-height: min(420px, 56vh);
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 16px auto;
  border-radius: 14px;
  background: rgba(255, 255, 255, .4);
  box-shadow: inset 0 1px 0 #fff, 0 10px 28px -18px rgba(40, 60, 120, .28);
}
.tutorial-section img.tutorial-img-wide {
  max-width: 100%;
  max-height: min(480px, 62vh);
}
.tutorial-video {
  position: relative;
  width: min(100%, 720px);
  margin: 16px auto;
  border-radius: 16px;
  overflow: hidden;
  background: #0b1220;
  box-shadow: 0 16px 36px -22px rgba(15, 23, 42, .45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tutorial-video video {
  width: 100% !important;
  height: auto !important;
  max-height: min(480px, 62vh);
  display: block;
  object-fit: contain;
  background: #000;
  vertical-align: middle;
}
.tutorial-video-toggle {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 68px;
  height: 68px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(.96);
  background: rgba(15, 23, 42, .58);
  box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255,255,255,.2);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.tutorial-video-toggle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
  transform: translate(-40%, -50%);
}
.tutorial-video.is-paused .tutorial-video-toggle {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.tutorial-video.is-playing .tutorial-video-toggle {
  opacity: 0;
  pointer-events: none;
}
.tutorial-video.is-paused:hover .tutorial-video-toggle,
.tutorial-video-toggle:hover {
  background: rgba(37, 99, 235, .82);
}
.tutorial-steps { display: grid; gap: 16px; margin-top: 16px; }
.tutorial-step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.tutorial-step > i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: oklch(0.48 0.16 245);
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: inset 0 1px 0 #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}
.tutorial-step h4 {
  margin: 3px 0 5px;
  color: oklch(0.26 0.025 260);
  font-size: 14px;
  font-weight: 650;
}
.tutorial-step p { font-size: 13px; }
.tutorial-figure {
  margin: 22px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  background: rgba(255,255,255,.45);
  box-shadow: inset 0 1px 0 #fff;
}
.tutorial-figure img {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  object-position: top;
}
.tutorial-figure figcaption {
  padding: 12px 16px;
  border-top: 1px solid rgba(40,60,120,.08);
  color: oklch(0.55 0.02 260);
  font-size: 12px;
}
.tutorial-note {
  margin-top: 22px;
  padding: 16px 18px;
  border-left: 3px solid oklch(0.58 0.16 245);
  border-radius: 0 16px 16px 0;
  color: oklch(0.4 0.03 260);
  background: rgba(255,255,255,.5);
  border-top: 1px solid rgba(255,255,255,.65);
  border-right: 1px solid rgba(255,255,255,.65);
  border-bottom: 1px solid rgba(255,255,255,.65);
  font-size: 13px;
  line-height: 1.7;
}
.tutorial-code {
  margin-top: 14px;
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: 16px;
  color: #dce9f7;
  background: linear-gradient(160deg, #1a2738, #243447);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  font-family: ui-monospace, SFMono-Regular, Consolas, Monaco, monospace;
  font-size: 12px;
  line-height: 1.7;
}
.tutorial-empty-hint {
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid rgba(40,60,120,.08);
  color: oklch(0.58 0.02 260);
  font-size: 12px;
}

@media (max-width: 767px) {
  .tutorial-main { padding-top: 108px; }
  .tutorial-header { align-items: stretch; flex-direction: column; padding: 22px; }
  .tutorial-header h1 { font-size: 28px; }
  .tutorial-types { width: 100%; }
  .tutorial-type { flex: 1; }
  .tutorial-layout { grid-template-columns: 1fr; gap: 18px; }
  .tutorial-sidebar { position: static; }
  .tutorial-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tutorial-menu button { min-height: 44px; }
  .tutorial-content { padding: 22px 18px; }
  .tutorial-article h2 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .tutorial-article { animation: none; }
}
