/* 使用教學頁（/guide）：仿影片播放器（player.js）＋單元選單、段落、文字稿。樣式參照 Line/big_site 的 voice-player.css，配色改成美業圈 */
.vp { position: relative; margin-inline: auto; color: #fff; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.vp-screen { position: relative; overflow: hidden; border-radius: 18px; background: #2a2226; box-shadow: 0 24px 60px rgba(58, 50, 56, .28); }
.vp[data-format="landscape"] .vp-screen { width: 100%; aspect-ratio: 16 / 9; }
.vp[data-format="portrait"] .vp-screen { width: 100%; aspect-ratio: 9 / 16; }
.vp.is-fs { display: grid; place-items: center; width: 100%; height: 100%; background: #000; }
.vp.is-fs .vp-screen { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; background: #000; }
.vp-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.vp-hit { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.vp.is-idle, .vp.is-idle .vp-hit { cursor: none; }
.vp button { font: inherit; color: inherit; }
.vp svg { fill: currentColor; stroke: none; }

.vp-spinner { position: absolute; left: 50%; top: 50%; z-index: 2; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .25); border-top-color: #fff; opacity: 0; pointer-events: none; transition: opacity .2s; animation: vp-spin .8s linear infinite; }
.vp.is-loading .vp-spinner { opacity: 1; transition-delay: .25s; }
@keyframes vp-spin { to { transform: rotate(360deg); } }

.vp-big { position: absolute; left: 50%; top: 50%; z-index: 3; width: 88px; height: 88px; margin: -44px 0 0 -44px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(192, 68, 107, .94); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); cursor: pointer; transition: transform .2s, opacity .2s, visibility .2s; }
.vp-big svg { width: 40px; height: 40px; margin-left: 5px; }
.vp-big:hover { transform: scale(1.08); }
.vp.is-playing .vp-big, .vp.is-loading .vp-big, .vp.is-ended .vp-big { opacity: 0; visibility: hidden; }

.vp-unmute { position: absolute; right: 16px; top: 16px; z-index: 4; display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border: 0; border-radius: 999px; background: rgba(42, 34, 38, .84); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); font-weight: 900; font-size: 1rem; letter-spacing: .04em; cursor: pointer; animation: vp-nudge 2.4s ease-in-out 1s infinite; }
.vp-unmute svg { width: 22px; height: 22px; }
.vp-unmute:hover { background: rgba(192, 68, 107, .95); animation: none; }
.vp-unmute[hidden] { display: none; }
.vp-unmute.is-wait { animation: none; cursor: default; }
.vp-unmute.is-wait:hover { background: rgba(42, 34, 38, .84); }
.vp-unmute.is-wait svg { display: none; }
.vp-unmute.is-wait::before { content: ''; width: 16px; height: 16px; margin: 0 3px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: vp-spin .8s linear infinite; }
.vp-pct { font-variant-numeric: tabular-nums; }
.vp-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@keyframes vp-nudge { 0%, 70%, 100% { transform: none; } 80% { transform: scale(1.06); } 90% { transform: scale(.98); } }

.vp-end { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 14px; background: rgba(42, 34, 38, .74); text-align: center; padding: 16px; }
.vp-end[hidden] { display: none; }
.vp-replay { display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; border: 2px solid rgba(255, 255, 255, .8); border-radius: 999px; background: none; font-weight: 900; cursor: pointer; }
.vp-replay svg { width: 22px; height: 22px; }
.vp-replay:hover { background: rgba(255, 255, 255, .14); }
.vp-next { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 900; text-decoration: none; }
.vp-next:hover { background: var(--primary-dark); }

.vp-ui { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 26px 14px 8px; background: linear-gradient(transparent, rgba(30, 22, 26, .74)); transition: opacity .3s, visibility .3s; }
.vp.is-idle .vp-ui { opacity: 0; visibility: hidden; }
.vp-row { display: flex; align-items: center; gap: 4px; min-height: 44px; }
.vp-row button { display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; opacity: .92; }
.vp-row button:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
.vp-row button svg { width: 26px; height: 26px; }
.vp .i-pause, .vp.is-playing .i-play, .vp .i-sound, .vp.is-muted .i-sound { display: none; }
.vp.is-playing .i-pause, .vp:not(.is-muted) .i-sound, .vp.is-muted .i-muted { display: block; }
.vp:not(.is-muted) .i-muted { display: none; }
.vp .i-fs-exit, .vp.is-fs .i-fs, .vp.is-float .i-fs { display: none; }
.vp.is-fs .i-fs-exit, .vp.is-float .i-fs-exit { display: block; }

.vp-float-bg { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 99; background: rgba(30, 22, 26, .97); padding: calc(12px + env(safe-area-inset-top, 0px)) calc(12px + env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px)); }
.vp-float-bg[hidden] { display: none; }
.vp.is-float .vp-screen { position: fixed; z-index: 100; margin: 0; aspect-ratio: auto; border-radius: 10px; }
.vp.is-float .vp-ui { padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
html.vp-float-open, html.vp-float-open body { overflow: hidden; }
.vp-vol { display: flex; align-items: center; }
.vp-volume { width: 0; opacity: 0; margin: 0; accent-color: var(--primary); transition: width .25s, opacity .25s, margin .25s; }
.vp-vol:hover .vp-volume, .vp-volume:focus-visible { width: 76px; opacity: 1; margin: 0 8px 0 2px; }
@media (hover: none) { .vp-volume { display: none; } }
.vp-time { padding: 0 8px; font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vp-chap { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; opacity: .85; }
.vp-chap::before { content: '・'; opacity: .6; }
.vp-cc { font-weight: 900 !important; font-size: .82rem !important; letter-spacing: .04em; }
.vp-cc span { padding: 2px 5px; border: 2px solid currentColor; border-radius: 5px; }
.vp-cc[aria-pressed="false"] { opacity: .55 !important; }
.vp-cc[aria-pressed="true"] span { background: #fff; color: #2a2226; border-color: #fff; }

.vp-progress { position: relative; height: 18px; margin: 0 6px 2px; cursor: pointer; touch-action: none; }
.vp-progress:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 4px; }
.vp-seg { position: absolute; top: 7px; height: 4px; padding-right: 3px; background-clip: content-box; transition: top .15s, height .15s; }
.vp-seg::before { content: ''; position: absolute; left: 0; right: 3px; top: 0; bottom: 0; border-radius: 2px; background: rgba(255, 255, 255, .32); }
.vp-seg i { position: absolute; left: 0; right: 3px; top: 0; bottom: 0; border-radius: 2px; background: var(--primary); transform-origin: 0 50%; transform: scaleX(0); }
.vp-progress:hover .vp-seg, .vp.is-scrubbing .vp-seg { top: 6px; height: 6px; }
.vp-knob { position: absolute; top: 9px; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px rgba(255, 255, 255, .9); transform: scale(0); transition: transform .15s; pointer-events: none; }
.vp-progress:hover .vp-knob, .vp-progress:focus-visible .vp-knob, .vp.is-scrubbing .vp-knob { transform: none; }
.vp-tip { position: absolute; bottom: 24px; transform: translateX(-50%); padding: 6px 10px; border-radius: 8px; background: rgba(30, 22, 26, .9); font-size: .8rem; line-height: 1.35; white-space: nowrap; text-align: center; opacity: 0; pointer-events: none; transition: opacity .15s; }
.vp-tip b { display: block; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .vp-progress:hover .vp-tip { opacity: 1; } }
.vp.is-scrubbing .vp-tip { opacity: 1; }
@media (max-width: 600px) {
    .vp-ui { padding: 22px 6px 4px; }
    .vp-row button { width: 40px; height: 40px; }
    .vp-row button svg { width: 24px; height: 24px; }
    .vp-chap { display: none; }
    .vp-time { margin-right: auto; }
    .vp-unmute { right: 10px; top: 10px; padding: 8px 14px 8px 12px; font-size: .92rem; }
}

/* 舊瀏覽器的純語音播放（player.js 的 fallback） */
.vp.vp-fallback { color: var(--ink); user-select: auto; }
.vpf { display: flex; flex-direction: column; gap: 10px; }
.vpf-note { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-ink); font-weight: 700; }
.vpf img { width: 100%; height: auto; border-radius: 18px; }
.vpf audio { width: 100%; }

/* ── 影片下方：標題、單元選單、段落、文字稿 ── */
.voice-info { margin-top: 22px; }
.voice-info h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 900; line-height: 1.3; color: var(--primary-ink); margin: 0; }
.voice-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 10px; font-size: .92rem; color: var(--muted); }
.voice-meta span + span::before { content: '・'; margin-right: 14px; opacity: .6; margin-left: -14px; }
.vm-ep { font-weight: 900; color: var(--primary); }
.voice-desc { max-width: 760px; margin: 0; }
.vep { margin-top: 26px; }
.vep h2 { margin: 0 0 12px; }
.vep-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.vep-list a { display: grid; grid-template-columns: 3.2em 1fr auto; align-items: baseline; gap: 8px; height: 100%; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-weight: 700; text-decoration: none; }
.vep-list a:hover { background: var(--sand); }
.vep-list a[aria-current] { background: var(--primary-soft); color: var(--primary-ink); }
.vep-no { font-weight: 900; color: var(--primary); }
.vep-dur { font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.vep-tip { margin: 10px 0 0; font-size: .85rem; color: var(--muted); }
.voice-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; margin-top: 30px; align-items: start; }
@media (max-width: 860px) { .voice-cols { grid-template-columns: 1fr; } }
.voice-box { padding: 20px 22px; border: 1.5px solid var(--sand-line); border-radius: var(--radius); background: var(--paper); }
.voice-box h2 { margin: 0 0 12px; font-size: 1.15rem; font-weight: 900; color: var(--primary-ink); }
.vchapters { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.vchapters button { display: grid; grid-template-columns: 3.4em 1fr; align-items: baseline; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.vchapters button:hover { background: var(--sand); }
.vchapters button[aria-current] { background: var(--primary-soft); color: var(--primary-ink); }
.vc-time { font-variant-numeric: tabular-nums; color: var(--primary); font-weight: 900; }
.vtranscript summary { cursor: pointer; font-size: 1.15rem; font-weight: 900; color: var(--primary-ink); }
.vtranscript[open] summary { margin-bottom: 8px; }
.vtranscript section + section { margin-top: 14px; }
.vtranscript h3 { display: flex; gap: 10px; align-items: baseline; margin: 0; font-size: 1rem; font-weight: 900; }
.vtranscript h3 span { font-variant-numeric: tabular-nums; font-size: .88rem; color: var(--primary); }
.vtranscript p { margin: 4px 0 0; line-height: 1.8; }
.voice-note { margin-top: 18px; font-size: .85rem; color: var(--muted); }
