/* 播放台嵌在卷纸内，尺寸随版心缩放，控制按钮保持独立触控面积。 */
.lesson-demo {
  container-type:inline-size;
  box-sizing:border-box;
  margin:clamp(18px,2vw,32px) 0 4px;
  padding:clamp(9px,1vw,15px);
  background:#181b1f;
  border:1px solid #a3adb664;
  border-bottom:3px solid #08090a;
  box-shadow:2px 5px 0 #07090c73;
  color:#f1f3f4;
  font-family:var(--zh-sans,"PingFang SC","Microsoft YaHei",sans-serif);
  text-shadow:none;
}
.lesson-demo-head {display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 9px}
.lesson-demo-title {font-size:clamp(16px,1.4vw,22px);font-weight:650;line-height:1.45;color:#f8f9fa}
.lesson-demo-time {flex:none;font:500 12px/1 ui-monospace,"SFMono-Regular",monospace;color:#bac3cb;white-space:nowrap;font-variant-numeric:tabular-nums}
.lesson-demo-monitor {position:relative;width:100%;aspect-ratio:64/27;overflow:hidden;background:#20252a}
.lesson-demo-canvas {display:block;width:100%;height:100%}
.lesson-demo-caption {margin:9px 0 12px;color:#e2e6e9;font-size:clamp(15px,1.08vw,18px);line-height:1.58;text-shadow:none;letter-spacing:.012em}
.lesson-demo-controls {display:flex;align-items:center;flex-wrap:wrap;gap:5px 12px;border-top:1px solid #88939c58;padding-top:5px}
.lesson-demo-controls button {box-sizing:border-box;border:0;background:none;color:#c8cfd4;cursor:pointer;font:inherit;line-height:1.28;touch-action:manipulation}
.lesson-demo-controls button:focus-visible {outline:2px solid var(--roll-accent,#dbe6ee);outline-offset:1px}
.lesson-demo-play {min-height:36px;display:inline-flex;align-items:center;gap:7px;padding:5px 7px 5px 3px;font-size:15px!important;font-weight:650!important;color:#eaf0f4!important}
.lesson-demo-icon {display:inline-block;flex:none;width:12px;height:13px;box-sizing:border-box;background:currentColor;clip-path:polygon(14% 0,98% 50%,14% 100%)}
.lesson-demo-play[data-playing="true"] .lesson-demo-icon {clip-path:polygon(0 0,34% 0,34% 100%,66% 100%,66% 0,100% 0,100% 100%,0 100%)}
.lesson-demo-steps {display:flex;flex:1;min-width:min(100%,185px);gap:3px}
.lesson-demo-step {min-height:36px;position:relative;flex:1;min-width:0;padding:6px 4px 7px!important;font-size:clamp(14px,1vw,17px)!important;text-align:center;overflow-wrap:anywhere}
.lesson-demo-step::after {content:"";height:2px;background:#4c565e;position:absolute;inset:auto 2px 0}
.lesson-demo-step:hover,.lesson-demo-step[aria-pressed="true"] {color:#f8f9fa}
.lesson-demo-step[aria-pressed="true"]::after {background:var(--roll-accent,#cedae4)}
@container (max-width:370px) {
  .lesson-demo-head {gap:5px;align-items:center}
  .lesson-demo-title {font-size:16px}
  .lesson-demo-time {font-size:10px}
  .lesson-demo-controls {column-gap:4px}
  .lesson-demo-caption {font-size:15px}
  .lesson-demo-play,.lesson-demo-step {min-height:42px}
}
