/* Onshape 平台主題色 — 藍綠（Onshape 品牌色）*/
.onshape-theme {
  --primary: #0091BD;
  --primary-dark: #006B8C;
  --primary-light: #E0F4FA;
  --primary-glow: rgba(0,145,189,.3);
  --accent: #F59E0B;
  --accent-light: #FEF3C7;
}
.onshape-theme .brand .logo {
  filter: drop-shadow(0 2px 4px rgba(0,145,189,.4));
}
.onshape-theme .hero h2 {
  background: linear-gradient(135deg, #1a1a1a 30%, #0091BD 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero 區 3D 立方體插圖 */
.hero-os {
  width: 100%;
  max-width: 540px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.12));
  animation: slow-float 6s ease-in-out infinite;
}

/* YouTube 影片嵌入 */
.os-video-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.os-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 影片標籤 */
.os-video-label {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

/* 8 步驟卡片 */
.os-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.os-step {
  background: linear-gradient(180deg, #fff, #fafafa);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  position: relative;
  transition: transform .15s;
}
.os-step:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.os-step .os-num {
  position: absolute; top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--primary); color: #fff;
  width: 30px; height: 30px; line-height: 30px;
  border-radius: 50%; font-weight: 700; font-size: 14px;
}
.os-step svg { width: 100%; max-width: 140px; height: 80px; margin: 8px auto 6px; display: block; }
.os-step h4 { font-size: 15px; margin: 4px 0; }
.os-step p { font-size: 12px; color: var(--text-soft); line-height: 1.6; margin: 0; }

/* 4 種建模方式 */
.os-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.os-method {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  transition: all .15s;
  cursor: pointer;
}
.os-method:hover { border-color: var(--primary); transform: translateY(-2px); }
.os-method.active { border-color: var(--primary); background: var(--primary-light); }
.os-method .os-method-icon { font-size: 36px; margin-bottom: 8px; }
.os-method h4 { font-size: 16px; margin: 6px 0; }
.os-method p { font-size: 13px; color: var(--text-soft); line-height: 1.6; margin: 0; }
.os-method .os-method-egs { font-size: 12px; color: var(--text-muted); margin-top: 8px; font-style: italic; }

/* 帳號類型對照 */
.os-acct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.os-acct {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  position: relative;
}
.os-acct.recommended {
  border: 2px solid var(--primary);
  background: var(--primary-light);
}
.os-acct .os-acct-tag {
  position: absolute; top: -10px; right: 12px;
  background: var(--primary); color: #fff;
  padding: 2px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700;
}
.os-acct h4 { font-size: 15px; margin: 4px 0 6px; }
.os-acct p { font-size: 12.5px; color: var(--text-soft); line-height: 1.55; margin: 0; }
.os-acct ul { padding-left: 18px; margin: 6px 0 0; font-size: 12px; color: var(--text-soft); }
.os-acct ul li { line-height: 1.6; }

/* 找碴錯誤卡 */
.os-err-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.os-err-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .15s;
}
.os-err-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.os-err-card .os-err-visual {
  height: 130px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  display: flex; align-items: center; justify-content: center;
}
.os-err-card .os-err-visual svg { width: 80%; height: 100%; }
.os-err-card .os-err-body { padding: 14px; }
.os-err-card .os-err-tag {
  display: inline-block;
  background: #fee2e2; color: #991b1b;
  padding: 2px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 600; margin-bottom: 6px;
}
.os-err-card h4 { font-size: 15px; margin: 4px 0 6px; }
.os-err-card p { font-size: 12.5px; color: var(--text-soft); line-height: 1.6; margin: 0 0 6px; }
.os-err-card p.fix { color: var(--primary-dark); font-weight: 500; }

/* ── 教師決定修正 2026-09-28：延伸補充區／名詞側邊說明／高中延伸標籤 ── */
.panel.supplement { padding: 14px 18px; }
.panel.supplement > summary { cursor: pointer; font-weight: 700; font-size: 15px; color: var(--text); list-style: none; }
.panel.supplement > summary::-webkit-details-marker { display: none; }
.panel.supplement > summary::after { content: ' ▾'; color: var(--text-soft); font-weight: 400; }
.panel.supplement[open] > summary::after { content: ' ▴'; }
.panel.supplement ul { margin: 10px 0 0; padding-left: 20px; }
.panel.supplement li { font-size: 13.5px; line-height: 1.7; margin: 4px 0; color: var(--text-soft); }
.panel.supplement a { color: var(--primary-dark); }
.term-aside { display: block; margin: 12px 0 0; padding: 12px 14px; border-left: 4px solid var(--primary); background: var(--primary-light); border-radius: 0 10px 10px 0; font-size: 13px; line-height: 1.65; }
.term-aside-title { display: block; margin-bottom: 6px; color: var(--text); }
.term-aside dl { margin: 0; }
.term-aside dt { font-weight: 700; color: var(--text); }
.term-aside dd { margin: 0 0 4px; color: var(--text-soft); }
.term-aside a { color: var(--primary-dark); text-decoration: underline; }
.tag-ext { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; margin-left: 6px; border-radius: 999px; background: #eceff3; color: #4b5563; vertical-align: middle; }

/* ── 2026-10 App 回饋修正：模組 5 草圖對照、模組 3 步驟輪播、YouTube 連結卡（取代嵌入影片） ── */
.os-err-pair { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 8px; background: #f8fafc; }
.os-err-panel { margin: 0; background: #fff; border-radius: 10px; border: 1px solid var(--border); padding: 4px; }
.os-err-panel.bad { border-color: #fecaca; } .os-err-panel.good { border-color: #bbf7d0; }
.os-err-panel figcaption { font-size: 12px; font-weight: 700; padding: 2px 6px; }
.os-err-panel.bad figcaption { color: #b91c1c; } .os-err-panel.good figcaption { color: #15803d; }
.os-err-panel svg, .os-quiz-fig svg, #sk-legend svg { width: 100%; height: auto; display: block; }
.os-quiz-fig { max-width: 420px; margin: 0 0 10px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.os-legend { margin: 0 0 14px; font-size: 13.5px; } .os-legend > summary { cursor: pointer; font-weight: 700; color: var(--primary-dark); }
#sk-legend { max-width: 420px; margin-top: 8px; }
.os-yt-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 12px; background: #1f2937; color: #fff; text-decoration: none; max-width: 720px; }
.os-yt-card:hover { background: #111827; }
.os-yt-play { flex: 0 0 48px; height: 48px; border-radius: 50%; background: #dc2626; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.os-yt-text { display: flex; flex-direction: column; gap: 2px; } .os-yt-text small { opacity: .8; font-size: 12.5px; }
.os-steps { max-width: 720px; margin: 0 auto; }
.os-steps-stage { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.os-steps-stage svg { width: 100%; height: auto; display: block; }
.os-steps-cap { margin: 10px 2px 0; font-size: 14px; line-height: 1.7; }
.os-steps-cap b { color: var(--primary-dark); }
.os-steps-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.os-steps-nav button { min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border); background: #fff; font-weight: 700; cursor: pointer; }
.os-steps-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.os-steps-dots button { width: 28px; min-height: 28px; padding: 0; border-radius: 50%; font-size: 12px; }
.os-steps-dots button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.os-err-grid.paired { grid-template-columns: 1fr; }
@media (min-width: 900px) { .os-err-grid.paired { grid-template-columns: repeat(2, 1fr); } }
.os-step .os-step-shot { margin: 16px 0 8px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.os-step .os-step-shot svg { width: 100%; max-width: none; height: auto; margin: 0; }
