/* =========================================================
   工藝設計實驗室：05 教學成果（曹永平老師示範教具）2026.10.10
   沿用 craft-lab.css 的變數（--ink / --laser / --mono…）與 .cl-filter / .cl-wall / .cl-w
   ========================================================= */
.tc-sec { scroll-margin-top: 120px; }

/* 開場：老師＋年表 */
.tc-intro { display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 22px 26px; margin-bottom: 26px; background: var(--steel); color: #fff; border-left: 6px solid var(--laser); }
.tc-teacher { display: flex; align-items: center; gap: 14px; color: #fff !important; text-decoration: none; }
.tc-teacher img { width: 64px; height: 64px; object-fit: cover; border: 2px solid #fff; }
.tc-teacher span { display: flex; flex-direction: column; line-height: 1.3; }
.tc-teacher small { font: 600 11px/1.4 var(--mono); letter-spacing: .12em; color: rgba(255, 255, 255, .6); }
.tc-teacher b { font-size: 18px; }
.tc-teacher em { font-style: normal; font-size: 12px; color: var(--laser-2); }
.tc-teacher:hover em { text-decoration: underline; }
.tc-timeline { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; }
.tc-timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: repeating-linear-gradient(90deg, var(--laser) 0 8px, transparent 8px 14px); }
.tc-timeline li { position: relative; padding-top: 22px; }
.tc-timeline li::before { content: ""; position: absolute; left: 0; top: 0; width: 12px; height: 12px; background: var(--steel); border: 2px solid var(--laser); }
.tc-timeline li:last-child::before { background: var(--laser); box-shadow: 0 0 0 5px rgba(255, 77, 26, .25); }
.tc-timeline .labs-mono { display: block; font-size: 11px; color: var(--laser-2); }
.tc-timeline b { display: block; font-size: 17px; }
.tc-timeline small { font-size: 12px; color: rgba(255, 255, 255, .65); }
.tc-intro-txt { margin: 0; font-size: 14px; line-height: 1.75; color: rgba(255, 255, 255, .82); }
.tc-intro-txt b { color: #fff; }

/* 材料分頁 */
.tc-tabs { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--ink); margin-bottom: 0; background: var(--paper); }
.tc-tabs button { position: relative; z-index: 1; appearance: none; border: 0; border-right: 1px solid var(--ink); background: none; padding: 16px 18px 18px; text-align: left; font-family: inherit; color: var(--ink-2); cursor: pointer; transition: color .3s; }
.tc-tabs button:last-of-type { border-right: 0; }
.tc-tabs button b { display: block; font-size: clamp(18px, 2.2vw, 24px); font-weight: 900; line-height: 1.2; }
.tc-tabs button small { font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.tc-tab-k { display: inline-block; margin-bottom: 6px; font-size: 11px; color: var(--laser); }
.tc-tabs button[aria-selected="true"] { color: #fff; }
.tc-tabs button[aria-selected="true"] .tc-tab-k { color: var(--laser-2); }
.tc-tabs button:hover:not([aria-selected="true"]) { color: var(--ink); background: #fff; }
.tc-tabs button:focus-visible { outline: 3px solid var(--laser); outline-offset: -3px; }
.tc-tab-bar { position: absolute; z-index: 0; left: 0; top: 0; bottom: 0; background: var(--ink); transition: transform .45s var(--ease), width .45s var(--ease); }
.tc-tab-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--laser); }

.tc-panel { padding: clamp(18px, 3vw, 32px); background: var(--paper); border: 1px solid var(--ink); border-top: 0; }
.tc-panel.pop { animation: tcIn .5s var(--ease); }
@keyframes tcIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.tc-panel h5 { margin: 0; }

/* 上：封面＋規格 */
.tc-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(18px, 3vw, 34px); align-items: start; }
.tc-cover { position: relative; display: block; padding: 0; border: 0; background: #ccc; aspect-ratio: 4 / 3; overflow: hidden; cursor: zoom-in; }
.tc-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tc-cover:hover img { transform: scale(1.05); }
.tc-stamp { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-end; padding: 8px 12px; background: var(--laser); color: #fff; transform: rotate(-3deg); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.tc-stamp small { font: 700 10px/1.3 var(--mono); letter-spacing: .12em; }
.tc-stamp b { font-size: 14px; }
.tc-spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0 0 16px; border-top: 2px solid var(--ink); }
.tc-spec div { padding: 9px 12px 9px 0; border-bottom: 1px dashed var(--line); }
.tc-spec div:nth-child(4) { grid-column: 1 / -1; }
.tc-spec dt { font: 600 10.5px/1.4 var(--mono); letter-spacing: .12em; color: var(--ink-3); }
.tc-spec dd { margin: 2px 0 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.tc-lead { margin: 0 0 14px; font-size: 15px; line-height: 1.85; color: var(--ink-2); }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-chips i { font-style: normal; font: 600 12px/1 var(--mono); padding: 6px 9px; border: 1px solid var(--ink); color: var(--ink); }
.tc-machine { display: flex; gap: 12px; align-items: center; margin: 16px 0 0; padding: 10px; background: #fff; border: 1px solid var(--line); font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.tc-machine button { flex: none; width: 74px; height: 74px; padding: 0; border: 0; background: none; cursor: zoom-in; }
.tc-machine img { width: 100%; height: 100%; object-fit: contain; }
.tc-machine small { display: block; font: 600 10.5px/1.4 var(--mono); letter-spacing: .1em; color: var(--laser); }
.tc-machine b { display: block; color: var(--ink); }

/* 中：製作步驟 */
.tc-how { margin-top: clamp(24px, 4vw, 40px); outline: none; }
.tc-how-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tc-how-h .labs-mono { color: var(--laser); font-size: 11px; }
.tc-how-h h5 { font-size: clamp(18px, 2vw, 22px); font-weight: 900; color: var(--ink); }
.tc-how-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; background: var(--steel); color: #fff; }
.tc-stage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.tc-shot { position: absolute; inset: 0; margin: 0; opacity: 0; transform: scale(1.04); transition: opacity .6s, transform 1.2s var(--ease); }
.tc-shot.on { opacity: 1; transform: none; z-index: 1; }
.tc-shot button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #111; cursor: zoom-in; }
.tc-shot img { width: 100%; height: 100%; object-fit: contain; }
.tc-stage-no { position: absolute; z-index: 2; left: 0; top: 0; padding: 8px 12px; background: var(--laser); color: #fff; font-size: 12px; }
.tc-stage-no b { font-size: 18px; }
.tc-how-side { display: flex; flex-direction: column; padding: 18px 20px; gap: 14px; min-width: 0; }
.tc-steps { display: grid; gap: 4px; }
.tc-steps button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-left: 3px solid transparent; background: rgba(255, 255, 255, .04); color: rgba(255, 255, 255, .62); font: 700 14px/1.3 inherit; font-family: inherit; text-align: left; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.tc-steps button i { font: 600 11px/1 var(--mono); font-style: normal; color: rgba(255, 255, 255, .45); }
.tc-steps button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.tc-steps button.done { color: rgba(255, 255, 255, .85); }
.tc-steps button.done i::after { content: " ✓"; color: var(--laser-2); }
.tc-steps button[aria-selected="true"] { background: rgba(255, 77, 26, .16); border-left-color: var(--laser); color: #fff; }
.tc-steps button[aria-selected="true"] i { color: var(--laser-2); }
.tc-step-txt { margin: 0; min-height: 4.8em; font-size: 14.5px; line-height: 1.75; color: rgba(255, 255, 255, .82); }
.tc-step-txt b { display: block; font-size: 17px; color: #fff; margin-bottom: 2px; }
.tc-step-ctrl { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.tc-step-ctrl button { flex: none; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .4); background: none; color: #fff; font-size: 16px; cursor: pointer; transition: background .2s, border-color .2s; }
.tc-step-ctrl button:hover { background: var(--laser); border-color: var(--laser); }
.tc-step-bar { flex: 1; height: 4px; background: rgba(255, 255, 255, .15); }
.tc-step-bar i { display: block; height: 100%; width: 0; background: var(--laser); transition: width .5s var(--ease); }

/* 重點＋工具 */
.tc-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; margin: 22px 0 clamp(24px, 4vw, 36px); }
.tc-tips, .tc-tools { padding: 18px 20px; background: #fff; border: 1px solid var(--line); }
.tc-tips h5, .tc-tools h5 { font-size: 11.5px; letter-spacing: .12em; color: var(--laser); margin-bottom: 12px; }
.tc-tips ol { margin: 0; padding: 0; list-style: none; counter-reset: t; display: grid; gap: 10px; }
.tc-tips li { counter-increment: t; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; font-size: 14px; line-height: 1.65; color: var(--ink-2); }
.tc-tips li::before { content: counter(t, decimal-leading-zero); grid-row: 1 / span 2; display: grid; place-items: center; width: 34px; height: 34px; background: var(--ink); color: #fff; font: 700 12px/1 var(--mono); }
.tc-tips li b { color: var(--ink); font-size: 15px; }
.tc-tools ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.tc-tools li { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.tc-tools li button { padding: 0; border: 0; aspect-ratio: 1; overflow: hidden; background: #ddd; cursor: zoom-in; margin-bottom: 6px; }
.tc-tools li img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tc-tools li button:hover img { transform: scale(1.08); }
.tc-tools li b { font-size: 14px; color: var(--ink); }
.tc-note { margin: 12px 0 0; padding: 10px 12px; background: var(--bg); font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.tc-note b { display: inline-block; margin-right: 8px; color: var(--laser); }
.tc-diagram { display: block; width: 100%; padding: 0; border: 1px solid var(--line); background: #fff; cursor: zoom-in; max-height: 300px; overflow: hidden; }
.tc-diagram img { width: 100%; height: 300px; object-fit: contain; }
.tc-safe-list { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
.tc-safe-list li { position: relative; padding: 10px 10px 10px 34px; background: var(--bg); color: var(--ink) !important; font-size: 13.5px !important; font-weight: 700; }
.tc-safe-list li::before { content: "!"; position: absolute; left: 10px; top: 10px; width: 16px; height: 16px; display: grid; place-items: center; background: var(--laser); color: #fff; font: 900 11px/1 var(--mono); }

/* 下：作品牆（沿用 .cl-filter / .cl-wall / .cl-w） */
.tc-filter { margin-bottom: 14px; }
.tc-wall { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tc-w span { white-space: normal; text-align: left; line-height: 1.4; }
.tc-course-link { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--laser) !important; border-bottom: 1px solid currentColor; }

@media (max-width: 1080px) {
	.tc-intro { grid-template-columns: auto minmax(0, 1fr); }
	.tc-intro-txt { grid-column: 1 / -1; }
	.tc-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
	.tc-top, .tc-how-body, .tc-row { grid-template-columns: 1fr; }
	.tc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tc-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tc-w span { opacity: 1; transform: none; font-size: 11px; padding: 4px 7px; background: rgba(17, 19, 21, .82); }
}
@media (max-width: 560px) {
	.tc-intro { grid-template-columns: 1fr; padding: 18px; }
	.tc-tabs button { padding: 12px 10px 14px; }
	.tc-tabs button small { display: none; }
	.tc-spec { grid-template-columns: 1fr; }
	.tc-tools ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tc-safe-list { grid-template-columns: 1fr !important; }
	.tc-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tc-steps button { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
	.tc-shot, .tc-tab-bar, .tc-step-bar i { transition: none; }
	.tc-panel.pop { animation: none; }
}
@media (min-width: 821px) { .tc-stage { aspect-ratio: auto; min-height: 360px; } }

/* 步驟照片：原檔小的不放大，置中在模糊底圖上（2026.10.10c） */
.tc-shot .tc-shot-bg { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; filter: blur(18px) brightness(.55) saturate(1.2); pointer-events: none; }
.tc-shot button { position: relative; display: grid; grid-template: 100% / 100%; place-items: center; background: transparent; }
.tc-shot.is-small img:not(.tc-shot-bg) { max-width: 92%; max-height: 92%; height: auto; object-fit: contain; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); outline: 6px solid #fff; }
/* 大圖：釘滿舞台、整張完整顯示，兩側由模糊底圖補滿（2026.10.11） */
.tc-shot.is-big img:not(.tc-shot-bg) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
/* 燈箱：太小的圖給最小寬度 */
.cl-lb-media img { min-width: min(420px, calc(100vw - 40px)); object-fit: contain; }

/* 教室實景重整（2026.10.11） */
.cl-ph-grid2 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px; }
.cl-ph-grid2 .cl-ph { aspect-ratio: 1; }
.cl-ph-grid2 .cl-ph.big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.cl-photos-h2 { margin-top: 28px; }
.cl-ph-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 23%); gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
.cl-ph-strip .cl-ph { aspect-ratio: 1; scroll-snap-align: start; }
@media (max-width: 720px) {
	.cl-ph-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cl-ph-strip { grid-auto-columns: 62%; }
	.cl-ph span { opacity: 1; }
}
