:root {
  /* 樂行銷學院設計：主色藍綠、按鈕橘、點綴金 */
  --brand: #2b96a7;
  --brand-dark: #214b5a;
  --brand-light: #45c1d8;
  --cta: #bf6f37;
  --gold: #d8a145;
  --ink: #1a1a1a;
  --brand-soft: color-mix(in srgb, var(--brand) 10%, white);
  --text: #1e1e1e;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --ok: #059669;
  --err: #dc2626;
  --radius: 8px;
  --shadow: 0 2px 10px rgba(0,0,0,.07);
}
* { box-sizing: border-box; }
/* 讓 hidden 屬性永遠有效（避免被 display:block/flex 的樣式蓋過） */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Roboto, "Open Sans", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.7; font-size: 16px;
}
a { color: var(--brand); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 800px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.empty { text-align: center; padding: 64px 16px; color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* 按鈕與表單 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 4px; border: 1px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .1s, filter .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cta); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--err); }
.btn-lg { padding: 14px 32px; font-size: 18px; border-radius: 4px; }
.btn-sm { padding: 5px 12px; font-size: 14px; border-radius: 4px; }
.btn-block { display: flex; width: 100%; }
label { display: block; margin-bottom: 16px; font-weight: 500; font-size: 15px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=url], input:not([type]), select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid #ddd; border-radius: 4px; font: inherit; font-weight: 400; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
input[readonly] { background: var(--bg-alt); }
textarea { min-height: 100px; resize: vertical; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.check input { margin-top: 6px; }
.alert { padding: 12px 16px; border-radius: 10px; margin: 16px 0; font-size: 15px; }
.alert-success { background: #ecfdf5; color: #065f46; }
.alert-error { background: #fef2f2; color: #991b1b; }
.alert-info { background: #eff6ff; color: #1e40af; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }

/* 頁首頁尾 */
.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 50; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 900; font-size: 18px; color: var(--text); text-decoration: none; }
.nav nav { display: flex; gap: 18px; font-size: 15px; }
.nav nav a { color: var(--text); text-decoration: none; }
.nav nav a:hover { color: var(--brand); }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; text-align: center; margin-top: 48px; }
.sales .site-footer { margin-top: 0; padding-bottom: 96px; }
.preview-bar { background: #fef3c7; color: #92400e; text-align: center; padding: 8px; font-size: 14px; }

/* 銷售頁 */
.hero { background: linear-gradient(160deg, var(--brand-soft), #fff 60%); padding: 64px 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.5vw, 48px); font-weight: 900; letter-spacing: -.01em; }
.lead { font-size: 19px; color: #4b5563; margin: 0 0 24px; }
.hero-stats { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stats li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: 14px; color: var(--muted); }
.hero-stats strong { color: var(--text); }
.hero-cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.price-inline s { color: var(--muted); margin-right: 8px; }
.price-inline span { font-size: 26px; font-weight: 900; color: var(--brand); }
.hero-media img, .cover-placeholder { border-radius: 18px; box-shadow: 0 20px 50px rgba(17,24,39,.15); aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.cover-placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #ec4899)); color: #fff; font-weight: 900; font-size: 28px; padding: 24px; text-align: center; }
.cover-placeholder.small { border-radius: 0; box-shadow: none; font-size: 20px; }
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.section-title { text-align: center; font-size: clamp(24px, 3vw, 32px); font-weight: 900; margin-bottom: 36px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature-no { font-weight: 900; color: var(--brand); font-size: 22px; }
.feature p { margin: 8px 0 0; font-weight: 500; font-size: 17px; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding: 10px 0 10px 36px; font-size: 17px; border-bottom: 1px dashed var(--line); }
.check-list li:last-child { border-bottom: 0; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.check-list.compact li { font-size: 15px; padding: 6px 0 6px 32px; border: 0; }
.check-list.compact li::before { top: 8px; width: 20px; height: 20px; font-size: 11px; }
.prose { font-size: 17px; }
.prose img { border-radius: 12px; margin: 16px 0; }
.curriculum, .faq { display: grid; gap: 12px; }
.chapter, .faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.chapter summary, .faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; list-style: none; }
.chapter summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 20px 18px; color: #4b5563; }
.chapter small { color: var(--muted); font-weight: 400; }
.chapter ol { margin: 0; padding: 0 20px 12px 44px; }
.chapter li { padding: 8px 0; border-top: 1px solid var(--line); }
.chapter li span { margin-right: 8px; }
.chapter li small { float: right; color: var(--muted); }
.instructor { display: flex; gap: 32px; align-items: center; }
.instructor img, .avatar-placeholder { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-placeholder { background: var(--brand); color: #fff; font-size: 56px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.eyebrow { color: var(--brand); font-weight: 700; font-size: 14px; margin: 0 0 4px; letter-spacing: .05em; }
.final-cta { background: linear-gradient(180deg, #fff, var(--brand-soft)); }
.price-card { background: #fff; border: 2px solid var(--brand); border-radius: 20px; padding: 36px; max-width: 480px; margin: 0 auto; text-align: center; box-shadow: var(--shadow); }
.price-card .check-list { text-align: left; margin: 20px 0 24px; }
.price-big s { display: block; color: var(--muted); }
.price-big strong { font-size: 44px; font-weight: 900; color: var(--brand); }
.sticky-cta { display: none; }

/* 結帳／登入 */
.auth-wrap { min-height: calc(100vh - 200px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 24px; }
.checkout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; padding-top: 40px; padding-bottom: 40px; align-items: start; }
.checkout h1 { font-size: 24px; }
.order-summary img { border-radius: 10px; margin-bottom: 16px; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.big-icon { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 900; }
.big-icon.ok { background: #d1fae5; color: var(--ok); }
.big-icon.wait { background: #fef3c7; color: #b45309; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.checklist { list-style: none; padding: 0; font-size: 15px; }
.checklist .ok { color: var(--ok); }
.checklist .bad { color: var(--err); font-weight: 700; }

/* 學員後台 */
.page-head { padding: 32px 0 20px; }
.page-head h1 { margin: 0; }
.course-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.course-card { padding: 0; overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s; }
.course-card:hover { transform: translateY(-2px); }
.course-card img, .course-card .cover-placeholder { aspect-ratio: 16/9; width: 100%; object-fit: cover; }
.course-card-body { padding: 18px; }
.course-card h3 { font-size: 18px; }
.course-card .btn { margin-top: 12px; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.progress > div { height: 100%; background: var(--brand); border-radius: 99px; transition: width .4s; }

.classroom-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; padding-top: 24px; padding-bottom: 24px; align-items: start; }
.lesson-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-top: 16px; }
.lesson-head h1 { font-size: 22px; }
.lesson-nav { display: flex; gap: 8px; flex-shrink: 0; }
.classroom-side { padding: 20px; position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; }
.classroom-side h2 { font-size: 17px; }
.playlist { margin: 12px -8px 0; }
.playlist-section { font-size: 13px; font-weight: 700; color: var(--muted); padding: 12px 8px 4px; }
.playlist-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 15px; line-height: 1.5; }
.playlist-item:hover { background: var(--bg-alt); }
.playlist-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.pl-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; font-size: 11px; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.playlist-item.done .pl-check { background: var(--ok); border-color: var(--ok); color: #fff; }
.pl-title { flex: 1; }
.pl-time { color: var(--muted); font-size: 13px; font-weight: 400; }
.pl-bar { display: block; height: 3px; background: var(--line); border-radius: 9px; margin-top: 4px; overflow: hidden; }
.pl-bar span { display: block; height: 100%; background: var(--brand); }

/* 自訂播放器 */
.vp { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 14px; overflow: hidden; user-select: none; -webkit-user-select: none; }
.vp-frame { position: absolute; left: 0; right: 0; top: calc(-1 * max(60px, 10%)); bottom: calc(-1 * max(60px, 10%)); pointer-events: none; }
.vp-frame iframe, .vp-frame > div { width: 100%; height: 100%; border: 0; pointer-events: none; }
.vp-shield { position: absolute; inset: 0; z-index: 2; cursor: pointer; }
.vp-poster { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: #111 center/cover no-repeat; cursor: pointer; }
.vp-poster::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.vp.is-playing .vp-poster, .vp.is-buffering .vp-poster { display: none; }
.vp.is-paused .vp-poster { background-image: none !important; background-color: rgba(0,0,0,.55); }
.vp.is-ended .vp-poster { display: none; }
.vp-bigplay { position: relative; width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; box-shadow: 0 8px 30px rgba(0,0,0,.35); transition: transform .15s; }
.vp-bigplay:hover { transform: scale(1.06); }
.vp-bigplay svg { width: 36px; height: 36px; fill: currentColor; margin-left: 4px; }
.vp-msg { position: relative; color: #fff; }
.vp:not(.is-ready) .vp-bigplay { opacity: .5; }
.vp-spinner { display: none; position: absolute; z-index: 3; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border: 4px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; pointer-events: none; }
.vp.is-buffering .vp-spinner { display: block; }
.vp-end { display: none; position: absolute; inset: 0; z-index: 3; background: rgba(0,0,0,.85); color: #fff; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 20px; font-weight: 700; }
.vp-end div { display: flex; gap: 12px; }
.vp-end .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.vp.is-ended .vp-end { display: flex; }
.vp-controls { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 28px 14px 10px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; opacity: 0; transition: opacity .25s; }
.vp.show-controls .vp-controls, .vp.is-paused .vp-controls { opacity: 1; }
.vp.is-idle .vp-controls { opacity: 0; pointer-events: none; }
.vp-btn { background: none; border: 0; color: #fff; width: 34px; height: 34px; padding: 4px; cursor: pointer; flex-shrink: 0; }
.vp-btn svg { width: 100%; height: 100%; fill: currentColor; }
.vp .i-pause, .vp.is-playing .i-play { display: none; }
.vp.is-playing .i-pause { display: inline; }
.vp .i-muted, .vp.is-muted .i-vol { display: none; }
.vp.is-muted .i-muted { display: inline; }
.vp-time { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vp-seek, .vp-vol { -webkit-appearance: none; appearance: none; height: 5px; border-radius: 9px; background: linear-gradient(to right, var(--brand) var(--pct, 0%), rgba(255,255,255,.3) var(--pct, 0%)); cursor: pointer; margin: 0; padding: 0; border: 0; }
.vp-seek { flex: 1; min-width: 60px; }
.vp-vol { width: 70px; background: rgba(255,255,255,.6); }
.vp-seek::-webkit-slider-thumb, .vp-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.vp-seek::-moz-range-thumb, .vp-vol::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.vp-rate { width: auto; margin: 0; padding: 2px 4px; background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 6px; font-size: 13px; }
.vp-rate option { color: #000; }
.vp:fullscreen { border-radius: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.vp:-webkit-full-screen { border-radius: 0; width: 100%; height: 100%; }
.vp.is-pseudo-fs { position: fixed; inset: 0; z-index: 1000; border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; height: 100dvh; }

@media (max-width: 900px) {
  .hero { padding: 40px 0; }
  .hero-grid, .checkout, .classroom-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .section { padding: 48px 0; }
  .instructor { flex-direction: column; text-align: center; }
  .classroom-side { position: static; max-height: none; }
  .classroom-grid { padding-top: 0; }
  .classroom .classroom-main { margin: 0 -16px; }
  .classroom .vp { border-radius: 0; }
  .classroom .lesson-head { padding: 0 16px; flex-direction: column; }
  .sticky-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom)); align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
  .sticky-cta strong { font-size: 20px; color: var(--brand); }
  .sticky-cta s { color: var(--muted); font-size: 14px; margin-left: 6px; }
  .vp-vol, .vp-rate { display: none; }
}
@media (max-width: 480px) {
  .nav nav { gap: 12px; font-size: 14px; }
  .hero-cta .btn { width: 100%; }
  .price-card { padding: 24px; }
}

.site-footer a { color: var(--muted); }
.legal { padding-top: 40px; }
.legal h2 { font-size: 20px; margin-top: 28px; }

/* 圖片式銷售頁（長圖堆疊 + 浮動按鈕 + 底部價格列） */
body.img-sales { background: #f3f3f3; }
.img-column { max-width: 672px; margin: 0 auto; background: #fff; min-height: 100vh; box-shadow: 0 0 40px rgba(0,0,0,.06); padding-bottom: 88px; }
.img-column img { width: 100%; height: auto; display: block; }
.img-empty { padding: 120px 24px; text-align: center; color: var(--muted); }
.img-empty h1 { color: var(--text); }
.img-footer { text-align: center; padding: 28px 16px 12px; font-size: 13px; color: var(--muted); }
.img-footer a { color: var(--muted); margin: 0 10px; }
.img-footer p { margin: 8px 0 0; }
.float-btns { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 12px; }
.fb { width: 56px; height: 56px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.2); cursor: pointer; transition: transform .15s; padding: 0; }
.fb:hover { transform: scale(1.1); }
.fb svg { width: 28px; height: 28px; }
.fb-line { background: #06c755; }
.fb-user { background: #374151; }
.fb-buy { background: var(--brand); }
.pulse { animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }
@keyframes pulse { 50% { opacity: .75; } }
.price-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.08); padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.price-bar-inner { max-width: 672px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price-bar s { display: block; font-size: 14px; color: var(--muted); line-height: 1.2; }
.price-bar strong { display: block; font-size: 22px; font-weight: 900; color: var(--brand); line-height: 1.3; }
.price-bar-btn { border-radius: 999px; padding: 12px 32px; font-size: 18px; }
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.modal-card { position: relative; background: #fff; border-radius: 16px; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; padding: 28px 24px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-card h2 { font-size: 22px; }
.modal-x { position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 30px; color: var(--muted); cursor: pointer; line-height: 1; padding: 4px 8px; }
.modal-course { display: flex; justify-content: space-between; gap: 12px; background: var(--bg-alt); border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-weight: 700; font-size: 15px; }
.modal-course s { color: var(--muted); font-weight: 400; font-size: 13px; }
.modal-course strong { color: var(--brand); }
.modal-course > span:last-child { white-space: nowrap; text-align: right; }
@media (max-width: 480px) {
  .float-btns { right: 10px; gap: 10px; }
  .fb { width: 48px; height: 48px; }
  .fb svg { width: 24px; height: 24px; }
  .price-bar-btn { padding: 10px 24px; font-size: 16px; }
}

/* ===== 樂行銷學院設計（netidea.tw）：頁首、頁尾、標題 ===== */
.site-header { background: #fff; backdrop-filter: none; border-bottom: 1px solid #eee; box-shadow: 0 1px 6px rgba(0,0,0,.04); }
.nav { height: 74px; }
.logo { display: inline-flex; align-items: center; font-weight: 900; font-size: 20px; color: var(--ink); }
.logo img { height: 40px; width: auto; }
.nav nav { gap: 26px; font-size: 16px; font-weight: 500; }
.nav nav a { color: #1e1e1e; }
.site-footer { border-top: 0; margin-top: 64px; padding: 0; background: var(--ink); color: #ddd; text-align: left; font-size: 14px; }
.sales .site-footer, .lp .site-footer, .img-sales .site-footer { margin-top: 0; }
.footer-cols { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr; gap: 40px; padding-top: 40px; padding-bottom: 36px; }
.footer-cols h4 { color: #fff; font-size: 18px; margin: 0 0 14px; }
.footer-cols p { margin: 0; line-height: 1.9; color: #e5e5e5; }
.footer-info { list-style: none; margin: 0; padding: 0; }
.footer-info li { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.footer-info a, .footer-links a { color: #e5e5e5; text-decoration: none; }
.footer-info a:hover, .footer-links a:hover { color: var(--brand-light); }
.fi { width: 18px; height: 18px; border-radius: 3px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.footer-copy { background: #303030; color: #ccc; text-align: center; font-size: 13px; letter-spacing: .06em; padding: 12px 16px; }
.site-footer a { color: #e5e5e5; }
/* 置中標題＋藍綠底線 */
.section-title { position: relative; padding-bottom: 18px; }
.section-title::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 64px; height: 4px; margin-left: -32px; border-radius: 2px; background: var(--brand-light); }
.price-inline span, .price-big strong { color: var(--cta); }
.check-list li::before, .feature-no { background: var(--brand); }
.feature-no { background: none; color: var(--brand); }
@media (max-width: 900px) {
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
  .nav { height: 62px; }
  .logo img { height: 32px; }
}
@media (max-width: 480px) { .nav nav a:first-child { display: none; } }
.img-sales .img-column { padding-bottom: 0; }
.img-foot { padding-bottom: 76px; }

/* 折扣碼 */
.coupon-box { margin-bottom: 16px; }
.coupon-box > label { margin-bottom: 0; }
.coupon-input { display: flex; gap: 8px; margin-top: 6px; }
.coupon-input input { margin-top: 0; flex: 1; }
.coupon-input .btn { flex-shrink: 0; }
.coupon-msg { font-size: 14px; margin: 6px 0 0; min-height: 0; color: var(--muted); }
.coupon-msg:empty { display: none; }
.coupon-msg.ok { color: var(--ok); }
.coupon-msg.bad { color: var(--err); }
.coupon-row { color: var(--ok); }
.total-row { font-size: 18px; margin-top: 6px; }
.total-row strong { color: var(--cta); }
.modal-total { display: flex; justify-content: space-between; font-size: 15px; padding: 0 14px 12px; margin-top: -10px; }
.modal-total strong { color: var(--cta); font-size: 18px; }
.nav nav a.nav-alert { color: #fff; background: var(--cta); padding: 4px 12px; border-radius: 4px; font-size: 14px; }
.nav nav a.nav-alert:hover { color: #fff; filter: brightness(1.08); }
@media (max-width: 480px) { .nav nav a.nav-alert { padding: 3px 8px; font-size: 13px; } }

/* 直播 */
.live-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 99px; white-space: nowrap; }
.live-wait { background: #fef3c7; color: #92400e; }
.live-ok { background: #d1fae5; color: #065f46; }
.live-live { background: #dc2626; color: #fff; }
.live-live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
.live-muted { background: #f3f4f6; color: #6b7280; }
.live-panel { padding: 20px; margin-bottom: 20px; }
.live-panel h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.live-list { display: grid; gap: 12px; }
.live-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: #fff; }
.live-item.is-open, .live-item.is-live { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.live-item h3 { font-size: 16px; margin: 0 0 2px; }
.live-meta { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.live-note-text { font-size: 13px; color: #555; margin: 6px 0 0; }
.live-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.live-countdown { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.live-cal { font-size: 13px; }
.btn-live { background: #dc2626; color: #fff; }
.btn-live:hover { filter: brightness(1.08); }
.btn-live.pulse { animation: pulse 1.6s infinite; }
.btn-disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; }
@media (max-width: 640px) {
  .live-item { grid-template-columns: 1fr; }
  .live-actions { align-items: stretch; text-align: left; }
  .live-actions .btn { width: 100%; }
}
.live-after { margin-top: 24px; }
.live-schedule { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.live-schedule li { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.live-schedule li.is-ended { opacity: .6; }
.live-schedule .ls-no { width: 36px; height: 36px; border-radius: 4px; background: var(--brand); color: #fff; font-weight: 900; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.live-schedule li > div { flex: 1; min-width: 0; }
.live-schedule strong { display: block; }
.live-schedule small { color: var(--muted); font-size: 14px; }

/* 本機測試帳號（只在 config.local.php 存在時顯示） */
.test-accounts { margin-top: 20px; border: 2px dashed var(--gold); background: #fffbeb; border-radius: 8px; padding: 14px 16px; }
.test-accounts-title { margin: 0 0 10px; font-weight: 700; font-size: 15px; }
.test-accounts-title small { font-weight: 400; color: var(--muted); font-size: 12px; }
.test-account { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #f3e8c8; font-size: 14px; }
.test-account span { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: #444; word-break: break-all; }

/* 電子發票欄位、購買紀錄 */
.invoice-box { border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px 2px; margin: 0 0 16px; }
.invoice-box legend { font-weight: 700; font-size: 15px; padding: 0 6px; }
.invoice-box .small { margin-top: -8px; }
.pay-methods { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px 12px; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.pay-methods legend { font-weight: 700; font-size: 15px; padding: 0 6px; }
.pay-method { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; font-weight: 500; font-size: 15px; cursor: pointer; }
.pay-method input { margin: 0; width: auto; }
.pay-method:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.order-list { display: grid; gap: 14px; margin-bottom: 16px; }
.order-item h3 { margin: 0; font-size: 18px; }
.order-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 20px; margin: 12px 0; font-size: 14px; }
.order-meta dt { color: var(--muted); font-size: 13px; }
.order-meta dd { margin: 0; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.pay-info { text-align: left; background: #f5f5f5; border-radius: 6px; padding: 14px 18px; margin: 12px 0; }
.pay-info h3 { font-size: 16px; margin-bottom: 8px; }
.pay-info p { margin: 4px 0; }

/* ===== 入口網站與文章（合併 netidea.tw） ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* 主選單（含下拉） */
.nav { gap: 20px; }
.nav-toggle, .nav-burger { display: none; }
.main-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.main-nav .menu { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav .menu > li { position: relative; }
.main-nav .menu > li > a { display: block; padding: 24px 12px; color: #1e1e1e; text-decoration: none; font-weight: 500; font-size: 16px; }
.main-nav .menu > li.has-sub > a::after { content: "\25BE"; margin-left: 5px; font-size: 12px; }
.main-nav .menu > li > a:hover, .main-nav .menu > li.current > a { color: var(--brand); }
.sub-menu { list-style: none; margin: 0; padding: 8px 0; position: absolute; left: 0; top: 100%; min-width: 180px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12); border-top: 3px solid var(--brand); border-radius: 0 0 6px 6px; display: none; z-index: 60; }
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu { display: block; }
.sub-menu a { display: block; padding: 8px 18px; color: #333; text-decoration: none; font-size: 15px; }
.sub-menu a:hover { background: #f5f5f5; color: var(--brand); }
.nav-user { display: flex; gap: 14px; align-items: center; font-size: 15px; }
.nav-user a { color: #1e1e1e; text-decoration: none; }
.nav-user .nav-login { border: 1px solid var(--brand); color: var(--brand); padding: 6px 14px; border-radius: 4px; }
@media (max-width: 1000px) {
  .nav-burger { display: block; margin-left: auto; width: 34px; height: 34px; position: relative; cursor: pointer; }
  .nav-burger span, .nav-burger span::before, .nav-burger span::after { position: absolute; left: 5px; right: 5px; height: 2px; background: #1e1e1e; content: ""; }
  .nav-burger span { top: 16px; }
  .nav-burger span::before { top: -8px; left: 0; right: 0; }
  .nav-burger span::after { top: 8px; left: 0; right: 0; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; box-shadow: 0 12px 24px rgba(0,0,0,.1); max-height: calc(100vh - 62px); overflow: auto; z-index: 70; }
  .nav-toggle:checked ~ .main-nav { display: flex; }
  .site-header .nav { position: relative; }
  .main-nav .menu { flex-direction: column; }
  .main-nav .menu > li > a { padding: 12px 4px; border-bottom: 1px solid #eee; }
  .sub-menu { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 6px 14px; }
  .nav-user { flex-wrap: wrap; padding-top: 12px; }
}
/* 頁首橫幅、麵包屑 */
.page-banner { background: linear-gradient(120deg, var(--brand-dark), var(--brand)); color: #fff; padding: 44px 0; }
.page-banner h1 { margin: 0; font-size: clamp(26px, 3.4vw, 36px); }
.page-banner p { margin: 8px 0 0; opacity: .9; }
.page-banner .breadcrumb a { color: rgba(255,255,255,.85); }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
/* 首頁 */
.hero-slider { position: relative; background: #222; overflow: hidden; }
.hero-slider .slides { position: relative; aspect-ratio: 1920 / 760; max-height: 640px; width: 100%; }
.hero-slider .slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .8s; }
.hero-slider .slide.active { opacity: 1; z-index: 1; }
.hero-slider .slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-nav { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 2px solid rgba(255,255,255,.8); background: rgba(0,0,0,.2); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.slide-nav.prev { left: 24px; }
.slide-nav.next { right: 24px; }
.home-sec { padding: 64px 0; }
.home-sec.alt { background: #fafafa; }
.public-courses { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.course-card h2, .course-card h3 { font-size: 18px; margin-bottom: 6px; }
.course-price { color: var(--cta); font-size: 18px; }
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.partner { margin: 0; background: #f5f5f5; text-align: center; }
.partner a { color: inherit; text-decoration: none; }
.partner-logo { display: flex; align-items: center; justify-content: center; height: 130px; background: #fff; border: 1px solid #eee; padding: 12px; }
.partner-logo img { max-height: 100%; max-width: 100%; object-fit: contain; }
.partner figcaption { font-size: 13px; padding: 6px 4px; color: #444; }
.home-testimonials { background: var(--brand); color: #fff; padding: 110px 0 80px; clip-path: polygon(0 12%, 74% 0, 100% 10%, 100% 100%, 0 100%); margin-top: 20px; }
.testimonials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.testimonials-photo { width: 100%; box-shadow: 0 16px 40px rgba(0,0,0,.25); }
.testimonials-title { font-size: 32px; position: relative; padding-bottom: 16px; }
.testimonials-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 96px; height: 4px; background: var(--gold); }
.testimonial-slider { position: relative; min-height: 150px; }
.testimonial { margin: 0; display: none; }
.testimonial.active { display: block; animation: fadeIn .5s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.testimonial blockquote { margin: 0 0 16px; background: #fff; color: #444; border-radius: 18px; padding: 20px 22px; line-height: 1.8; }
.testimonial figcaption { display: flex; align-items: center; gap: 12px; }
.testimonial figcaption img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.testimonial figcaption small { opacity: .85; margin-left: 4px; }
.dots { display: flex; gap: 8px; margin-top: 18px; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); padding: 0; cursor: pointer; }
.dots button.active { background: var(--gold); }
.newsletter { background: var(--brand-dark); color: #fff; padding: 40px 0; }
.newsletter-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.newsletter h2 { font-size: 30px; margin: 0 0 6px; }
.newsletter p { margin: 0; opacity: .9; }
.newsletter-form input[type=email] { margin: 0 0 12px; border-radius: 2px; }
.newsletter-form .btn { border-radius: 2px; }
body.home .site-footer, body.is-post .site-footer, body.is-page .site-footer { margin-top: 0; }
/* 文章列表 */
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; padding-top: 40px; padding-bottom: 56px; align-items: start; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.post-grid.small { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.post-card { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.post-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--brand-soft); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-img > span { display: flex; align-items: center; justify-content: center; height: 100%; padding: 16px; text-align: center; font-weight: 700; color: var(--brand-dark); }
.post-card-body { display: block; padding-top: 14px; }
.post-card-body h2, .post-card-body h3 { font-size: 17px; line-height: 1.5; margin: 0 0 6px; }
.post-card-body h2 a, .post-card-body h3 a { color: #1e1e1e; text-decoration: none; }
.post-card-body h2 a:hover, .post-card-body h3 a:hover { color: var(--brand); }
.post-card-body time { font-size: 13px; color: var(--muted); }
.post-card-body p { font-size: 14px; color: #555; margin: 8px 0; }
.read-more { color: #d67c7c; font-size: 14px; text-decoration: none; }
.read-more:hover { text-decoration: underline; }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 36px; justify-content: center; }
.pagination a { padding: 7px 13px; border: 1px solid var(--line); border-radius: 4px; color: #333; text-decoration: none; }
.pagination a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.blog-side { position: sticky; top: 90px; display: grid; gap: 22px; }
.search-form { display: flex; gap: 8px; }
.search-form input { margin: 0; }
.side-box h3 { font-size: 17px; border-bottom: 2px solid var(--brand); padding-bottom: 8px; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px dashed #e5e5e5; font-size: 15px; }
.link-list li a { color: #333; text-decoration: none; }
.link-list li a:hover, .link-list li.current a { color: var(--brand); }
.link-list small { color: var(--muted); }
.side-course { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #e5e5e5; color: #333; text-decoration: none; font-size: 15px; }
.side-course span { color: var(--cta); white-space: nowrap; }
/* 單篇文章 */
.post-head { padding-top: 36px; }
.post-head.post-head-hidden { padding-top: 12px; }
.post-head h1 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.4; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.post-meta a { color: var(--muted); }
.post-cats { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.post-cats a, .post-tags a { font-size: 13px; background: var(--brand-soft); color: var(--brand-dark); padding: 2px 10px; border-radius: 99px; text-decoration: none; }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.post-cover img { width: 100%; border-radius: 6px; }
.post-body { padding-top: 20px; padding-bottom: 20px; font-size: 17px; line-height: 1.9; }
.post-body h2 { font-size: 24px; margin: 1.8em 0 .6em; padding-left: 12px; border-left: 5px solid var(--brand); }
.post-body h3 { font-size: 20px; margin: 1.5em 0 .5em; }
.post-body img { height: auto; margin: 16px auto; border-radius: 4px; }
.post-body figure { margin: 20px 0; }
.post-body figcaption { font-size: 14px; color: var(--muted); text-align: center; }
.post-body blockquote { margin: 20px 0; padding: 12px 20px; background: #f5f9fa; border-left: 4px solid var(--brand); }
.post-body table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: 1px solid #ddd; padding: 8px 10px; }
.post-body th { background: #f5f5f5; }
.post-body iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.post-body a { word-break: break-word; }
.post-foot { padding-bottom: 48px; }
.author-box { display: flex; gap: 18px; align-items: flex-start; background: #f5f5f5; border-radius: 8px; padding: 22px; margin: 28px 0; }
.author-box img, .author-initial { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-initial { display: flex; align-items: center; justify-content: center; background: var(--brand); color: #fff; font-size: 32px; font-weight: 900; }
.author-box h3 { margin: 0 0 6px; }
.author-box h3 a { color: inherit; text-decoration: none; }
.author-box p { margin: 0; font-size: 15px; color: #555; }
.related-title { font-size: 22px; margin-top: 36px; }
.empty-404 { padding: 64px 16px; }
.empty-404 .search-form { max-width: 420px; margin: 20px auto; }
.empty-404 .link-list { text-align: left; max-width: 520px; margin: 0 auto 24px; }
/* 聯絡我們 */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 40px; padding-bottom: 56px; align-items: start; }
.contact-info { margin-top: 16px; }
.contact-info p { margin: 6px 0; }
@media (max-width: 900px) {
  .blog-layout, .contact-layout, .testimonials-grid, .newsletter-inner { grid-template-columns: 1fr; }
  .blog-side { position: static; }
  .home-testimonials { clip-path: polygon(0 5%, 74% 0, 100% 4%, 100% 100%, 0 100%); padding-top: 70px; }
  .slide-nav { display: none; }
  .home-sec { padding: 44px 0; }
}
.search-form .btn { flex-shrink: 0; white-space: nowrap; padding-left: 16px; padding-right: 16px; }
.search-form input { min-width: 0; flex: 1; }
/* 手機選單：提高優先順序，蓋過舊的 .nav nav 規則 */
@media (max-width: 1000px) {
  .nav .main-nav { display: none; }
  .nav .nav-toggle:checked ~ .main-nav { display: flex; }
  .nav .main-nav .menu a { display: block; }
  .nav .main-nav .nav-user a { display: inline-block; }
}

/* AI 收錄：重點摘要、問答、相關課程、常見問題頁 */
.key-summary { background: #eef8fa; border-left: 5px solid var(--brand); border-radius: 6px; padding: 16px 20px; margin: 8px 0 4px; font-size: 16px; line-height: 1.8; }
.key-summary .eyebrow { margin-bottom: 4px; }
.post-faq { padding-bottom: 12px; }
.post-faq > h2 { font-size: 24px; padding-left: 12px; border-left: 5px solid var(--brand); }
.faq-item { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; background: #fff; }
.faq-item summary { cursor: pointer; list-style: none; padding: 14px 18px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brand); font-size: 22px; line-height: 1; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item summary h2, .faq-item summary h3 { margin: 0; font-size: 17px; }
.faq-item p { margin: 0; padding: 0 18px 16px; color: #444; line-height: 1.8; }
.post-course-cta { margin-top: 12px; margin-bottom: 8px; }
.course-cta-item { display: grid; gap: 2px; border: 2px solid var(--brand); border-radius: 8px; padding: 14px 18px; margin-bottom: 10px; color: inherit; text-decoration: none; background: #fff; }
.course-cta-item:hover { background: #f5fbfc; }
.course-cta-item strong { font-size: 17px; }
.course-cta-item span { font-size: 14px; color: var(--muted); }
.course-cta-item em { font-style: normal; color: var(--cta); font-weight: 700; }
.faq-page { padding-top: 36px; padding-bottom: 48px; }

/* 文章內相簿（相關證書、授課實況）與點擊放大 */
.post-body .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin: 16px 0 28px; }
.post-body .gallery figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.post-body .gallery a { display: block; }
.post-body .gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0; border-radius: 0; transition: transform .25s; }
.post-body .gallery a:hover img { transform: scale(1.05); }
.post-body .gallery figcaption { font-size: 13px; padding: 6px 8px; line-height: 1.5; color: #444; text-align: left; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; }
.lightbox p { color: #fff; margin: 0; }

/* 數位商品：內容清單、下載區、類型標籤 */
.product-contents { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.product-contents li { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e3ecef; border-radius: 12px; padding: 12px 16px; }
.product-contents .pc-icon { font-size: 22px; }
.product-contents .pc-title { flex: 1; font-weight: 600; }
.product-contents small { color: #6b7c83; white-space: nowrap; }
.downloads-panel { margin-bottom: 20px; }
.downloads-panel h2 { margin-top: 0; }
.download-list { list-style: none; margin: 0 0 8px; padding: 0; }
.download-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #edf1f3; }
.download-list .dl-icon { font-size: 22px; }
.download-list .dl-title { flex: 1; font-weight: 600; }
.download-list .dl-title small { display: block; font-weight: 400; color: #6b7c83; }
.kind-badge { display: inline-block; background: #e6f4f5; color: #0f6e86; border-radius: 6px; padding: 1px 8px; font-weight: 600; }
@media (max-width: 600px) { .product-contents small { display: none; } }
.consent-box { background: #f6fafb; border-radius: 10px; padding: 12px 16px; }
/* 頁面（顧問服務、關於站長）：與最新資訊同寬，內文上方留白 */
.is-page .post-body { padding-top: 32px; }
.is-page .post-body > h2:first-child { margin-top: 0; }
/* 學員中心（/my/）：分頁選單、篩選、課程與數位商品清單、訂單狀態 */
.my-nav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 0 20px; }
.my-nav a { padding: 10px 16px; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 600; }
.my-nav a:hover { color: var(--brand); }
.my-nav a.active { color: var(--brand); border-bottom-color: var(--brand); }
.my-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.my-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.my-filter a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; color: var(--text); text-decoration: none; font-size: 14px; background: #fff; }
.my-filter a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.my-filter .count { opacity: .7; font-size: 12px; margin-left: 2px; }
.my-toolbar .search-form { flex: 1; max-width: 360px; min-width: 220px; }
.lib-list { display: grid; gap: 14px; margin-bottom: 24px; }
.lib-item { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: start; }
.lib-cover img, .lib-cover .cover-placeholder { width: 140px; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; display: block; }
.lib-body h3 { margin: 4px 0 8px; font-size: 18px; }
.lib-body h3 a { color: inherit; text-decoration: none; }
.lib-tags { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lib-kind { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; }
.lib-kind.is-course { background: #e8f4f6; color: #1f6f7d; }
.lib-kind.is-product { background: #fdf0e3; color: #a3561c; }
.lib-files { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.lib-files li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; background: var(--bg-alt, #f7f7f7); border-radius: 8px; }
.order-status { font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 99px; white-space: nowrap; }
.order-status.is-paid { background: #e6f6ea; color: #1d7a3a; }
.order-status.is-pending { background: #fff4e0; color: #9a5b00; }
.order-status.is-refunded { background: #f1f1f1; color: #666; }
@media (max-width: 600px) {
  .lib-item { grid-template-columns: 88px 1fr; gap: 12px; }
  .lib-cover img, .lib-cover .cover-placeholder { width: 88px; }
  .my-nav a { padding: 8px 10px; font-size: 14px; }
  .my-toolbar .search-form { max-width: none; }
  .lib-files li { flex-direction: column; align-items: stretch; }
}
