/* 教學中心(/learn)的樣式:深藍夜空 + 金黃的調性(跟平台介紹頁同一組顏色記號),內容區白卡、留白、字級層次清楚;手機優先。
 * 390px 手機到 1280px 桌機都不橫向捲動(分頁列、影片列在自己的框裡左右滑);按鈕與分頁點擊範圍 44px 以上;鍵盤焦點看得到。 */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f6fa;
  --fg: #14213d;
  --muted: #4a5568;
  --line: #dde2ec;
  --accent: #1e3a8a;
  --accent-fg: #ffffff;
  --accent-deep: #14296b;
  --accent-soft: #e8edf9;
  --night: #0e1c3f;
  --night-2: #172b5c;
  --night-0: #0a1530;
  --night-ink: #f6f2e7;
  --night-muted: #c4cee6;
  --gold: #f2c14e;
  --gold-hi: #f7d47c;
  --on-gold: #14213d;
  --warn-bg: #fff1b8;
  --warn-fg: #4a3200;
  --ok-bg: #e3f4ea;
  --ok-fg: #14532d;
  --radius: 16px;
  --max: 72rem;
  --head-h: 112px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 1rem; line-height: 1.7; color: var(--fg); background: var(--bg-soft);
  overflow-wrap: anywhere;
}
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: 16px; padding-right: 16px; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; }
p { margin: 0 0 .8em; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.lc-head :focus-visible, .lc-hero :focus-visible, .lc-foot :focus-visible, .lc-player :focus-visible { outline-color: var(--gold); }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -120px; z-index: 40; padding: 10px 14px; background: var(--bg); color: var(--accent); border: 2px solid var(--accent); border-radius: 8px; font-weight: 700; }
.skip:focus { top: 8px; }
.lc-muted { color: var(--muted); }
.ic-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ic-fill { fill: currentColor; stroke: none; }

/* ───────── 頁首(深藍,捲動時固定在上面:標題、搜尋、分頁)───────── */
.lc-head { position: sticky; top: 0; z-index: 20; background: var(--night); color: var(--night-ink); box-shadow: 0 6px 18px rgba(10, 21, 48, .18); }
.lc-head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 10px; padding-bottom: 8px; }
.lc-title { flex: 0 0 auto; color: var(--night-ink); text-decoration: none; font-size: 1.125rem; font-weight: 800; letter-spacing: .04em; }
.lc-title::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 8px 2px 0; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.lc-search { position: relative; flex: 1 1 12rem; min-width: 0; color: var(--night-muted); }
.lc-search .ic { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; pointer-events: none; }
.lc-search input { width: 100%; min-height: 44px; padding: 8px 12px 8px 38px; font: inherit; color: var(--night-ink); background: rgba(255, 255, 255, .08); border: 1px solid rgba(196, 206, 230, .35); border-radius: 999px; }
.lc-search input::placeholder { color: var(--night-muted); opacity: .85; }
.lc-search input:focus { background: rgba(255, 255, 255, .14); border-color: var(--gold); outline: none; }
.lc-count { flex: 0 0 auto; font-size: .875rem; color: var(--night-muted); white-space: nowrap; }
.lc-count b { color: var(--gold-hi); }
.lc-tabs-wrap { border-top: 1px solid rgba(196, 206, 230, .14); }
/* 分頁:手機在自己的框裡左右滑(整頁不橫向捲動) */
.lc-tabs { display: flex; gap: 6px; padding: 8px 0 10px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.lc-tabs::-webkit-scrollbar { display: none; }
.lc-tab { flex: 0 0 auto; min-height: 44px; padding: 8px 16px; font: inherit; font-weight: 700; color: var(--night-muted); background: transparent; border: 1px solid rgba(196, 206, 230, .28); border-radius: 999px; cursor: pointer; white-space: nowrap; }
.lc-tab:hover { color: var(--night-ink); border-color: var(--night-muted); }
.lc-tab[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }

/* ───────── 每一區的主視覺(深藍夜空 + 這一區的影片)───────── */
.lc-hero { position: relative; overflow: hidden; color: var(--night-ink);
  background-color: var(--night);
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1px 1px at 32% 68%, rgba(255, 255, 255, .55), transparent 60%),
    radial-gradient(1.5px 1.5px at 58% 18%, rgba(247, 212, 124, .8), transparent 60%),
    radial-gradient(1px 1px at 78% 52%, rgba(255, 255, 255, .5), transparent 60%),
    radial-gradient(1px 1px at 90% 12%, rgba(255, 255, 255, .6), transparent 60%),
    radial-gradient(60rem 22rem at 85% -10%, rgba(247, 212, 124, .16), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); }
.lc-hero-in { padding-top: 28px; padding-bottom: 28px; }
.lc-eyebrow { margin: 0 0 .5em; font-size: .875rem; font-weight: 700; letter-spacing: .14em; color: var(--gold-hi); }
.lc-hero h2 { margin: 0 0 .35em; font-size: clamp(1.5rem, 6vw, 2.25rem); letter-spacing: .02em; color: var(--night-ink); word-break: keep-all; line-break: strict; }
.lc-hero .lc-lead { max-width: 40rem; margin: 0 0 1.2em; font-size: 1.0625rem; color: var(--night-muted); word-break: keep-all; line-break: strict; }
.lc-strip-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-size: 1rem; color: var(--night-ink); }
.lc-strip-h small { font-weight: 400; color: var(--night-muted); }
/* 影片列:左右滑,每張一個封面 + 長度 */
.lc-strip { display: flex; gap: 12px; margin: 0 -16px; padding: 4px 16px 12px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 16px; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: rgba(196, 206, 230, .4) transparent; -webkit-overflow-scrolling: touch; }
.lc-strip > li { flex: 0 0 auto; width: min(68vw, 260px); margin: 0; scroll-snap-align: start; }
.lc-vid { display: block; width: 100%; padding: 0; text-align: left; font: inherit; color: var(--night-ink); background: rgba(255, 255, 255, .05); border: 1px solid rgba(247, 212, 124, .22); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .15s, border-color .15s; }
.lc-vid:hover { transform: translateY(-2px); border-color: var(--gold); }
.lc-cover { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--night-0); }
.lc-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lc-vid.portrait .lc-cover img { object-position: center 30%; }
.lc-dur { position: absolute; right: 8px; bottom: 8px; padding: 1px 8px; font-size: .8125rem; font-weight: 700; line-height: 1.6; color: var(--on-gold); background: var(--gold); border-radius: 999px; }
.lc-cover .lc-playdot { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 11px 9px 11px 13px; border-radius: 50%; color: var(--on-gold); background: rgba(247, 212, 124, .92); box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.lc-vname { display: block; padding: 8px 12px 10px; font-weight: 700; font-size: .9375rem; line-height: 1.45; }
.lc-vname small { display: block; margin-top: 2px; font-weight: 400; font-size: .8125rem; color: var(--night-muted); }
.lc-vid[disabled] { cursor: default; opacity: .62; }
.lc-vid[disabled]:hover { transform: none; border-color: rgba(247, 212, 124, .22); }
.lc-vid[disabled] .lc-cover { display: flex; align-items: center; justify-content: center; color: var(--night-muted); font-size: .875rem; }

/* ───────── 內容區 ───────── */
.lc-body { padding-top: 24px; padding-bottom: 40px; }
.lc-sec-h { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 14px; font-size: 1.25rem; }
.lc-sec-h small { font-size: .9375rem; font-weight: 400; color: var(--muted); }
.lc-cat { margin: 0 0 22px; }
.lc-cat-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1rem; color: var(--accent-deep); }
.lc-cat-h::before { content: ""; width: 4px; height: 1.1em; border-radius: 2px; background: var(--gold); }
.lc-cat-h small { font-weight: 400; color: var(--muted); }
.lc-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 40rem) { .lc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .lc-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 功能卡:名稱、一句話、身分小標、一顆「看教學」;在哪與其他段落收起來 */
.lc-card { display: flex; flex-direction: column; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); box-shadow: 0 1px 2px rgba(20, 33, 61, .04); scroll-margin-top: calc(var(--head-h) + 12px); transition: box-shadow .2s; }
.lc-card.flash { box-shadow: 0 0 0 3px var(--gold), 0 8px 24px rgba(20, 33, 61, .12); }
.lc-card h4 { margin: 0 0 4px; font-size: 1.0625rem; }
.lc-desc { margin: 0 0 10px; font-size: .9375rem; line-height: 1.6; color: var(--muted); }
.lc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: auto 0 12px; padding: 0; list-style: none; }
.lc-chip { padding: 0 8px; font-size: .75rem; font-weight: 700; line-height: 1.75; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); }
.lc-chip.need { background: var(--warn-bg); color: var(--warn-fg); }
.lc-chip.plan { background: var(--ok-bg); color: var(--ok-fg); }
.lc-chip.adv { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.lc-chip.note { background: var(--bg-soft); color: var(--muted); font-weight: 400; }
.lc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lc-play { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px 8px 12px; font: inherit; font-weight: 700; color: var(--accent-fg); background: var(--accent); border: 0; border-radius: 999px; cursor: pointer; }
.lc-play:hover { background: var(--accent-deep); }
.lc-play .ic { width: 18px; height: 18px; color: var(--gold-hi); }
.lc-play .lc-t { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--gold-hi); }
.lc-soon { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; font-size: .875rem; color: var(--muted); background: var(--bg-soft); border-radius: 999px; }
.lc-extra { margin-top: 8px; font-size: .875rem; }
.lc-extra > summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 700; cursor: pointer; list-style: none; }
.lc-extra > summary::-webkit-details-marker { display: none; }
.lc-extra > summary::after { content: ""; width: 7px; height: 7px; margin: 0 4px 3px 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.lc-extra[open] > summary::after { transform: rotate(-135deg); margin-bottom: -2px; }
.lc-where { margin: 0 0 6px; color: var(--muted); }
.lc-segs { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lc-segs button { width: 100%; min-height: 44px; padding: 6px 12px; font: inherit; font-size: .875rem; text-align: left; color: var(--fg); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.lc-segs button:hover { border-color: var(--accent); }
.lc-segs .lc-t { float: right; margin-left: 8px; color: var(--accent); font-variant-numeric: tabular-nums; }

/* 其他身分的功能、客人看到的畫面(收起來) */
.lc-more { margin: 24px 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.lc-more > summary { display: flex; align-items: center; min-height: 56px; padding: 12px 18px; font-weight: 700; cursor: pointer; list-style: none; }
.lc-more > summary::-webkit-details-marker { display: none; }
.lc-more > summary::after { content: ""; flex: none; width: 9px; height: 9px; margin: 0 4px 3px auto; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); }
.lc-more[open] > summary::after { transform: rotate(-135deg); margin-bottom: -3px; }
.lc-more > summary small { margin-left: 8px; font-weight: 400; color: var(--muted); }
.lc-more > div { padding: 4px 16px 16px; border-top: 1px solid var(--line); background: var(--bg-soft); border-radius: 0 0 var(--radius) var(--radius); }
.lc-more .lc-cat:first-child { margin-top: 14px; }

/* ───────── POS 系統簡介 ───────── */
.lc-hero.intro .lc-hero-in { padding-top: 36px; padding-bottom: 40px; }
.lc-intro-grid { display: flex; flex-direction: column; gap: 28px; }
.lc-intro-text { min-width: 0; }
.lc-hero.intro h2 { font-size: clamp(1.75rem, 8vw, 2.75rem); }
.lc-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.lc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px; font: inherit; font-weight: 700; border-radius: 999px; text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.lc-btn.gold { min-height: 54px; padding: 12px 30px; font-size: 1.0625rem; background: var(--gold); border-color: var(--gold); color: var(--on-gold); box-shadow: 0 8px 22px rgba(242, 193, 78, .28); }
.lc-btn.gold:hover { background: var(--gold-hi); border-color: var(--gold-hi); }
.lc-btn.line { background: transparent; border-color: rgba(196, 206, 230, .55); color: var(--night-ink); }
.lc-btn.line:hover { background: var(--night-2); border-color: var(--night-ink); }
.lc-btn.soft { background: var(--bg); border-color: var(--accent); color: var(--accent); }
.lc-phone-wrap { align-self: center; width: 230px; max-width: 70%; text-align: center; }
.lc-phone { position: relative; display: block; width: 100%; padding: 10px; font: inherit; border-radius: 36px; background: #0a1226; border: 1px solid rgba(247, 212, 124, .45); box-shadow: 0 0 0 4px rgba(255, 255, 255, .04), 0 24px 48px rgba(0, 0, 0, .45); cursor: pointer; }
.lc-phone::before { content: ""; position: absolute; top: 16px; left: 50%; z-index: 1; width: 64px; height: 6px; margin-left: -32px; border-radius: 3px; background: rgba(10, 18, 38, .85); }
.lc-phone img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; object-position: top; border-radius: 27px; }
.lc-phone .lc-playdot { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; padding: 17px 14px 17px 20px; border-radius: 50%; color: var(--on-gold); background: var(--gold); box-shadow: 0 10px 26px rgba(0, 0, 0, .45); }
.lc-phone-cap { margin: 12px 0 0; font-size: .875rem; color: var(--night-muted); }
.lc-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 30rem) { .lc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .lc-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lc-tile { padding: 18px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.lc-tile .ic { width: 46px; height: 46px; margin-bottom: 10px; padding: 11px; border-radius: 14px; background: var(--night); color: var(--gold); }
.lc-tile h3 { margin: 0 0 .3em; font-size: 1.0625rem; word-break: keep-all; line-break: strict; }
.lc-tile p { margin: 0; font-size: .9375rem; line-height: 1.6; color: var(--muted); }
.lc-catcards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 40rem) { .lc-catcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .lc-catcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lc-catcard { display: flex; flex-direction: column; padding: 18px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.lc-catcard h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-size: 1.0625rem; }
.lc-catcard h3 small { flex: none; padding: 0 9px; font-size: .8125rem; line-height: 1.7; border-radius: 999px; background: var(--night); color: var(--gold-hi); }
.lc-catcard ul { margin: 0 0 10px; padding: 0; list-style: none; color: var(--muted); font-size: .9375rem; }
.lc-catcard li { position: relative; margin: 0 0 4px; padding-left: 14px; line-height: 1.55; }
.lc-catcard li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.lc-catcard a { margin-top: auto; display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; }
.lc-band { padding-top: 32px; }
.lc-band > h2 { margin: 0 0 14px; font-size: 1.375rem; }
.lc-band > p { color: var(--muted); }
.lc-final { margin: 32px 0 8px; padding: 26px 20px; text-align: center; border-radius: var(--radius); color: var(--night-ink); background: linear-gradient(135deg, var(--night) 0%, var(--night-2) 100%); }
.lc-final h2 { margin: 0 0 .4em; font-size: 1.375rem; color: var(--night-ink); }
.lc-final p { color: var(--night-muted); }
.lc-final .lc-cta { justify-content: center; }
@media (min-width: 64rem) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .lc-strip { margin: 0 -24px; padding-left: 24px; padding-right: 24px; scroll-padding-left: 24px; }
  .lc-intro-grid { flex-direction: row; align-items: center; }
  .lc-intro-text { flex: 1 1 auto; padding-right: 48px; }
  .lc-phone-wrap { flex: none; width: 270px; max-width: none; }
  .lc-hero.intro .lc-hero-in { padding-top: 64px; padding-bottom: 64px; }
  .lc-hero-in { padding-top: 40px; padding-bottom: 36px; }
}

/* 搜尋結果 */
.lc-results { padding-top: 22px; padding-bottom: 40px; }

/* ───────── 影片視窗 ───────── */
.lc-player { width: min(58rem, calc(100vw - 16px)); max-width: none; max-height: calc(100vh - 16px); padding: 0; border: 1px solid rgba(247, 212, 124, .3); border-radius: 20px; background: var(--night); color: var(--night-ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lc-player::backdrop { background: rgba(6, 12, 28, .78); }
.lc-player-box { padding: 12px 14px 16px; }
.lc-player-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lc-player-top h2 { margin: 0; font-size: 1.0625rem; color: var(--night-ink); }
.lc-x { flex: 0 0 auto; width: 44px; height: 44px; font: inherit; font-size: 1.1rem; color: var(--night-ink); background: rgba(255, 255, 255, .08); border: 1px solid rgba(196, 206, 230, .3); border-radius: 50%; cursor: pointer; }
.lc-player video { display: block; width: 100%; max-height: 60vh; margin-top: 10px; background: #000; border-radius: 12px; }
.lc-player-at { min-height: 1.2em; margin: 8px 0; font-size: .875rem; color: var(--gold-hi); }
.lc-chapters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lc-chapters button { min-height: 44px; padding: 6px 12px; font: inherit; font-size: .875rem; text-align: left; color: var(--night-muted); background: rgba(255, 255, 255, .06); border: 1px solid rgba(196, 206, 230, .22); border-radius: 999px; cursor: pointer; }
.lc-chapters button small { color: var(--night-muted); opacity: .8; font-variant-numeric: tabular-nums; }
.lc-chapters button.on { color: var(--on-gold); background: var(--gold); border-color: var(--gold); }
.lc-chapters button.on small { color: var(--on-gold); }
/* 分享:複製「從這裡開始」的連結;每個章節旁一顆小複製鈕 */
.lc-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.lc-copy { min-height: 44px; padding: 6px 14px; font: inherit; font-size: .875rem; color: var(--gold-hi); background: transparent; border: 1px solid rgba(247, 212, 124, .55); border-radius: 999px; cursor: pointer; }
.lc-copy-msg { min-height: 1.2em; font-size: .875rem; color: var(--gold-hi); }
.lc-copy-box { flex: 1 1 100%; min-height: 44px; padding: 6px 10px; font: inherit; font-size: .875rem; color: var(--night-ink); background: rgba(255, 255, 255, .08); border: 1px solid rgba(196, 206, 230, .3); border-radius: 10px; }
.lc-chapters li { display: inline-flex; align-items: center; gap: 4px; }
.lc-chapters button.lc-cp { padding: 6px 10px; font-size: .75rem; border-style: dashed; background: transparent; }

/* 頁尾(深藍) */
.lc-foot { padding: 20px 0 32px; background: var(--night-0); }
.lc-foot .wrap { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.lc-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold-hi); }
@media (prefers-reduced-motion: reduce) { .lc-vid, .lc-card { transition: none; } }
