@charset "UTF-8";
/* ==========================================================================
   6. 直式加減法概念學習教室 (VERTICAL CALCULATION LAB)
   ========================================================================== */
/* ==========================================================================
   直式加減法教室 (VERTICAL MATH & CONCEPT LAB)
   ========================================================================== */
.calc-section{
  margin-top: 10px;
}
.calc-header{
  text-align: center;
  margin-bottom: 24px;
}
.calc-header h2{
  font-size: 30px;
  margin: 0 0 6px;
  color: var(--ink);
}
.calc-header p.sub{
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 15px;
}

/* 運算模式切換：加法 vs 減法 */
.calc-type-tabs{
  display: inline-flex;
  gap: 10px;
  background: var(--surface-dim);
  padding: 6px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  margin-bottom: 16px;
  box-shadow: 2px 2px 0 var(--shadow-ink);
}
.calc-type-btn{
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: transparent;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .2s ease;
}
.calc-type-btn.active{
  background: var(--card);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--shadow-ink);
}

/* 範例選擇 Chip 列 */
.calc-presets-bar{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.preset-label{
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}
.preset-chips{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.preset-chip{
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
}
.preset-chip:hover{
  background: var(--surface-dim);
  transform: translateY(-1px);
}
.preset-chip.active{
  background: var(--ink);
  color: var(--bg);
}

/* 自訂算式抽屜 */
.calc-custom-drawer{
  margin: 12px auto 20px;
  max-width: 500px;
  animation: panelFadeIn .2s ease-out;
}
.custom-inputs-card{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 14px 20px;
  box-shadow: 3px 3px 0 var(--shadow-ink);
  flex-wrap: wrap;
}
.custom-field{
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
}
.custom-field input{
  width: 78px;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  background: var(--surface);
  color: var(--ink);
  font-family: "Baloo 2", sans-serif;
  transition: all .15s ease;
}
.custom-field input:focus{
  outline: none;
  border-color: #f39c12;
  box-shadow: 0 0 0 3.5px rgba(243, 156, 18, 0.28);
  background: #fff;
}
.custom-field input.input-error{
  border-color: var(--bad);
  background: #fef2f2;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}
.custom-op-symbol{
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
}
.custom-hint-line{
  width: 100%;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* 主雙欄舞台 */
.calc-dual-stage{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-bottom: 22px;
}
@media (max-width: 880px){
  .calc-dual-stage{
    grid-template-columns: 1fr;
  }
}

.calc-stage-card{
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-hard);
  position: relative;
}
.stage-title-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--line);
}
.stage-title{
  font-size: 18px;
  font-weight: 900;
  font-family: "ZCOOL KuaiLe", "Noto Sans TC", sans-serif;
  color: var(--ink);
}
.stage-badge{
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
}
.badge-concrete{
  background: var(--o-soft);
  color: var(--o-color-dark);
}
.badge-abstract{
  background: var(--t-soft);
  color: var(--t-color-dark);
}

/* ---------- 左側：積木具體操作舞台 ---------- */
.calc-blocks-stage{
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.calc-block-row{
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 2px 2px 0 var(--shadow-ink);
  transition: all .25s ease;
}
.calc-block-row.active-row{
  border-color: #2b6ef2;
  box-shadow: 0 0 0 2px #2b6ef2, 3px 3px 0 var(--shadow-ink);
}
.block-row-label{
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.block-row-content{
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  flex-wrap: wrap;
}
.block-col-group{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.block-col-title{
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}
.block-col-title.t-title{ background: var(--t-soft); color: var(--t-color-dark); }
.block-col-title.o-title{ background: var(--o-soft); color: var(--o-color-dark); }
.block-items-wrap{
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* 符號分隔線 */
.calc-block-divider{
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-weight: 800;
  font-size: 14px;
  padding: 2px 8px;
}
.divider-symbol{
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
}



/* ---------- 右側：小學作業簿直式算則 (結構化極致穩定版) ---------- */
.vertical-math-board{
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 8px;
}
.vm-notebook{
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  padding: 24px 30px;
  box-shadow: 4px 4px 0 var(--shadow-ink);
  position: relative;
  user-select: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}

.vm-table{
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: fit-content;
}

/* 行容器 (固定佈局) */
.vm-row{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 48px;
}
.vm-row-header{
  height: 30px;
  margin-bottom: 2px;
}
.vm-row-mark{
  height: 32px;
}
.vm-row-num{
  height: 48px;
}
.vm-row-ans{
  height: 54px;
  margin-top: 2px;
}

/* 單元格 (固定寬度與不壓縮 flex-shrink: 0，確保垂直絕對對齊) */
.vm-cell{
  width: 64px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-family: "Baloo 2", "Noto Sans TC", sans-serif;
  font-size: 38px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  flex-shrink: 0;
  transition: background-color .2s ease;
}
.vm-cell.vm-cell-op{
  width: 44px;
  font-size: 28px;
  font-weight: 900;
  color: var(--ink);
  flex-shrink: 0;
}

/* 當前計算欄位高亮光暈 (以欄位加底色，不更動排版) */
.vm-cell-o.active-col{
  background: var(--o-soft);
  border-radius: 10px;
}
.vm-cell-t.active-col{
  background: var(--t-soft);
  border-radius: 10px;
}
.vm-cell-h.active-col{
  background: var(--h-soft);
  border-radius: 10px;
}

/* 位值欄位標頭 (百、十、個) */
.vm-col-badge{
  font-size: 13px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 8px;
  text-align: center;
  display: inline-block;
  line-height: 1.2;
}
.vm-col-badge.h-badge{
  background: var(--h-soft);
  color: var(--h-color-dark);
  border: 1.5px solid var(--h-color-dark);
}
.vm-col-badge.t-badge{
  background: var(--t-soft);
  color: var(--t-color-dark);
  border: 1.5px solid var(--t-color-dark);
}
.vm-col-badge.o-badge{
  background: var(--o-soft);
  color: var(--o-color-dark);
  border: 1.5px solid var(--o-color-dark);
}

/* 進退位標記格內部元素 */
.vm-carry-badge{
  width: 25px; height: 25px;
  border-radius: 50%;
  background: #f39c12;
  color: #fff;
  font-size: 14.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(243,156,18,.45);
  animation: popScale .3s ease-out;
  font-family: "Baloo 2", sans-serif;
}
.vm-borrow-tag{
  background: var(--h-soft);
  color: var(--h-color-dark);
  border: 1.5px solid var(--h-color-dark);
  font-size: 12.5px;
  font-weight: 800;
  border-radius: 6px;
  padding: 2px 5px;
  animation: popScale .3s ease-out;
  font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.vm-borrow-tag.rem-mark{
  background: #fef3c7;
  color: #b45309;
  border-color: #f59e0b;
  font-weight: 900;
}

/* 數字單元格與退位劃斜線 */
.vm-num-box{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.vm-num-box.slashed,
.vm-num-box.is-slashed{
  color: #94a3b8 !important;
}
.vm-num-box.is-slashed::after{
  content: '';
  position: absolute;
  width: 115%;
  height: 3.5px;
  background: #ef4444;
  border-radius: 999px;
  top: 50%;
  left: -7%;
  transform: rotate(-35deg);
  transform-origin: center;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.45);
  pointer-events: none;
  animation: vmSlashIn .22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes vmSlashIn{
  from{
    opacity: 0;
    transform: scaleX(0.1) rotate(-35deg);
  }
  to{
    opacity: 1;
    transform: scaleX(1) rotate(-35deg);
  }
}
.vm-slash-stroke{
  position: absolute;
  top: 50%; left: 18%;
  width: 64%;
  height: 3.5px;
  background: var(--bad);
  transform: translateY(-50%) rotate(-35deg);
  border-radius: 2px;
  pointer-events: none;
}

/* 直式等號橫線 */
.vm-divider-row{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 0 4px;
}
.vm-divider-line{
  width: 100%;
  height: 3.5px;
  background: var(--ink);
  border-radius: 2px;
}

/* 答案欄單元格 */
.vm-cell-ans{
  font-family: "Baloo 2", "Noto Sans TC", sans-serif;
  font-size: 40px;
  font-weight: 900;
  color: #2b6ef2;
  line-height: 1;
}
.vm-cell-ans.revealed{
  animation: popScale .25s cubic-bezier(.34,1.56,.64,1);
}
.vm-ans-placeholder{
  width: 34px; height: 34px;
  border: 2px dashed var(--line-strong, rgba(51,43,34,.25));
  border-radius: 8px;
}
.vm-grid > *:not([class*="vm-highlight-col"]) {
  z-index: 1;
}

/* ---------- 步驟引導控制器 ---------- */
.calc-stepper-card{
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-card);
  padding: 18px 24px;
  box-shadow: var(--shadow-hard);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 頂部操作列：步驟標籤置左、控制按鈕置右，高度與位置絕對固定 */
.stepper-header-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--line-strong, rgba(51,43,34,.14));
  flex-wrap: wrap;
}

.stepper-step-pill{
  padding: 6px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: 0.5px;
  box-shadow: 2px 2px 0 var(--shadow-ink);
}

/* 控制按鈕組：鎖定最小寬度與高度，避免文字與圖示變化導致晃動 */
.stepper-controls{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stepper-controls .ghost-btn,
.stepper-controls .primary-btn{
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 800;
  padding: 8px 16px;
}

#step-prev-btn{
  min-width: 98px;
}
#step-replay-btn{
  min-width: 108px;
}
#step-auto-btn{
  min-width: 112px;
}
#step-next-btn{
  min-width: 112px;
}

/* 下方內容解說與互動引導區 */
.stepper-content-body{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stepper-explanation-row{
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 46px; /* 保障兩行文字的穩定展示空間，避免單/雙行文字切換微震 */
}

.stepper-explanation{
  flex: 1;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.55;
}
.stepper-explanation em{
  font-style: normal;
  color: #2b6ef2;
  font-weight: 900;
}

/* 互動操作提示列 (進位/借位重點引導) */
.stepper-interactive-prompt{
  background: var(--surface-dim);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 2px 2px 0 var(--shadow-ink);
}
.prompt-btn{
  padding: 8px 20px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #f39c12;
  color: #fff;
  font-weight: 900;
  font-size: 14.5px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--shadow-ink);
  transition: all .15s ease;
}
.prompt-btn:hover{
  transform: translateY(-2px);
}
.prompt-btn.borrow-btn{
  background: var(--bad, #e8604c);
}

@media (max-width: 680px){
  .stepper-header-row{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .stepper-step-pill{
    align-self: flex-start;
  }
  .stepper-controls{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .stepper-controls .ghost-btn,
  .stepper-controls .primary-btn{
    min-width: 0;
    width: 100%;
    font-size: 13.5px;
    padding: 8px 6px;
  }
}

/* 核心概念小卡 */
.calc-concept-notes{
  margin-top: 10px;
}
.concept-note-box{
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 3px 3px 0 var(--shadow-ink);
}
.concept-note-box .note-icon{
  font-size: 24px;
  line-height: 1;
}
.concept-note-box h4{
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}
.concept-note-box p{
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

@keyframes popScale{
  0%{ transform: scale(.4); opacity: 0; }
  70%{ transform: scale(1.15); }
  100%{ transform: scale(1); opacity: 1; }
}

/* Anime.js 補間飛躍元素 */
.anime-carry-flyer{
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.55), 0 0 0 3px rgba(255,255,255,0.8);
  font-family: "Baloo 2", sans-serif;
  transform: translate(-50%, -50%);
}

.anime-borrow-flyer{
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.55), 0 0 0 2px rgba(255,255,255,0.8);
  font-family: "Baloo 2", sans-serif;
  transform: translate(-50%, -50%);
}

/* ---------- 積木操作台即時物理級動態演繹 (Anime.js 動畫增強) ---------- */

/* 1. 加法：滿十聚攏發光標記 */
.blk-gather-target{
  outline: 2.5px solid #f59e0b !important;
  outline-offset: 2px;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.75), 0 2px 6px rgba(0,0,0,0.15) !important;
  animation: blkGatherPulse 0.6s infinite alternate ease-in-out;
  position: relative;
  z-index: 10;
}

@keyframes blkGatherPulse{
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.15) translateY(-2px); filter: brightness(1.25); }
}

/* 2. 減法：借出來源積木鎖定浮起 */
.blk-borrow-source{
  outline: 3px solid #3b82f6 !important;
  outline-offset: 3px;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.8), 0 4px 8px rgba(0,0,0,0.2) !important;
  animation: blkBorrowFloat 0.7s infinite alternate ease-in-out;
  position: relative;
  z-index: 12;
}

@keyframes blkBorrowFloat{
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-4px) scale(1.08); }
}

/* 3. 飛行中的積木元素 (Flyer) */
.blk-anim-flyer{
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.28));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
}

/* 4. 裂解噴發小白方塊 (Shards) */
.blk-split-shard{
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
  transform-origin: center center;
}

/* 5. 減法成對扣除消去動畫 */
.blk-deducting{
  position: relative;
  pointer-events: none;
}
.blk-deducting::after{
  content: '';
  position: absolute;
  top: 50%; left: -10%; width: 120%; height: 3px;
  background: #ef4444;
  border-radius: 2px;
  transform: translateY(-50%) rotate(-25deg);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
  animation: blkSlashLine 0.25s ease-out forwards;
}

@keyframes blkSlashLine{
  0% { transform: translateY(-50%) rotate(-25deg) scaleX(0); }
  100% { transform: translateY(-50%) rotate(-25deg) scaleX(1); }
}

.blk-deduct-flyout{
  animation: blkDeductFlyout 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes blkDeductFlyout{
  0% { opacity: 1; transform: scale(1) translateY(0); }
  40% { opacity: 0.9; transform: scale(1.15) translateY(-8px) rotate(8deg); }
  100% { opacity: 0; transform: scale(0.4) translateY(-36px) translateX(24px) rotate(20deg); }
}

/* 6. 落地爆破光芒 (Land Burst) */
.blk-burst-glow{
  position: fixed;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.2);
  pointer-events: none;
  z-index: 99998;
  opacity: 0.9;
  animation: blkBurstAnim 0.5s ease-out forwards;
}

@keyframes blkBurstAnim{
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0.95; }
  60% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

/* 操作台鎖定遮罩（動畫播放中防狂點錯亂） */
.calc-stage-animating{
  pointer-events: none !important;
  user-select: none !important;
}

/* ---------- 跨欄位同頻焦點高亮 (Cross-Highlighting) ---------- */
.block-col-group{
  transition: all .28s cubic-bezier(0.3, 0.8, 0.2, 1);
  padding: 4px 6px;
  border-radius: 10px;
}
.block-col-group.active-col-group{
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
}
.block-col-group.active-col-group.col-focus-o{
  box-shadow: 0 0 0 2.5px #f59e0b, 0 6px 16px rgba(245, 158, 11, 0.22);
}
.block-col-group.active-col-group.col-focus-t{
  box-shadow: 0 0 0 2.5px #10b981, 0 6px 16px rgba(16, 185, 129, 0.22);
}
.block-col-group.active-col-group.col-focus-h{
  box-shadow: 0 0 0 2.5px #3b82f6, 0 6px 16px rgba(59, 130, 246, 0.22);
}

/* 滑鼠 Hover 右側直式數字格時，左側積木欄位浮起呼應 */
.block-col-group.blk-hover-highlight{
  transform: translateY(-4px) scale(1.05) !important;
  box-shadow: 0 0 0 3px #6366f1, 0 8px 20px rgba(99, 102, 241, 0.3) !important;
  z-index: 20;
}

/* ---------- 加法滿十收納框 (Ten-Frame 集合圈) ---------- */
.blk-ten-frame-box{
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 10px 8px;
  border: 2.5px dashed #f59e0b;
  border-radius: 12px;
  background: rgba(254, 243, 199, 0.6);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
  position: relative;
  margin: 6px 0 2px;
  animation: blkTenFramePulse 1.2s infinite alternate ease-in-out;
}

@keyframes blkTenFramePulse{
  0% { transform: scale(1); box-shadow: 0 0 12px rgba(245, 158, 11, 0.3); }
  100% { transform: scale(1.02); box-shadow: 0 0 22px rgba(245, 158, 11, 0.6); }
}

.ten-frame-badge{
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.6);
  letter-spacing: 0.5px;
  white-space: nowrap !important;
  user-select: none;
  pointer-events: none;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

/* ---------- 減法「劃掉扣除」紅斜線打叉效果（積木不消失，保留在畫面上） ---------- */
.blk-slash-crossed{
  position: relative !important;
  display: inline-block;
  opacity: 0.45;
  filter: grayscale(0.25);
  transition: opacity 0.25s ease, filter 0.25s ease;
}
.blk-slash-crossed::after{
  content: '';
  position: absolute;
  top: 50%;
  left: -12%;
  width: 124%;
  height: 3.5px;
  background: #ef4444;
  border-radius: 999px;
  transform: translateY(-50%) rotate(-30deg);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.9);
  animation: blkSlashSlash 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  z-index: 15;
}

@keyframes blkSlashSlash{
  0% { transform: translateY(-50%) rotate(-30deg) scaleX(0); opacity: 0; }
  100% { transform: translateY(-50%) rotate(-30deg) scaleX(1); opacity: 1; }
}

/* ---------- 加法進位長條特別標示 (Carried Block Highlight - 靜態清晰不晃動) ---------- */
.blk-carried{
  position: relative !important;
  border-radius: 6px;
  outline: 2.5px solid #f59e0b !important;
  outline-offset: 2px;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45) !important;
  transform: none !important;
}

.carried-tag-pill{
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 1.5px 7px;
  border-radius: 999px;
  border: 1px solid #ffffff;
  box-shadow: 0 2px 5px rgba(245, 158, 11, 0.5);
  white-space: nowrap !important;
  letter-spacing: 0.5px;
  z-index: 25;
  pointer-events: none;
  line-height: 1.2;
}

/* 確保積木容器頂部有合適餘裕，避免進位標籤遮擋到欄位標題 */
.block-col-group .block-items-wrap{
  margin-top: 6px;
}




