/* 課程頁 CH1 · 設計師 2026-11-02 稿（Figma 3593:8858）
   四集卡收進灰底大框、公仔放右側並加動態、CTA「進入課程」移到面板底部並加強。
   全部以 #ch1 開頭，蓋過 course-episodes / course-ch1-v2 / course-figma3 的舊規則。 */

/* ── CH 資料夾頁籤 ── */
#ch1 .ch-folders{position:relative;display:block;height:80px;margin:0;padding:0;border-bottom:1px solid #c0c0c0;overflow:hidden;background:none;gap:0;}
#ch1 .ch-folders .ch-chip{position:absolute;bottom:0;width:234px;height:63px;box-sizing:border-box;display:flex;align-items:flex-start;gap:8px;padding:17px 20px 0 28px;margin:0;border:0;border-radius:16px 16px 0 0;background:linear-gradient(145.6deg,#e8e8e8 0%,#c0c0c0 62.5%);color:#032639;font-size:18px;font-weight:700;line-height:32.9px;letter-spacing:0;white-space:nowrap;text-decoration:none;box-shadow:-4px 0 10px rgba(3,38,57,.06);}
#ch1 .ch-folders .ch-chip:nth-child(1){left:0;z-index:4;}
#ch1 .ch-folders .ch-chip:nth-child(2){left:220px;z-index:3;}
#ch1 .ch-folders .ch-chip:nth-child(3){left:440px;z-index:2;}
#ch1 .ch-folders .ch-chip:nth-child(4){left:660px;z-index:1;}
#ch1 .ch-folders .ch-chip.on{height:80px;padding-top:23px;background:linear-gradient(140.77deg,#77b5ff 1.7%,#2487fe 90%);color:#fff;}
#ch1 .ch-folders .ch-chip b,#ch1 .ch-folders .ch-chip small{align-self:center;margin:0 0 0 2px;padding:3px 7px 4px;border-radius:50px;background:#fff;font-size:11px;font-weight:700;line-height:1.2;letter-spacing:.04em;}
#ch1 .ch-folders .ch-chip b{color:#003864;}
#ch1 .ch-folders .ch-chip small{color:#969696;}
#ch1 .ch-folders .ch-chip.on b{margin-top:-6px;}

/* ── 章節主標 ── */
#ch1 .ch-head{padding:24px 4px 0;}
#ch1 .ch-kicker{color:#032639;font-size:16px;font-weight:700;letter-spacing:1.6px;}
#ch1 .ch-head h2{color:#032639;font-size:57px;line-height:70px;}
#ch1 .ch-desc{color:#6b7280;font-size:17px;line-height:1.9;letter-spacing:.85px;}

/* ── 灰底大框（四集卡＋面板） ── */
#ch1 .ep-board{position:relative;margin-top:60px;padding:64px 72px;border-radius:30px;background:#f5f7fa;}
#ch1 .ep-board .episode-tabs{display:flex;flex-wrap:nowrap;gap:50px;align-items:flex-start;margin:0;padding:0 0 70px;grid-template-columns:none;}
#ch1 .ep-board .episode-tab{position:relative;flex:0 0 169px;width:169px;min-height:0;height:auto;box-sizing:border-box;margin:0;padding:20px 20px 24px;border:0;border-radius:20px;background:#dbe0e3;color:#9aa3b0;text-align:left;box-shadow:none;overflow:visible;transform:none;transition:background .25s,color .25s,transform .25s,box-shadow .25s;}
#ch1 .ep-board .episode-tab:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(3,38,57,.08);}
#ch1 .ep-board .episode-tab[aria-selected="true"]{background:#fff;color:#222f34;box-shadow:0 10px 30px rgba(3,38,57,.06);}
/* 2026-11-02 四集各自的助教色（Figma 3843:3268）：選中＝全彩＋陰影；未選＝同色淡化 */
#ch1 .ep-board .episode-tab.ep1{--ep-c:#9f9fff;}
#ch1 .ep-board .episode-tab.ep2{--ep-c:#daf54a;}
#ch1 .ep-board .episode-tab.ep3{--ep-c:#a9efff;}
#ch1 .ep-board .episode-tab.ep4{--ep-c:#ffc2f4;}
#ch1 .ep-board .episode-tab{background:color-mix(in srgb,var(--ep-c) 32%,#fff);color:#6b7686;}
#ch1 .ep-board .episode-tab:hover{background:color-mix(in srgb,var(--ep-c) 60%,#fff);color:#2c3c48;}
#ch1 .ep-board .episode-tab[aria-selected="true"]{background:var(--ep-c);color:#032639;box-shadow:0 14px 30px color-mix(in srgb,var(--ep-c) 55%,rgba(3,38,57,.25));}
#ch1 .ep-board .episode-tab::before,#ch1 .ep-board .episode-tab::after{display:none;}
#ch1 .ep-board .ep-pop,#ch1 .ep-board .ep-tab-mark{display:none;}
#ch1 .ep-board .ep-tab-label{display:flex;flex-direction:column;gap:2px;margin:0;padding:0;}
#ch1 .ep-board .ep-index{color:inherit;font-size:12px;font-weight:700;letter-spacing:.72px;line-height:1.6;}
#ch1 .ep-board .episode-tab strong{color:inherit;font-size:21px;font-weight:700;line-height:33.6px;letter-spacing:0;white-space:nowrap;}
#ch1 .ep-board .ep-companion{white-space:nowrap;color:inherit;font-size:10px;letter-spacing:1px;line-height:1.6;}
#ch1 .ep-board .ep-companion .nw{display:inline;}
#ch1 .ep-board .episode-tab:focus-visible{outline:3px solid #2487fe;outline-offset:3px;}

/* 卡片間的三角：選中那張旁邊是橘色，並照設計稿閃動 */
#ch1 .ep-arrow{position:absolute;left:186px;top:50%;width:16px;height:30px;margin-top:-15px;background:#dbe0e3;clip-path:polygon(0 0,100% 50%,0 100%);pointer-events:none;}
#ch1 .episode-tab[aria-selected="true"] .ep-arrow{background:#ff772d;animation:ep-arrow-blink 6s linear infinite alternate;}
@keyframes ep-arrow-blink{0%,5.833%{opacity:1}8.333%,13.333%{opacity:0}16.666%,22.499%{opacity:1}24.999%,29.999%{opacity:0}33.332%,100%{opacity:1}}

/* ── 面板內容 ── */
#ch1 .ep-board .episode-panels,#ch1 .ep-board .episode-panel,#ch1 .ep-board .acc-body.ep-v3{overflow:visible;}
#ch1 .ep-board .episode-panels{margin:0;}
#ch1 .ep-board .episode-panel{margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;}
#ch1 .ep-board .acc-body.ep-v3{position:relative;padding:0;background:none;}
#ch1 .ep-v3 .ep-head{display:block;max-width:calc(100% - 280px);white-space:normal;}
#ch1 .ep-v3 .ep-panel-label{margin:0 0 22px;color:#ff772d;font-size:14px;font-weight:700;letter-spacing:1.12px;}
#ch1 .ep-v3 .ep-panel-label i{margin:0 14px;font-style:normal;font-weight:400;}
#ch1 .ep-v3 .acc-quote{margin:0;color:#12364a;font-size:45px;font-weight:700;line-height:1.46;letter-spacing:-.02em;}
#ch1 #ep-panel-4 .acc-quote{font-size:38px;}
#ch1 .ep-v3 .ep-rule{display:block;width:56px;height:4px;margin:32px 0;border-radius:0;background:#ff772d;}
#ch1 .ep-v3 .acc-intro{max-width:min(800px,calc(100% - 290px));margin:0;color:#5a6573;font-size:17px;line-height:1.9;}
#ch1 .ep-v3 .ep-take-h{margin:40px 0 0;color:#032639;font-size:15px;font-weight:700;}
#ch1 .ep-v3 .ep-take-h::after{content:" ....";}
#ch1 .ep-v3 .ep-take{max-width:944px;margin:40px 0 0;padding:0;list-style:none;}
#ch1 .ep-v3 .ep-take li{display:flex;align-items:baseline;gap:28px;margin:0;padding:20px 0;border-top:1px solid #d6dee5;}
#ch1 .ep-v3 .ep-take li:last-child{border-bottom:1px solid #d6dee5;}
#ch1 .ep-v3 .ep-take .no{flex:0 0 44px;width:44px;color:#ff772d;font-size:25px;font-weight:700;line-height:1;}
#ch1 .ep-v3 .ep-take li>span:last-child{color:#032639;font-size:17px;font-weight:500;}

/* ── 公仔：靜音循環影片（11/3 換 Figma 動態），白底用 multiply 融進灰板；換集時彈跳登場 ── */
#ch1 .ep-char{position:absolute;right:-16px;top:-40px;width:311px;height:auto;aspect-ratio:1;object-fit:contain;pointer-events:none;mix-blend-mode:multiply;transform-origin:50% 80%;animation:ep-char-pop .7s cubic-bezier(.34,1.56,.64,1) both;}
@keyframes ep-char-pop{0%{opacity:0;transform:translateY(30px) scale(.6)}100%{opacity:1;transform:none}}

/* ── CTA：照設計稿的白膠囊＋播放圓，刻意加強成深藍底，更顯眼 ── */
#ch1 .ep-cta{display:flex;align-items:center;flex-wrap:wrap;gap:24px;margin-top:40px;}
#ch1 .ep-v3 .ep-cta .acc-more{position:relative;display:inline-flex;align-items:center;gap:22px;height:64px;box-sizing:border-box;margin:0;padding:0 8px 0 34px;border:0;border-radius:86px;background:#032639;color:#fff;font-size:21px;font-weight:700;letter-spacing:1.92px;text-decoration:none;white-space:nowrap;box-shadow:0 12px 28px rgba(3,38,57,.22);animation:ep-cta-glow 2.6s ease-in-out infinite;transition:transform .2s,box-shadow .2s,background .2s;}
#ch1 .ep-v3 .ep-cta .acc-more:hover{transform:translateY(-2px) scale(1.03);background:#0b3a55;box-shadow:0 16px 34px rgba(3,38,57,.3);}
#ch1 .ep-v3 .ep-cta .acc-more:focus-visible{outline:3px solid #ff772d;outline-offset:4px;}
#ch1 .ep-v3 .ep-cta .acc-more::before,#ch1 .ep-v3 .ep-cta .acc-more::after{display:none;}
#ch1 .ep-play{position:relative;flex:0 0 48px;width:48px;height:48px;border-radius:50%;background:#ff772d;transition:transform .2s;}
#ch1 .ep-play::after{content:"";position:absolute;left:19px;top:15px;border-style:solid;border-width:9px 0 9px 14px;border-color:transparent transparent transparent #fff;}
#ch1 .ep-cta .acc-more:hover .ep-play{transform:scale(1.1);}
@keyframes ep-cta-glow{0%,100%{box-shadow:0 12px 28px rgba(3,38,57,.22),0 0 0 0 rgba(255,119,45,.45)}50%{box-shadow:0 12px 28px rgba(3,38,57,.22),0 0 0 12px rgba(255,119,45,0)}}
#ch1 .ep-cta-note{margin:0;color:#ff772d;font-size:15px;line-height:1.6;}
#ch1 .ep-cta-note i{margin:0 6px;font-style:normal;color:#ffb48a;}

/* ── 平板 ── */
@media (max-width:1100px){
  #ch1 .ep-board{padding:48px 40px;}
  #ch1 .ep-board .episode-tabs{gap:28px;}
  #ch1 .ep-board .episode-tab{flex:1 1 0;width:auto;}
  #ch1 .ep-arrow{left:auto;right:-22px;}
  #ch1 .ep-char{width:250px;top:-48px;}
  #ch1 .ep-v3 .ep-head{max-width:calc(100% - 250px);}
  #ch1 .ep-v3 .acc-quote{font-size:36px;}
  #ch1 #ep-panel-4 .acc-quote{font-size:32px;}
}

/* ── 手機 ── */
@media (max-width:760px){
  #ch1 .ch-folders{height:64px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;}
  #ch1 .ch-folders::-webkit-scrollbar{display:none;}
  #ch1 .ch-folders .ch-chip{width:180px;height:50px;padding:12px 12px 0 18px;font-size:15px;}
  #ch1 .ch-folders .ch-chip:nth-child(2){left:166px;}
  #ch1 .ch-folders .ch-chip:nth-child(3){left:332px;}
  #ch1 .ch-folders .ch-chip:nth-child(4){left:498px;}
  #ch1 .ch-folders .ch-chip.on{height:64px;padding-top:16px;}
  #ch1 .ch-head h2{font-size:36px;line-height:48px;}
  #ch1 .ch-desc{font-size:15px;}
  #ch1 .ep-board{margin:36px -8px 0;padding:24px 16px 32px;border-radius:24px;}
  #ch1 .ep-board .episode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding-bottom:28px;}
  #ch1 .ep-board .episode-tab{width:auto;padding:14px 14px 16px;border-radius:16px;}
  #ch1 .ep-board .episode-tab strong{font-size:17px;line-height:26px;}
  #ch1 .ep-arrow{display:none;}
  #ch1 .ep-char{position:relative;display:block;right:auto;top:auto;width:190px;margin:4px auto 20px;}
  #ch1 .ep-v3 .ep-head{max-width:none;}
  #ch1 .ep-v3 .ep-panel-label{margin-bottom:12px;font-size:13px;}
  #ch1 .ep-v3 .ep-panel-label i{margin:0 8px;}
  #ch1 .ep-v3 .acc-quote,#ch1 #ep-panel-4 .acc-quote{font-size:24px;line-height:1.5;}
  #ch1 .ep-v3 .acc-quote br{display:none;}
  #ch1 .ep-v3 .ep-rule{margin:20px 0;}
  #ch1 .ep-v3 .acc-intro{max-width:none;font-size:15px;}
  #ch1 .ep-v3 .ep-take-h,#ch1 .ep-v3 .ep-take{margin-top:24px;}
  #ch1 .ep-v3 .ep-take li{gap:16px;padding:16px 0;}
  #ch1 .ep-v3 .ep-take .no{flex-basis:32px;width:32px;font-size:20px;}
  #ch1 .ep-v3 .ep-take li>span:last-child{font-size:15px;}
  #ch1 .ep-cta{flex-direction:column;align-items:stretch;gap:12px;margin-top:28px;}
  #ch1 .ep-v3 .ep-cta .acc-more{justify-content:space-between;width:100%;}
  #ch1 .ep-cta-note{font-size:13px;text-align:center;}
  #ch1 .ep-cta-note i{display:block;height:0;margin:0;overflow:hidden;visibility:hidden;}
  #ch1 .ep-char{margin:0 auto 18px;}
}

@media (prefers-reduced-motion:reduce){
  #ch1 .ep-char,#ch1 .ep-arrow,#ch1 .ep-v3 .ep-cta .acc-more{animation:none;}
}
