@charset "utf-8";

/* ════════════════════════════════════════════════════
   教程页：按功能分区，每区先说一句它帮你做什么，
   再是短片（真实录屏，9:16）和其余用法的文字条目。
   版式、颜色沿用 site.css 的纸与墨。
   ════════════════════════════════════════════════════ */

.tut { padding-bottom: clamp(40px, 6vw, 80px); }

/* 分区目录：贴在页头下面，滚动时一直在，当前所在的那一区点亮 */
.tbar {
  position: sticky; top: var(--bar-h, 56px); z-index: 50;
  background: rgba(251, 245, 231, .9);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.tbar-in {
  display: flex; gap: 8px; padding-block: 10px;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
}
.tbar-in::-webkit-scrollbar { display: none; }
.tbar a {
  flex: none; scroll-snap-align: start;
  display: inline-flex; align-items: center; min-height: 36px; padding: 5px 15px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(255, 253, 246, .75); text-decoration: none;
  font-size: .875rem; color: var(--ink-2); white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.tbar a:hover { border-color: var(--ink-3); color: var(--ink); }
.tbar a.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.phero + .tbar { margin-top: -6px; }

/* ── 区块 ─────────────────────────────────────────── */
.tsec { padding: clamp(42px, 6vw, 84px) 0 0; scroll-margin-top: calc(var(--bar-h, 56px) + 58px); }
.tsec + .tsec { border-top: 1px solid var(--line); margin-top: clamp(34px, 5vw, 64px); }
.tsec-hd {
  display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: baseline;
  max-width: 760px; margin-bottom: clamp(20px, 2.6vw, 30px);
}
.tsec-no {
  grid-row: span 2; margin: 0;
  font-family: var(--serif); font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--wax-2);
  letter-spacing: .04em;
}
.tsec-hd h2 { margin: 0; font-size: clamp(1.75rem, 3.2vw, 2.4rem); line-height: 1.25; }
.tsec-intro { margin: .55rem 0 0; color: var(--ink-2); font-size: clamp(.98rem, 1.4vw, 1.06rem); line-height: 1.8; }

.ui { color: var(--wax); white-space: nowrap; }
.pro {
  display: inline-block; margin-left: .4em; padding: 0 .5em;
  border: 1px solid rgba(160, 58, 50, .35); border-radius: 999px;
  font-style: normal; font-size: .68em; font-weight: 600; line-height: 1.6; color: var(--wax);
  vertical-align: .18em;
}

/* ── 短片卡 ───────────────────────────────────────── */
.tfilms {
  display: grid; gap: clamp(16px, 2vw, 26px);
  grid-template-columns: repeat(auto-fill, minmax(208px, 1fr));
}
.tfilm { min-width: 0; scroll-margin-top: calc(var(--bar-h, 56px) + 70px); }
.tfilm-play {
  position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; padding: 0; border: 0;
  border-radius: 20px; overflow: hidden; cursor: pointer;
  background: var(--paper-2);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 18px 34px -24px rgba(51, 40, 28, .55);
  transition: transform .25s ease, box-shadow .25s ease;
}
.tfilm-play:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 26px 40px -24px rgba(51, 40, 28, .6); }
.tfilm-play:focus-visible { outline: 3px solid var(--wax); outline-offset: 3px; }
.tfilm-play img, .tfilm-play video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.tfilm-play video { opacity: 0; transition: opacity .25s ease; }
.tfilm-play.is-live video { opacity: 1; }
.tfilm-dur {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  padding: 2px 9px; border-radius: 999px;
  background: rgba(36, 29, 21, .72); color: #FBF5E7;
  font-size: .75rem; font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.tfilm-play::after {           /* 放大的提示：一个小角标 */
  content: ""; position: absolute; left: 10px; bottom: 10px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(36, 29, 21, .72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M9.5 3H13v3.5M6.5 13H3V9.5M13 3 9 7M3 13l4-4' fill='none' stroke='%23FBF5E7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  opacity: 0; transition: opacity .2s;
}
.tfilm-play:hover::after, .tfilm-play:focus-visible::after { opacity: 1; }
.tfilm h3 { margin: .9rem 0 .25rem; font-size: 1.02rem; line-height: 1.45; font-weight: 600; }
.tfilm p { margin: 0; color: var(--ink-2); font-size: .9rem; line-height: 1.75; }

@media (max-width: 720px) {
  /* 手机上横着一排滑，一屏露一张半 */
  .tfilms {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--pad) * -1); padding: 4px var(--pad) 10px; gap: 14px;
  }
  .tfilms::-webkit-scrollbar { display: none; }
  .tfilm { flex: 0 0 64vw; max-width: 300px; scroll-snap-align: start; }
}

/* ── 其他用法 ─────────────────────────────────────── */
.tmore { margin-top: clamp(28px, 3.6vw, 44px); }
.tmore-t {
  margin: 0 0 14px; font-size: .82rem; font-weight: 600; letter-spacing: .12em; color: var(--ink-3);
}
.titems {
  display: grid; gap: 0 clamp(20px, 3vw, 40px);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  border-top: 1px solid var(--line);
}
.titem { padding: 15px 0 16px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--bar-h, 56px) + 70px); }
.titem h3 { margin: 0 0 .2rem; font-size: .98rem; font-weight: 600; line-height: 1.5; }
.titem p { margin: 0; color: var(--ink-2); font-size: .9rem; line-height: 1.75; }

.is-target { animation: tflash 1.8s ease; border-radius: 14px; }
@keyframes tflash { 0%, 40% { background: rgba(235, 213, 172, .55); } 100% { background: transparent; } }

.tnote { margin-top: clamp(40px, 5vw, 60px); color: var(--ink-3); font-size: .85rem; }

/* ── 放大播放 ─────────────────────────────────────── */
.tplayer {
  width: min(92vw, 980px); max-width: none; max-height: 94vh; padding: 0; border: 0;
  border-radius: 24px; background: var(--paper); color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(20, 14, 8, .6);
}
.tplayer::backdrop { background: rgba(28, 22, 15, .62); backdrop-filter: blur(6px); }
.tplayer-in { position: relative; display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 3vw, 36px); align-items: center; padding: clamp(14px, 2.4vw, 26px); }
.tplayer video {
  display: block; height: min(86vh, 860px); aspect-ratio: 9 / 16; width: auto;
  border-radius: 18px; background: var(--paper-2);
}
.tplayer-copy h2 { margin: 0 0 .6rem; font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.35; }
.tplayer-copy p { margin: 0; color: var(--ink-2); line-height: 1.85; }
.tplayer-x {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--paper-3); color: var(--ink); font-size: 1rem; cursor: pointer;
}
.tplayer-x:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 720px) {
  .tplayer { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .tplayer-in { grid-template-columns: 1fr; align-content: start; padding: 54px 14px 20px; height: 100%; overflow-y: auto; }
  .tplayer video { height: auto; width: min(100%, calc((100dvh - 190px) * 9 / 16)); margin: 0 auto; }
  .tplayer-copy { padding: 0 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .tfilm-play, .tfilm-play video { transition: none; }
  .tfilm-play::after { opacity: 1; }
}
