/* /help —— 教程视频页。颜色、字体、圆角全用 shared.css 的 token。
   shared.css 把 body 收在 480px（app 是手机形状）；这一页在电脑上也会被打开
   （老师多半在电脑上看），所以放宽到 1040。 */
body.help-page { max-width: none; margin: 0; background: var(--bg); color: var(--text); }

/* ── 头部 ── */
.hp-hero { background: var(--primary-deep); color: #fff;
  border-radius: 0 0 var(--radius-header) var(--radius-header); }
.hp-hero-in { max-width: 1040px; margin: 0 auto; padding: 8px 16px 20px; }
.hp-back { display: inline-flex; align-items: center; min-height: 44px;
  color: var(--on-dark-muted); font-size: 14px; text-decoration: none; }
.hp-back:hover { color: #fff; }
.hp-brand { display: flex; align-items: center; gap: 8px; margin-top: 4px;
  font-weight: 600; color: var(--on-dark-soft); }
.hp-leaf { width: 34px; height: 34px; border-radius: var(--radius-sm); display: inline-flex;
  align-items: center; justify-content: center; background: var(--primary-light); color: var(--primary); }
.hp-hero h1 { font-family: var(--font-display); font-size: 34px; line-height: 1.1;
  margin: 16px 0 8px; letter-spacing: -0.01em; }
.hp-lede { margin: 0 0 20px; color: var(--on-dark-soft); font-size: 16px; line-height: 1.5; max-width: 560px; }

.hp-switch { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--radius-btn);
  background: var(--on-dark-fill); }
.hp-switch button { min-height: 44px; padding: 0 20px; border: 0; border-radius: var(--radius-btn);
  font: 600 15px var(--font-body); color: var(--on-dark-soft); background: transparent; cursor: pointer; }
.hp-switch button[aria-selected="true"] { background: #fff; color: var(--primary-deep); }
.hp-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── 列表 ── */
.hp-main { max-width: 1040px; margin: 0 auto; padding: 20px 16px 8px; }
.hp-intro { margin: 0 0 16px; color: var(--text-secondary); font-size: 15px; line-height: 1.5; }
.hp-empty { padding: 20px; border-radius: var(--radius-card); background: var(--card);
  color: var(--text-secondary); text-align: center; }
.hp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px;
  grid-template-columns: 1fr; }

.hp-card-btn { width: 100%; display: flex; align-items: stretch; gap: 12px; padding: 8px;
  border: 0; border-radius: var(--radius-card); background: var(--card); box-shadow: var(--shadow-md);
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  transition: transform .15s, box-shadow .15s; }
.hp-card-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.hp-card-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.hp-thumb { position: relative; flex: 0 0 88px; aspect-ratio: 9 / 16; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--primary-deep); }
.hp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-play { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-md); }
.hp-play::after { content: ""; position: absolute; left: 14px; top: 11px;
  border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--primary); }
.hp-dur { position: absolute; right: 5px; bottom: 5px; padding: 1px 6px; border-radius: 6px;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; font-weight: 600; }

.hp-card-body { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 4px 4px 4px 0; min-width: 0; }
.hp-num { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-light); color: var(--accent-deep);
  font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.hp-card-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.2; }
.hp-card-sum { color: var(--text-secondary); font-size: 14px; line-height: 1.4; }

.hp-more { margin: 20px 0 0; padding: 16px 20px; border-radius: var(--radius-card);
  background: var(--primary-light); }
.hp-more h2 { font-family: var(--font-display); font-size: 17px; margin: 0 0 4px; }
.hp-more p { margin: 0; color: var(--text-body); line-height: 1.5; }
.hp-more a { color: var(--primary); font-weight: 600; }
/* 加到主屏幕（用户 2026-09-28）：两个平台并排，窄屏叠成一列 */
.hp-install { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.hp-install-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.hp-install h3 { font-size: 15px; margin: 0 0 4px; }
.hp-install ol { margin: 0; padding-left: 20px; color: var(--text-body); line-height: 1.55; }

.hp-foot { max-width: 1040px; margin: 0 auto; padding: 20px 16px 40px;
  text-align: center; color: var(--text-secondary); font-size: 13px; }
.hp-foot p { margin: 0 0 4px; }
.hp-foot a { color: var(--text-secondary); }
.hp-foot-sub { font-size: 12px; }

/* ── 自述卡 ── 两个标签上方都在；一张横卡 + 可展开的全文 */
.hp-note { margin: 0 0 20px; border-radius: var(--radius-card); background: var(--card);
  box-shadow: var(--shadow-md); overflow: hidden; }
.hp-note-play { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 0; background: var(--accent-light); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.hp-note-play:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.hp-note-play img { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 3px #fff, var(--shadow-md); }
.hp-note-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hp-note-kicker { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); font-weight: 700; }
.hp-note-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.2; }
.hp-note-sum { font-size: 14px; color: var(--text-secondary); line-height: 1.4; }
.hp-note-dur { font-variant-numeric: tabular-nums; }
.hp-note-icon { position: relative; left: auto; top: auto; margin: 0; flex: 0 0 40px; width: 40px; height: 40px; }
.hp-note-icon::after { left: 15px; top: 13px; }
.hp-note-text { padding: 0 20px; }
.hp-note-text summary { min-height: 48px; display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-weight: 600; color: var(--primary); list-style: none; }
.hp-note-text summary::-webkit-details-marker { display: none; }
.hp-note-text summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
/* 展开 / 收起两种说法 + 一个会翻转的箭头：看得出它还能再点一次 */
.hp-when-open, .hp-note-text[open] .hp-when-closed { display: none; }
.hp-note-text[open] .hp-when-open { display: inline; }
.hp-chev { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.hp-note-text[open] .hp-chev { transform: translateY(2px) rotate(-135deg); }
.hp-note-close { min-height: 44px; padding: 0 18px; border: 1px solid var(--border); border-radius: var(--radius-btn);
  background: var(--card); color: var(--primary); font: 600 14px var(--font-body); cursor: pointer; }
.hp-note-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.hp-note-text[open] { padding-bottom: 12px; }
.hp-note-text p, .hp-note-text li { color: var(--text-body); font-size: 15px; line-height: 1.6; max-width: 65ch; }
.hp-note-text p { margin: 0 0 12px; }            /* shared.css 把段落间距清零了；长文要空行才读得下去 */
.hp-note-text ul { padding-left: 20px; margin: 0 0 12px; }
.hp-note-text li { margin-bottom: 6px; }
.hp-note-sign { font-weight: 600; color: var(--text); }

/* ── 播放层 ── 手机：整屏一页，视频在上、步骤在下 */
.hp-player { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0;
  border: 0; background: var(--primary-deep); color: #fff; }
.hp-player::backdrop { background: rgba(16, 32, 15, .72); }
.hp-player-in { height: 100%; display: flex; flex-direction: column; }
.hp-player-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 12px 16px 8px; }
.hp-player-kicker { font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--on-dark-muted); font-weight: 600; }
.hp-player-title { font-family: var(--font-display); font-size: 21px; line-height: 1.2; margin: 2px 0 0; }
.hp-close { flex: 0 0 44px; height: 44px; border: 0; border-radius: 50%; background: var(--on-dark-fill);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.hp-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hp-player-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.hp-video-wrap { display: flex; justify-content: center; padding: 0 16px; }
/* 列宽跟着视频的 9:16 走：控制条有自己的最小宽度，不锁列宽的话会把视频撑宽、两边出黑边 */
.hp-video-col { --vh: 58vh; display: flex; flex-direction: column; gap: 8px;
  width: min(100%, calc(var(--vh) * 9 / 16)); }
.hp-video-wrap video { width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: var(--radius-sm);
  background: #000; cursor: pointer; display: block; }
/* 自己的控制条：在视频下面，不盖画面（原生那条正好压住烧进去的字幕） */
.hp-ctrl { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hp-ctrl-btn { flex: 0 0 40px; height: 40px; border: 0; border-radius: 50%; background: var(--on-dark-fill);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.hp-ctrl-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#hp-pp .hp-i-pause, #hp-pp.playing .hp-i-play { display: none; }
#hp-pp.playing .hp-i-pause { display: block; }
#hp-mute .hp-i-muted, #hp-mute.muted .hp-i-vol { display: none; }
#hp-mute.muted .hp-i-muted { display: block; }
.hp-seek { flex: 1; min-width: 40px; accent-color: var(--accent); height: 24px; cursor: pointer; }
.hp-time { flex: 0 0 auto; font-size: 12px; color: var(--on-dark-muted); font-variant-numeric: tabular-nums; }
.hp-steps-wrap { padding: 16px; }
.hp-steps-wrap h3 { font-family: var(--font-display); font-size: 16px; margin: 0; }
.hp-steps-hint { margin: 2px 0 8px; font-size: 13px; color: var(--on-dark-muted); }
.hp-steps { list-style: none; margin: 0; padding: 0; }
.hp-step { width: 100%; display: flex; gap: 12px; align-items: baseline; min-height: 44px;
  padding: 8px 12px; border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--on-dark-soft); font: 15px/1.4 var(--font-body); text-align: left; cursor: pointer; }
.hp-step:hover { background: var(--on-dark-fill); }
.hp-step.on { background: rgba(255, 255, 255, .16); color: #fff; }
.hp-step:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hp-step-t { flex: 0 0 36px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--on-dark-muted); }
.hp-next { margin-top: 16px; min-height: 48px; width: 100%; padding: 0 20px; border: 0;
  border-radius: var(--radius-btn); background: var(--accent); color: #fff; font: 600 15px var(--font-body);
  cursor: pointer; box-shadow: var(--shadow-accent-sm); }

/* ── 宽屏 ── 卡片三列；播放层变成居中的一张，视频在左、步骤在右 */
@media (min-width: 640px) {
  .hp-list { grid-template-columns: 1fr 1fr; }
  .hp-hero h1 { font-size: 44px; }
}
@media (min-width: 900px) {
  .hp-list { grid-template-columns: 1fr 1fr 1fr; }
  .hp-card-btn { flex-direction: column; padding: 12px; }
  .hp-thumb { flex: none; width: 100%; aspect-ratio: 4 / 3; }
  .hp-thumb img { object-position: 50% 30%; }
  .hp-card-body { padding: 0 4px 4px; }

  .hp-player { width: min(980px, 94vw); height: min(860px, 92vh); margin: auto;
    border-radius: var(--radius-card); box-shadow: var(--shadow-xl); }
  .hp-player-top { padding: 16px 20px 8px; }
  .hp-player-body { flex-direction: row; overflow: hidden; }
  .hp-video-wrap { padding: 0 0 20px 20px; align-items: flex-start; }
  .hp-video-col { --vh: calc(min(860px, 92vh) - 160px); }
  .hp-steps-wrap { flex: 1; overflow-y: auto; padding: 0 20px 20px; }
}
