/* B2 開機視窗（負責：B2 agent）— 手機 x27 y232 336×324；電腦 x450 y214 380×352
   時間軸（皆用 animation-delay 排，fill-mode both，凍結截圖靠 currentTime）：
   200–450 視窗彈出｜250–750 標誌組合（外框→訊息行→夾起重點塊→軌跡）｜560–750 文字標｜750–1300 標誌＋文字標穩定展示
   300/500/700/900 開機紀錄逐行｜300–1050 進度條｜1040–1160 READY：標誌逐格亮兩下、READY 反白後保持洋紅（不遮標誌）｜1300 起交給 B3 退場 */

/* ── 視窗本體：米灰立體斜面＋硬投影 ── */
.boot-win{position:absolute;left:50%;top:calc(50% - 190px);width:336px;margin-left:-168px;min-height:324px;
  box-sizing:border-box;padding:3px;background:var(--chrome);color:var(--ink);
  box-shadow:var(--out),12px 14px 0 rgba(0,0,0,.35);
  transform-origin:50% 50%;animation:bootB2Pop 250ms cubic-bezier(.2,.9,.3,1.25) 200ms both}
@media (min-width:768px){.boot-win{top:calc(50% - 186px);width:380px;margin-left:-190px;min-height:352px}}
@keyframes bootB2Pop{
  0%{opacity:0;transform:scale(.92)}
  25%{opacity:1}
  70%{transform:scale(1.012)}
  100%{opacity:1;transform:scale(1)}
}

/* ── 標題列：全像箔＋掃描線（同 App 的 .titlebar），只有圖示與文字，沒有假按鈕 ── */
.boot-title{position:relative;display:flex;align-items:center;gap:8px;height:30px;padding:0 8px;
  background:var(--foil);background-size:300% 100%;color:#0A0C10;
  animation:bootB2Foil 1.6s linear 0ms both}
.boot-title::after{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,rgba(255,255,255,.2) 0 1px,transparent 1px 3px)}
@keyframes bootB2Foil{from{background-position:0 0}to{background-position:-150% 0}}
.boot-tico{flex:none;width:16px;height:16px;background:#0A0C10;box-shadow:inset 0 0 0 2px #0A0C10,inset 0 0 0 4px var(--neon)}
.boot-title b{font-family:var(--pixel);font-weight:400;font-size:15px;letter-spacing:.08em;line-height:1}
.boot-title span{margin-left:auto;font-family:var(--pixel);font-size:12px;letter-spacing:.06em;color:#1E232A;line-height:1}

/* ── 內容區：依平面圖排間距（手機 12/8/8/8，電腦 14/10/10/10） ── */
.boot-body{padding:12px 15px 0;display:flex;flex-direction:column;align-items:stretch}
/* 電腦版視窗較高：標誌與文字標不動（文字標需避開退場中線 y400），開機紀錄與進度條下移 8px、進度條加高 4px，讓下緣留白和左右一致（約 18px） */
@media (min-width:768px){.boot-body{padding:14px 17px 0}}

/* ── 拾訊標誌（主角）：直接站在米灰視窗上，不加光暈（半透明光暈在灰底上像髒污） ── */
.boot-logo{position:relative;display:block;width:96px;height:96px;margin:0 auto;overflow:visible;
  animation:bootB2LogoFlash 120ms steps(1,end) 1040ms both}
.boot-logo *{transform-box:fill-box}
/* READY 閃光：整個標誌逐格亮兩下（只調亮度＋外圈霓虹光，不蓋住任何部件） */
@keyframes bootB2LogoFlash{
  0%,50%,100%{filter:none}
  25%{filter:brightness(1.3) drop-shadow(0 0 4px rgba(43,246,255,.85))}
  75%{filter:brightness(1.15) drop-shadow(0 0 4px rgba(255,79,216,.7))}
}
/* 1. 對話框外框：250–400ms 整個輪廓一起逐格長大（像素 60%→80%→100%） */
.lg-bub{transform-origin:50% 50%;animation:bootB2Bub 150ms linear 250ms both}
@keyframes bootB2Bub{
  0%{opacity:0;transform:scale(.6)}
  .1%,33%{opacity:1;transform:scale(.6)}
  33.1%,66%{opacity:1;transform:scale(.8)}
  66.1%,100%{opacity:1;transform:scale(1)}
}
/* 2. 三行訊息：380/420/460ms 由左往右打出 */
.lg-ln{transform-origin:0 50%;animation:bootB2Ln 60ms steps(3,end) both}
.lg-ln1{animation-delay:380ms}.lg-ln2{animation-delay:420ms}.lg-ln3{animation-delay:460ms}
@keyframes bootB2Ln{from{transform:scaleX(0)}to{transform:scaleX(1)}}
/* 3. 游標：520ms 出現、閃一下後常亮 */
.lg-cur{animation:bootB2Cur 160ms steps(1,end) 520ms both}
@keyframes bootB2Cur{0%{opacity:0}1%,40%{opacity:1}41%,70%{opacity:0}71%,100%{opacity:1}}
/* 4. 夾娃娃機夾子＋重點塊：480ms 夾子扣住缺角大小的那一塊（縮成 2/3 正好填滿凹槽），
      526–710ms 分 5 格一邊往右上拉起、一邊放大一階到 12×9（硬投影跟著走） */
.lg-piece{transform-box:view-box;transform-origin:0 0;animation:bootB2Piece 230ms linear 480ms both}
@keyframes bootB2Piece{
  0%{opacity:0;transform:translate(3.667px,10px) scale(.6667)}
  .1%{opacity:1;transform:translate(3.667px,10px) scale(.6667)}
  20%{opacity:1;transform:translate(3.667px,10px) scale(.6667);animation-timing-function:steps(5,end)}
  100%{opacity:1;transform:translate(0,0) scale(1)}
}

/* ── 文字標：拾訊（像素大字）＋ SHIXUN（LCD 字），560–750ms 出現 ── */
/* 拾訊 與 SHIXUN 基線對齊；拾訊 只留 1px 白色斜面光，不做錯位重影 */
.boot-brand{display:flex;align-items:baseline;justify-content:center;gap:10px;height:34px;margin-top:8px;padding-top:3px;box-sizing:border-box;white-space:nowrap}
.boot-brand b{font-family:var(--pixel);font-weight:400;font-size:28px;line-height:1;letter-spacing:.12em;margin-right:-.12em;color:var(--ink);
  text-shadow:1px 1px 0 var(--hi);
  animation:bootB2Type 100ms steps(2,end) 560ms both}
.boot-brand i{align-self:center;width:2px;height:22px;box-shadow:inset 1px 0 var(--lo),inset -1px 0 var(--hi);
  animation:bootB2Show 1ms linear 640ms both}
.boot-brand span{font-family:var(--lcdf);font-size:22px;line-height:1;letter-spacing:.18em;margin-right:-.18em;color:#0B2A92;
  animation:bootB2Type 110ms steps(6,end) 640ms both}
@media (min-width:768px){.boot-brand{height:36px;margin-top:10px}.boot-brand b{font-size:30px}.boot-brand span{font-size:24px}}
@keyframes bootB2Type{from{clip-path:inset(-4px 100% -4px 0)}to{clip-path:inset(-4px -6px -4px 0)}}
@keyframes bootB2Show{from{opacity:0}to{opacity:1}}

/* ── 開機紀錄：LCD 面板，4 行 × 18px，300/500/700/900ms 逐行打出 ── */
.boot-log{list-style:none;margin:8px 0 0;padding:5px 10px 5px 12px;height:84px;box-sizing:border-box;position:relative;
  background:var(--lcd);box-shadow:var(--in);font-family:var(--lcdf);font-size:16px;line-height:18px;color:var(--lcd-ink);
  text-shadow:0 0 6px rgba(124,255,233,.55)}
.boot-log::after{content:"";position:absolute;inset:2px;pointer-events:none;background:repeating-linear-gradient(0deg,rgba(0,0,0,.28) 0 1px,transparent 1px 3px)}
.boot-log li{display:flex;justify-content:space-between;align-items:baseline;gap:8px;height:18px;white-space:nowrap;
  animation:bootB2Type 110ms steps(7,end) both}
.boot-log li::before{content:"> ";color:var(--neon-2);opacity:.8;white-space:pre}
.boot-log li span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.boot-log li b{font-weight:400;letter-spacing:.08em;animation:bootB2Show 1ms linear both}
.boot-log [data-line="1"]{animation-delay:300ms}.boot-log [data-line="1"] b{animation-delay:420ms}
.boot-log [data-line="2"]{animation-delay:500ms}.boot-log [data-line="2"] b{animation-delay:620ms}
.boot-log [data-line="3"]{animation-delay:700ms}.boot-log [data-line="3"] b{animation-delay:820ms}
.boot-log [data-line="4"]{animation-delay:900ms}
/* READY：洋紅強調，1050–1150ms 反白閃一下 */
.boot-log [data-line="4"] b{color:var(--neon-2);text-shadow:0 0 6px rgba(255,79,216,.8);padding:0 3px;margin-right:-3px;
  animation:bootB2Show 1ms linear 1000ms both,bootB2Ready 110ms steps(1,end) 1050ms both}
/* 反白一下後回到洋紅發光字，1150–1300ms 清楚可見 */
@keyframes bootB2Ready{0%,50%{background:var(--neon-2);color:var(--lcd);text-shadow:none}51%,100%{background:transparent;color:var(--neon-2);text-shadow:0 0 6px rgba(255,79,216,.8)}}
@media (min-width:768px){.boot-log{margin-top:18px}}

/* ── 進度條：20 格 LCD，300→1050ms 逐格（每格 37.5ms）填滿；右側百分比 ── */
.boot-bar{display:flex;align-items:center;gap:6px;height:26px;margin-top:8px}
@media (min-width:768px){.boot-bar{margin-top:10px;height:30px}}
.boot-cells{flex:1;display:flex;gap:2px;height:100%;padding:4px;box-sizing:border-box;background:var(--lcd);box-shadow:var(--in)}
.boot-cells i{flex:1;background:rgba(124,255,233,.1);animation:bootB2Cell 1ms linear both}
@keyframes bootB2Cell{to{background:var(--lcd-ink);box-shadow:0 0 5px rgba(124,255,233,.7)}}
.boot-cells i:nth-child(1){animation-delay:337ms}.boot-cells i:nth-child(2){animation-delay:375ms}
.boot-cells i:nth-child(3){animation-delay:412ms}.boot-cells i:nth-child(4){animation-delay:450ms}
.boot-cells i:nth-child(5){animation-delay:487ms}.boot-cells i:nth-child(6){animation-delay:525ms}
.boot-cells i:nth-child(7){animation-delay:562ms}.boot-cells i:nth-child(8){animation-delay:600ms}
.boot-cells i:nth-child(9){animation-delay:637ms}.boot-cells i:nth-child(10){animation-delay:675ms}
.boot-cells i:nth-child(11){animation-delay:712ms}.boot-cells i:nth-child(12){animation-delay:750ms}
.boot-cells i:nth-child(13){animation-delay:787ms}.boot-cells i:nth-child(14){animation-delay:825ms}
.boot-cells i:nth-child(15){animation-delay:862ms}.boot-cells i:nth-child(16){animation-delay:900ms}
.boot-cells i:nth-child(17){animation-delay:937ms}.boot-cells i:nth-child(18){animation-delay:975ms}
.boot-cells i:nth-child(19){animation-delay:1012ms}.boot-cells i:nth-child(20){animation-delay:1050ms}
/* 百分比：@property 整數計數；不支援時自訂屬性為離散動畫，會在中途由 0% 跳到 100%，仍合理 */
@property --bootB2Pct{syntax:"<integer>";inherits:false;initial-value:0}
.boot-pct{flex:none;width:52px;height:100%;display:grid;place-items:center;background:var(--lcd);box-shadow:var(--in);
  font-family:var(--lcdf);font-weight:400;font-size:18px;line-height:1;color:var(--lcd-ink);text-shadow:0 0 6px rgba(124,255,233,.6);
  counter-reset:bootpct var(--bootB2Pct);animation:bootB2Pct 750ms steps(20,end) 300ms both}
.boot-pct::after{content:counter(bootpct) "%"}
@keyframes bootB2Pct{from{--bootB2Pct:0}to{--bootB2Pct:100}}

/* 整合：電腦版文字標上移 4px，避開退場中線 y400 */
@media (min-width:768px){.boot-brand{position:relative;top:-4px}}
