/* 部落格文章共用樣式（/blog/*）。各篇只保留自己獨有的規則在頁內 <style>。 */
*{box-sizing: border-box;}
:root{--background: #fafcfd; --foreground: #33454e; --card: #ffffff; --border: #e1e9ec; --muted: #4c5b63; --border-hover: #9fb0b6; --primary: #42bfff; --primary-ink: #1f59e0; --primary-soft: #f2faff; --font: "Nunito Sans", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; --mono: ui-monospace, SFMono-Regular, Menlo, monospace; --col: 836px; --rail: clamp(176px, 15vw, 232px);}
body{margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--foreground); background: var(--background); -webkit-font-smoothing: antialiased;}
h1, h2, h3{margin: 0; color: var(--foreground); font-weight: 700; letter-spacing: -0.01em;}
.wrap{max-width: 1560px; margin: 0 auto; padding: 0 56px; display: grid; grid-template-columns: minmax(0, var(--rail)) minmax(0, var(--col)) minmax(0, var(--rail)); justify-content: center; column-gap: 48px;}
.col{grid-column: 2; width: 100%;}
.head{padding-top: 92px; text-align: center;}
.kicker{display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 14px; color: var(--muted);}
.kicker .cat{color: var(--primary-ink); background: var(--primary-soft); border: 1px solid #d3ecfa; border-radius: 999px; padding: 3px 11px; font-size: 13px; font-weight: 500;}
.head h1{margin: 22px 0 0; font-size: clamp(30px, 4.2vw, 46px); letter-spacing: -1.4px; line-height: 1.16; text-wrap: balance; overflow-wrap: anywhere;}
.head .lede{margin: 20px auto 0; max-width: 34em; font-size: 18px; line-height: 1.65; color: var(--muted); text-wrap: pretty;}
.byline{margin-top: 24px; font-size: 14px; color: var(--muted);}
.byline b{font-weight: 500; color: var(--foreground);}
.cover{position: relative; margin: 48px 0 0; aspect-ratio: 2.5 / 1; border-radius: 14px; overflow: hidden; background: radial-gradient(118% 94% at 16% 6%, #b9d9e8 0%, transparent 62%), linear-gradient(142deg, #f2faff 0%, #e8f5fb 100%);}
.cover img{position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;}
.body{padding: 56px 0 104px;}
.body p{margin: 0 0 22px; font-size: 17px; line-height: 1.78; color: var(--muted);}
.body h2{margin: 56px 0 18px; font-size: 26px; letter-spacing: -0.7px; line-height: 1.3; scroll-margin-top: 92px;}
.body h3{margin: 34px 0 12px; font-size: 19px; font-weight: 500; letter-spacing: -0.3px;}
.body ul{margin: 0 0 22px;}
.body li{font-size: 17px; line-height: 1.78; color: var(--muted);}
.body a{color: var(--primary-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;}
.body a:hover{text-decoration-thickness: 2px;}
.body strong{font-weight: 500; color: var(--foreground);}
.body .lead{font-size: 18.5px; line-height: 1.7; color: var(--foreground);}
.body ul.spaced{padding-left: 0; list-style: none;}
.body ul.spaced > li{position: relative; margin-bottom: 18px; padding-left: 20px;}
.body ul.spaced > li::before{content: ""; position: absolute; left: 2px; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--primary);}
.body ul.spaced > li > b{display: block; font-weight: 500; color: var(--foreground); margin-bottom: 2px;}
.fig{margin: 32px 0 36px;}
.fig img{display: block; cursor: zoom-in; transition: border-color 0.18s ease; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--card);}
.fig figcaption{margin-top: 12px; font-size: 14px; line-height: 1.6; color: var(--muted); text-align: center;}
.fig img:hover{border-color: var(--border-hover);}
.lb[hidden]{display: none;}
.lb{position: fixed; inset: 0; z-index: 63; display: grid; place-items: center; padding: 48px 32px 32px; background: rgba(18, 34, 42, 0.82); opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0s 0.2s; pointer-events: none;}
.lb.is-open{opacity: 1; visibility: visible; transition: opacity 0.2s ease, visibility 0s 0s; pointer-events: auto;}
.lb figure{margin: 0; max-width: min(1400px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 14px;}
.lb img{display: block; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; background: var(--card); transform: scale(0.98); transition: transform 0.2s ease;}
.lb.is-open img{transform: scale(1);}
.lb figcaption{flex: 0 0 auto; text-align: center; font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, 0.92);}
.lb-x{position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer; transition: background 0.18s ease;}
.lb-x:hover{background: rgba(255, 255, 255, 0.26);}
.lb-x:focus-visible{outline: 2px solid #fff; outline-offset: 2px;}
.note{margin: 32px 0; padding: 20px 24px; border-left: 2px solid var(--primary); background: var(--primary-soft); border-radius: 0 10px 10px 0;}
.note p:last-child{margin-bottom: 0;}
.phrase{display: inline-block;}
.body mark{color: inherit; padding: 0 2px; background: linear-gradient(transparent 62%, #ddf3ff 62%, #ddf3ff 94%, transparent 94%) no-repeat 0 0 / 100% 100%; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);}
.body.hl-ready mark:not(.is-on){background-size: 0% 100%;}
.table-wrap{overflow-x: auto; margin: 24px 0 28px;}
.body table{width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.6;}
.body th, .body td{text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border);}
.body thead th{font-weight: 500; color: var(--foreground); border-bottom: 1.5px solid var(--foreground);}
.body td{color: var(--muted);}
.body td:first-child{color: var(--foreground); white-space: nowrap;}
.toc{grid-column: 3; grid-row: 1; padding-top: 92px;}
.toc-in{position: sticky; top: calc(var(--aw-nav-h, 72px) + 24px);}
.toc-lbl{margin: 0 0 14px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);}
.toc ol{margin: 0; padding: 0; list-style: none;}
.toc a{display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--border); font-size: 14px; line-height: 1.5; color: var(--muted); text-decoration: none; transition: color 0.16s ease, border-color 0.16s ease;}
.toc a:hover{color: var(--foreground);}
.toc a[aria-current="true"]{color: var(--primary-ink); border-left-color: var(--primary-ink);}
.foot{border-top: 1px solid var(--border); padding: 40px 0 96px;}
.foot a{display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--primary-ink); text-decoration: none;}
.foot svg{width: 16px; height: 16px;}
@media (max-width: 1180px){.toc { display: none; } .wrap { grid-template-columns: minmax(0, var(--col)); justify-content: center; } .col { grid-column: 1; }}
@media (max-width: 720px){.wrap { padding: 0 20px; } .head { padding-top: 72px; } .cover { aspect-ratio: 2 / 1; margin-top: 36px; } .body { padding: 44px 0 72px; } .body h2 { margin-top: 44px; }}
.body ol.spaced{padding-left: 26px;}
.body ol.spaced li{margin-bottom: 18px; padding-left: 4px;}
.note .spaced{margin-bottom: 0;}
.related{margin: 0 0 32px;}
.related h2{font-size: 19px; margin-bottom: 16px;}
.related ul{list-style: none; margin: 0; padding: 0; display: grid; gap: 12px;}
.related a{line-height: 1.6;}
.anima-cta .container{max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px;}
.anima-cta .btn .arr{width: 20px; height: 20px;}
.anima-cta h2{color: #fff;}
html{scroll-behavior: smooth; overflow-x: clip; scrollbar-gutter: stable;}
@media (prefers-reduced-motion: reduce){* { animation: none !important; transition: none !important; } html { scroll-behavior: auto; }}
.anima-cta .head{padding-top: 0;}

/* Claude Motion 配圖（/site/motion/motion.js）：版位自己帶比例，不再依賴圖片的 aspect-ratio */
.cover:has(.mo){aspect-ratio:auto}
.cover .mo{border-radius:14px}
.fig .mo{border:1px solid var(--border);border-radius:12px;background:var(--card)}
