/* 建筑 X 光 · 界面样式：深色磨砂面板 + 青绿强调色；只保留“步骤卡 + 时间轴 + 图例 + 标注”，突出当前搭建步骤 */
:root {
  --accent: #8fd6cb;
  --panel: rgba(24, 28, 30, 0.74);
  --panel-line: rgba(255, 255, 255, 0.08);
  --text: #f1f4f4;
  --dim: rgba(241, 244, 244, 0.58);
  --font: "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b1f22; color: var(--text); font-family: var(--font); overscroll-behavior: none; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#app { position: fixed; left: 0; top: 0; overflow: hidden; transform-origin: 0 0; background: #c4c7c9; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud button, #hud .tl { pointer-events: auto; font-family: inherit; }
body.noui #hud, body.noui .labels { display: none; }

/* 左上：步骤卡（当前搭建步骤是画面上最显眼的文字） */
.stepcard { position: absolute; left: 26px; top: 24px; width: min(420px, 30%); min-width: 300px; padding: 18px 22px 22px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--panel-line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
.brand { font-size: 12px; letter-spacing: 0.38em; font-weight: 600; color: var(--dim); }
.brand b { color: var(--accent); }
.brand .ver { margin-left: 10px; font-weight: 400; letter-spacing: 0.05em; font-size: 0.85em; opacity: 0.45; }
.meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; font-size: 13px; color: var(--dim); }
.meta em { font-style: normal; font-size: 10.5px; letter-spacing: 0.22em; margin-left: 8px; opacity: 0.75; }
.meta .no b { color: var(--accent); font-size: 17px; margin: 0 2px; }
.body { margin-top: 8px; will-change: transform, opacity; }
.big { font-size: 40px; font-weight: 600; line-height: 1.15; letter-spacing: 0.02em; }
.sid { display: inline-block; font-size: 16px; font-weight: 600; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 8px; margin-right: 14px; vertical-align: 12px;
  background: rgba(143, 214, 203, 0.16); color: var(--accent); }
.en { margin-top: 4px; font-size: 12px; letter-spacing: 0.3em; color: var(--dim); }
.prog { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.dots { display: flex; gap: 7px; flex: none; }
.dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.45); }
.dots i.done { background: rgba(255, 255, 255, 0.72); border-color: transparent; }
.dots i.cur { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px rgba(143, 214, 203, 0.85); }
.sbar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.sbar i { display: block; height: 100%; width: 0; background: var(--accent); }
.say { margin-top: 14px; font-size: 17px; line-height: 1.75; color: rgba(241, 244, 244, 0.92); }

/* 序幕（全貌介绍 → 转场说明）：和步骤叠在同一格里交叉淡入淡出，卡片高度取两者较高的，换场不跳 */
.stage { display: grid; }
.stage > *, .pre > * { grid-area: 1 / 1; }
.pre { display: grid; align-self: center; margin-top: 10px; }
.pv { opacity: 0; will-change: transform, opacity; }
.kick { font-size: 12px; font-weight: 600; letter-spacing: 0.24em; color: var(--accent); }
.ptitle { margin-top: 10px; font-size: 26px; font-weight: 600; line-height: 1.3; word-break: keep-all; text-wrap: balance; }   /* 只在数据里的零宽空格处换行 */
.psub { margin-top: 12px; font-size: 16.5px; line-height: 1.75; color: rgba(241, 244, 244, 0.86); }

/* 左下：系统图例（设备阶段，让开时间轴） */
.legend { position: absolute; left: 24px; bottom: 112px; padding: 14px 18px 12px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 14px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; transform: translateY(8px); }
.legend .lt { font-size: 11px; letter-spacing: 0.3em; color: var(--dim); margin-bottom: 8px; }
.legend .li { font-size: 13px; line-height: 26px; white-space: nowrap; }
.legend .li i { display: inline-block; width: 22px; height: 3px; border-radius: 2px; margin-right: 10px; vertical-align: middle; }
.legend .li span { margin-left: 8px; font-size: 11px; color: var(--dim); }

/* 底部：时间轴（当前步骤那一段高亮） */
.tl { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(1180px, calc(100% - 48px)); display: flex; align-items: center; gap: 18px;
  padding: 12px 22px 14px 16px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 18px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.play { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22); background: transparent; cursor: pointer; position: relative; }
.play::before, .play::after { content: ""; position: absolute; top: 14px; width: 4px; height: 14px; background: var(--text); border-radius: 1px; }
.play::before { left: 15px; } .play::after { left: 22px; }
.play.paused::before { left: 16px; top: 13px; width: 0; height: 0; background: none; border-left: 13px solid var(--text); border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-radius: 0; }
.play.paused::after { display: none; }
.tlr { flex: 1; min-width: 0; }
.names { position: relative; height: 22px; }
.pname { position: absolute; top: 0; height: 22px; padding: 0 0 0 4px; text-align: left; background: none; border: 0; color: var(--dim); font-size: 12.5px; letter-spacing: 0.08em; cursor: pointer; white-space: nowrap; overflow: hidden; }
.pname span { opacity: 0.6; margin-right: 2px; }
.pname em { display: none; font-style: normal; font-size: 10px; letter-spacing: 0.18em; margin-left: 6px; opacity: 0.6; text-transform: uppercase; }
.pname.on { color: var(--text); }
.pname.on em { display: inline; }
.pname.pre { padding-left: 2px; letter-spacing: 0.02em; }
.track { position: relative; height: 24px; margin-top: 4px; cursor: pointer; touch-action: none; }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 1px; background: rgba(255, 255, 255, 0.22); }
.curseg { position: absolute; top: 8px; height: 7px; border-radius: 4px; background: rgba(143, 214, 203, 0.28); }
.fill { position: absolute; left: 0; top: 11px; height: 1px; background: rgba(255, 255, 255, 0.85); }
.tick { position: absolute; top: 8px; width: 1px; height: 7px; background: rgba(255, 255, 255, 0.35); }
.tick.major { top: 3px; height: 17px; background: rgba(255, 255, 255, 0.6); }
.playhead { position: absolute; top: 3px; width: 2px; height: 18px; margin-left: -1px; background: #e5fbf9; box-shadow: 0 0 10px 2px rgba(143, 230, 220, 0.75); }
.playhead::after { content: ""; position: absolute; left: -5px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #effffd; box-shadow: 0 0 14px 4px rgba(143, 230, 220, 0.8); }
.readout { flex: none; width: 104px; text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }

/* 讲解 / 背景音乐开关（时间轴左侧，播放键旁边）：关掉时变灰、加一道斜线 */
.sndbox { display: flex; gap: 6px; flex: none; margin-left: -6px; }
.snd { width: 34px; height: 34px; flex: none; padding: 7px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.16); background: transparent; color: var(--accent); cursor: pointer; }
.snd svg { display: block; width: 100%; height: 100%; }
.snd .x { display: none; }
.snd.off { color: var(--dim); }
.snd.off .x { display: inline; }
.snd.off .w { display: none; }

/* 讲解逐句高亮（读到哪句，哪句亮；课件同款，颜色换成本页的青绿） */
::highlight(narr) { background-color: rgba(143, 214, 203, 0.32); color: #ffffff; }

/* 开场“开始”按钮：浏览器要求点一下才能出声 */
.startov { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 18px; pointer-events: auto; cursor: pointer;
  background: radial-gradient(circle at 50% 50%, rgba(18, 22, 24, 0.32), rgba(18, 22, 24, 0) 55%); }
.startov.show { display: flex; }
.startbtn { position: relative; width: 96px; height: 96px; border: 0; border-radius: 50%; background: var(--accent); cursor: pointer;
  box-shadow: 0 0 0 10px rgba(143, 214, 203, 0.22), 0 12px 40px rgba(0, 0, 0, 0.3); animation: startpulse 2.2s ease-in-out infinite; }
.startbtn i { position: absolute; left: 38px; top: 30px; width: 0; height: 0; border-left: 30px solid #12302c; border-top: 18px solid transparent; border-bottom: 18px solid transparent; }
@keyframes startpulse { 50% { box-shadow: 0 0 0 18px rgba(143, 214, 203, 0.1), 0 12px 40px rgba(0, 0, 0, 0.3); } }
.starttxt { padding: 10px 20px 11px; border-radius: 14px; background: var(--panel); border: 1px solid var(--panel-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 18px; font-weight: 600; letter-spacing: 0.04em; text-align: center; }
.starttxt small { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 400; letter-spacing: 0.02em; color: var(--dim); }
.readout small { color: var(--dim); font-size: 11px; }

/* 3D 标注：深色圆角小卡 + 细白引线 + 圆点（当前步骤全亮，之前的变暗） */
.labels { position: absolute; inset: 0; pointer-events: none; }
.labels svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.labels line { stroke: #ffffff; stroke-width: 1.1; opacity: 0; }
.labels circle { fill: #ffffff; opacity: 0; }
.card { position: absolute; left: 0; top: 0; padding: 7px 12px 8px; border-radius: 7px; background: rgba(40, 44, 46, 0.9); border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; white-space: nowrap; will-change: transform, opacity; }
.card b { display: block; font-size: 14px; font-weight: 600; color: #f6f8f8; }
.card small { display: block; font-size: 12px; color: rgba(241, 244, 244, 0.66); margin-top: 2px; }
.card em { display: block; font-style: normal; font-size: 10.5px; letter-spacing: 0.04em; color: rgba(241, 244, 244, 0.42); margin-top: 3px; }

/* 紧凑模式：手机横屏（高度约 390）——步骤卡仍然最大最醒目，其余收小 */
#app.compact .stepcard { left: 10px; top: 8px; width: min(310px, 37%); min-width: 230px; padding: 10px 13px 13px; border-radius: 13px; }
#app.compact .brand { font-size: 9.5px; letter-spacing: 0.3em; }
#app.compact .meta { margin-top: 5px; font-size: 10.5px; }
#app.compact .meta em { display: none; }
#app.compact .meta .no b { font-size: 13px; }
#app.compact .body { margin-top: 4px; }
#app.compact .big { font-size: 25px; }
#app.compact .sid { font-size: 11px; padding: 2px 6px; border-radius: 6px; margin-right: 9px; vertical-align: 5px; }
#app.compact .en { font-size: 9px; letter-spacing: 0.22em; margin-top: 2px; }
#app.compact .prog { margin-top: 7px; gap: 9px; }
#app.compact .dots { gap: 5px; } #app.compact .dots i { width: 7px; height: 7px; }
#app.compact .say { margin-top: 7px; font-size: 13px; line-height: 1.6; }
#app.compact .pre { margin-top: 7px; }
#app.compact .kick { font-size: 9.5px; letter-spacing: 0.18em; }
#app.compact .ptitle { margin-top: 5px; font-size: 19px; }
#app.compact .psub { margin-top: 6px; font-size: 12.5px; line-height: 1.6; }
#app.compact .legend { left: auto; right: 10px; bottom: 60px; padding: 8px 10px 6px; border-radius: 10px; }
#app.compact .legend .lt { font-size: 9px; margin-bottom: 4px; }
#app.compact .legend .li { font-size: 10.5px; line-height: 17px; }
#app.compact .legend .li span { display: none; }
#app.compact .legend .li i { width: 14px; margin-right: 6px; }
#app.compact .tl { bottom: 8px; width: calc(100% - 20px); padding: 6px 12px 7px 8px; gap: 10px; border-radius: 13px; }
#app.compact .play { width: 30px; height: 30px; }
#app.compact .play::before, #app.compact .play::after { top: 9px; height: 11px; width: 3px; }
#app.compact .play::before { left: 10px; } #app.compact .play::after { left: 16px; }
#app.compact .play.paused::before { left: 11px; top: 8px; width: 0; height: 0; border-left-width: 10px; border-top-width: 6px; border-bottom-width: 6px; }
#app.compact .names { height: 15px; }
#app.compact .pname { height: 15px; font-size: 10px; letter-spacing: 0.04em; }
#app.compact .pname.on em { display: none; }
#app.compact .track { height: 18px; margin-top: 2px; }
#app.compact .track::before, #app.compact .fill { top: 8px; }
#app.compact .curseg { top: 6px; height: 5px; }
#app.compact .tick { top: 6px; height: 5px; } #app.compact .tick.major { top: 2px; height: 13px; }
#app.compact .playhead { top: 2px; height: 14px; } #app.compact .playhead::after { top: 2px; width: 10px; height: 10px; left: -4px; }
#app.compact .readout { width: 64px; font-size: 11px; } #app.compact .readout small { display: none; }
#app.compact .sndbox { gap: 4px; margin-left: -4px; }
#app.compact .snd { width: 28px; height: 28px; padding: 5px; }
#app.compact .startbtn { width: 70px; height: 70px; }
#app.compact .startbtn i { left: 28px; top: 22px; border-left-width: 22px; border-top-width: 13px; border-bottom-width: 13px; }
#app.compact .starttxt { font-size: 14.5px; padding: 7px 14px 8px; border-radius: 11px; }
#app.compact .starttxt small { font-size: 10.5px; }
#app.compact .card { padding: 4px 8px 5px; border-radius: 6px; }
#app.compact .card b { font-size: 11.5px; } #app.compact .card small { font-size: 10px; margin-top: 1px; } #app.compact .card em { display: none; }

body.qa *, body.qa .card { transition: none !important; }
