@charset "UTF-8";
/* hmgvibe — 切割墊上的工具桌。顏色、字體與尺度集中在這裡。 */
:root {
  color-scheme: light;
  --mat: #2f5d4f;
  --body: #20453a;
  --screen-off: #173a30;
  --grid: rgba(226, 238, 230, .06);
  --grid-major: rgba(226, 238, 230, .15);
  --chalk: #f1eee4;
  --chalk-2: #ccd5cb;
  --chalk-3: rgba(241, 238, 228, .42);
  --marker: #ffd84a;
  --marker-ink: #1f1b07;
  --slip: #f4f2ea;
  --paper: #f4f3ee;
  --ink: #17231e;
  --muted: #55635d;
  --line: rgba(23, 35, 30, .14);
  --cast: rgba(8, 22, 17, .42);
  --pad: clamp(16px, 4vw, 56px);
  --header-height: 64px;
  /* 1 格 = --u；工具欄寬是 --span 格，整排剛好 --cols × --span 格 */
  --cols: 5;
  --span: 15;
  --u: clamp(14px, min(calc((100vw - 2 * var(--pad)) / (var(--cols) * var(--span))), 2.05vh), 26px);
  --sans: "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  --mono: "Cascadia Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --snap: cubic-bezier(.3, 1.35, .5, 1);
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}
:root:lang(zh-Hans) { --sans: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --mat: #1f4035;
  --body: #142d25;
  --screen-off: #0f241d;
  --grid: rgba(226, 238, 230, .05);
  --grid-major: rgba(226, 238, 230, .12);
  --slip: #dcd9cd;
  --paper: #13221c;
  --ink: #ece9df;
  --muted: #a7b3ac;
  --line: rgba(236, 233, 223, .14);
  --cast: rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 16px); }
body { margin: 0; background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
.home-page { background: var(--mat); }
body, button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
p, h1, h2, h3, h4, figure, ol, ul { margin: 0; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
a, button { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--marker); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--marker); color: var(--marker-ink); }
.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-link { position: fixed; top: 12px; left: 16px; z-index: 100; padding: 12px 18px; border-radius: 6px; background: var(--marker); color: var(--marker-ink); font-weight: 600; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

/* 墊子格線：從版心左緣（--pad）起算，粗線每 5 格 */
.mat, .grid-surface {
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: calc(var(--u) * 5) calc(var(--u) * 5), calc(var(--u) * 5) calc(var(--u) * 5), var(--u) var(--u), var(--u) var(--u);
  background-position: var(--pad) 0;
}

/* 頁首 */
.site-header {
  position: sticky; top: 0; z-index: 60; height: var(--header-height);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 var(--pad); background: var(--mat); color: var(--chalk);
  border-bottom: 1px solid var(--grid-major);
}
.detail-page .site-header::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: var(--marker); transform: scaleX(var(--scroll-progress, 0)); transform-origin: left; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1.5px solid var(--chalk); border-radius: 6px; font-family: var(--mono); font-size: 15px; font-weight: 700; letter-spacing: -.06em; }
.header-nav, .header-actions { display: flex; align-items: center; gap: 22px; }
.header-nav a, .github-link { color: var(--chalk-2); font-size: 14px; font-weight: 500; transition: color .2s ease; }
.header-nav a:hover, .github-link:hover { color: var(--chalk); }
.header-actions { gap: 10px; }
.github-link { display: inline-flex; gap: 6px; padding: 8px 4px 8px 10px; }
.lang-switch, .theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 12px;
  border: 1.5px solid var(--chalk-3); border-radius: 6px; background: transparent; color: var(--chalk);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.lang-switch:hover, .theme-toggle:hover { border-color: var(--chalk); background: rgba(241, 238, 228, .06); }
.lang-switch:active, .theme-toggle:active { transform: translateY(1px); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-sun { display: none; }
[data-theme="dark"] .theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: block; }

/* 首頁：標題列（素面墊子）＋格線墊 */
.desk { background: var(--mat); color: var(--chalk); }
.desk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 40px; padding: calc(var(--u) * 1.3) var(--pad) calc(var(--u) * 1.1); }
.desk-title h1 { font-size: clamp(26px, 2.5vw, 38px); font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
.desk-title p { margin-top: 6px; color: var(--chalk-2); font-size: 15px; line-height: 1.6; }
.filter-bar { position: relative; display: flex; gap: 2px; padding: 3px; border: 1.5px solid var(--chalk-3); border-radius: 8px; }
.filter-bar button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px;
  border: 0; border-radius: 5px; background: transparent; color: var(--chalk); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: color .2s ease, transform .15s ease;
}
.filter-bar button span { font-family: var(--mono); font-size: 12px; color: var(--chalk-2); transition: color .2s ease; }
.filter-bar button:hover:not([aria-pressed="true"]) { background: rgba(241, 238, 228, .07); }
.filter-bar button:active { transform: translateY(1px); }
.filter-bar button[aria-pressed="true"], .filter-bar button[aria-pressed="true"] span { color: var(--marker-ink); }
.filter-bar:not(.has-thumb) button[aria-pressed="true"] { background: var(--marker); }
.filter-thumb { position: absolute; top: 0; left: 0; width: var(--thumb-w, 0); height: var(--thumb-h, 0); border-radius: 5px; background: var(--marker); transform: translate(var(--thumb-x, 0), var(--thumb-y, 0)); transition: transform .32s var(--snap), width .32s var(--snap); }
.filter-bar.is-instant .filter-thumb { transition: none; }
.filter-bar:not(.has-thumb) .filter-thumb { display: none; }

.mat { position: relative; padding: calc(var(--u) * 2) var(--pad) calc(var(--u) * 2); border-top: 1px solid var(--grid-major); scroll-margin-top: var(--header-height); }
.ruler { position: absolute; top: 0; left: var(--pad); right: 0; display: flex; height: calc(var(--u) * 1.1); overflow: hidden; pointer-events: none; }
.ruler span { flex: 0 0 calc(var(--u) * 5); padding: 4px 0 0 5px; font-family: var(--mono); font-size: 11px; line-height: 1; color: var(--chalk-3); }
.tools { display: grid; grid-template-columns: repeat(var(--cols), calc(var(--u) * var(--span))); row-gap: 0; margin: 0; padding: 0; list-style: none; }
.tools > li, .tool { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
.tools > li { min-width: 0; padding-right: var(--u); }
.tool { justify-items: start; color: var(--chalk); border-radius: 6px; }
.tool > .art { align-self: end; margin-bottom: calc(var(--u) * .7); }
.tool > .tool-label { align-self: start; padding-bottom: calc(var(--u) * 2); }
.tool:focus-visible { outline-offset: 10px; }
.tool-label { display: grid; justify-items: start; gap: 2px; }
.tool-name {
  display: inline-flex; align-items: baseline; gap: 8px; padding-bottom: 3px; font-size: 18px; font-weight: 650; line-height: 1.3; letter-spacing: -.01em;
  background: linear-gradient(var(--marker), var(--marker)) 0 100% / 0 2px no-repeat; transition: background-size .28s var(--ease);
}
.tool:is(:hover, :focus-visible) .tool-name { background-size: 100% 2px; }
.tool-no { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--chalk-2); }
.tool-new { align-self: center; padding: 1px 6px; border-radius: 4px; background: var(--marker); color: var(--marker-ink); font-family: var(--mono); font-size: 11px; font-weight: 700; line-height: 1.5; }
.tool-line { max-width: 16em; color: var(--chalk-2); font-size: 14px; line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; }
.tool-os { font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--chalk-2); }

/* 線稿：機身＝深一階的墊子色，螢幕是唯一會變色的地方；影子是一塊硬邊色塊 */
.art {
  --screen: var(--screen-off); --ink-c: rgba(241, 238, 228, .66); --acc: rgba(241, 238, 228, .2); --soft: rgba(241, 238, 228, .08);
  display: block; width: calc(var(--u) * var(--w)); height: auto; overflow: visible;
  transition: transform .3s var(--snap);
}
.is-lit > .art, .art.is-lit {
  --screen: color-mix(in oklab, var(--pc) 24%, #f6f4ec);
  --ink-c: color-mix(in oklab, var(--pc) 72%, #0c1511);
  --acc: var(--pc);
  --soft: color-mix(in oklab, var(--pc) 62%, #ffffff);
}
/* 同色系的工具靠螢幕明度分開：Phnomy、Secondary 是暗螢幕，CloudNotes 是紙白，QRTrans 偏深 */
.is-lit > .art-phnomy, .art-phnomy.is-lit, .is-lit > .art-secondary, .art-secondary.is-lit {
  --screen: color-mix(in oklab, var(--pc) 58%, #07110d);
  --ink-c: color-mix(in oklab, var(--pc) 20%, #f6f4ec);
  --acc: color-mix(in oklab, var(--pc) 45%, #f6f4ec);
}
.is-lit > .art-cloudnote, .art-cloudnote.is-lit { --screen: #faf8f1; --ink-c: color-mix(in oklab, var(--pc) 85%, #000); }
.is-lit > .art-qrtrans, .art-qrtrans.is-lit { --screen: color-mix(in oklab, var(--pc) 42%, #f6f4ec); }
/* 主推：FullWidget 橫跨兩欄、一直亮著（不隨懸停切換，所以不會閃），螢幕是官網的深色桌面配四色組件 */
.tools > li.tool-featured { grid-column: span 2; }
.tool-featured .tool-name { font-size: 26px; }
.tool-featured .tool-line { max-width: 24em; font-size: 15px; }
.tool-cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; min-height: 38px; padding: 0 14px; border-radius: 6px;
  background: var(--marker); color: var(--marker-ink); font-size: 14px; font-weight: 650; box-shadow: 0 3px 0 var(--cast);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tool:hover .tool-cta { transform: translateY(-1px); box-shadow: 0 4px 0 var(--cast); }
.tool:active .tool-cta { transform: translateY(2px); box-shadow: 0 1px 0 var(--cast); }
.is-lit > .art-fullwidget { --screen: #171b21; --ink-c: #111316; }
.art-fullwidget .fw { stroke: none; }
.is-lit > .art-fullwidget .c1 { fill: #4cc9f0; }
.is-lit > .art-fullwidget .c2 { fill: #9b5de5; }
.is-lit > .art-fullwidget .c3 { fill: #ffd166; }
.is-lit > .art-fullwidget .c4 { fill: #06d6a0; }
.is-lit > .art-fullwidget > path.faint { stroke: rgba(233, 236, 239, .35); }
.art-fullwidget .l1 { fill: #4cc9f0; } .art-fullwidget .l2 { fill: #9b5de5; } .art-fullwidget .l3 { fill: #ffd166; }
.tool.is-lit:is(:hover, :focus-visible) > .art, .is-lifting > .tool > .art { transform: translateY(-4px) rotate(-.8deg); transition-delay: .05s; }
.art .cast { fill: var(--cast); stroke: none; transform: translate(1.3px, 1.9px); transition: transform .22s var(--ease); }
.tool.is-lit:is(:hover, :focus-visible) .cast, .is-lifting .cast { transform: translate(3.4px, 5.6px); }
.art .b { fill: var(--body); stroke: var(--chalk); stroke-width: .8; }
.art .s { fill: var(--screen); stroke: var(--chalk-2); stroke-width: .5; transition: fill .2s ease .09s; }
.is-lit .s { transition-delay: 0s; }
.art .p { fill: none; stroke: var(--chalk-2); stroke-width: .6; }
.art .keys { fill: none; stroke: rgba(241, 238, 228, .17); stroke-width: 5.4; stroke-dasharray: 5.6 1.3; }
.art .keys.space { stroke-width: 4.6; stroke-dasharray: none; }
.art .i { fill: none; stroke: var(--ink-c); stroke-width: .7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .15s ease; }
.art .if { fill: var(--ink-c); transition: fill .15s ease; }
.art .a { fill: var(--acc); stroke: var(--ink-c); stroke-width: .6; transition: fill .15s ease, stroke .15s ease; }
.is-lit :is(.i, .if, .a) { transition-duration: .25s; transition-delay: .12s; }
.art .faint { opacity: .55; }
.art .bold { stroke-width: 1.4; }
.art .dots { stroke-width: 1.6; }
.art .t { font-family: var(--mono); font-weight: 600; }
.art .ring { fill: none; stroke: var(--ink-c); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: .8; transition: stroke-dashoffset .25s ease, stroke .3s ease; }
.is-lit .ring { stroke-dashoffset: .34; transition: stroke-dashoffset 1.2s var(--ease) .1s, stroke .3s ease; }
.art-secondary .ring { stroke-dashoffset: .72; }
.is-lit .art-secondary .ring, .art-secondary.is-lit .ring { stroke-dashoffset: .28; }
/* TouchWrite：寫出「好」 */
.art .stroke { fill: none; stroke: var(--ink-c); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .12s ease, stroke .3s ease; }
.art .pad-glyph .stroke { stroke-width: 2.4; }
.is-lit .stroke { stroke-dashoffset: 0; transition: stroke-dashoffset .26s ease-out calc(var(--d) * .2s + .12s), stroke .3s ease; }
.art .finger { fill: var(--pc); opacity: 0; transition: opacity .2s ease; }
.is-lit .finger { opacity: 1; transition: opacity .3s ease 1.3s; }
/* ClassFlow：方塊落進課表 */
.art .drop, .art .print, .art .shackle, .art .bar, .art .prog, .art .sprig, .art .btn-a { transform-box: fill-box; }
.art .drop { transform: translateY(-7px); opacity: 0; transition: transform .15s ease, opacity .15s ease; }
.is-lit .drop { transform: none; opacity: 1; transition: transform .45s var(--snap) .2s, opacity .12s ease .2s; }
.art .tick { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .1s ease; }
.is-lit .tick { stroke-dashoffset: 0; transition: stroke-dashoffset .3s ease .55s, stroke .3s ease; }
/* Phnomy：葉子 */
.art .leaf { fill: var(--body); stroke: var(--chalk); stroke-width: .6; transition: fill .4s ease; }
.is-lit .leaf { fill: color-mix(in oklab, var(--pc) 55%, #f1eee4); }
.art .sprig { transform-origin: 30% 100%; transition: transform .6s var(--snap); }
.is-lit .sprig { transform: rotate(-5deg); }
/* Secondary：長條升起、折線畫出 */
.art .bar { transform-origin: 50% 100%; transform: scaleY(.3); transition: transform .2s ease; }
.is-lit .bar { transform: none; transition: transform .45s var(--snap) calc(var(--d) * 60ms + .1s); }
.art .line { stroke-dasharray: 1; stroke-dashoffset: .55; transition: stroke-dashoffset .2s ease; }
.is-lit .line { stroke-dashoffset: 0; transition: stroke-dashoffset .9s var(--ease) .2s, stroke .3s ease; }
/* QRTrans：方格閃動、光線送出 */
.art .qb { opacity: 0; }
.art-qrtrans .prog { transform-origin: 0 50%; transform: scaleX(.22); transition: transform .2s ease; }
.is-lit .art-qrtrans .prog, .art-qrtrans.is-lit .prog { transform: none; transition: transform 2.4s linear .1s; }
.art .ray { fill: none; stroke: var(--chalk-3); stroke-width: .7; stroke-linecap: round; stroke-dasharray: 2 2.4; transition: stroke .3s ease; }
.is-lit .ray { stroke: var(--marker); }
/* NextPhoto：相片滑出 */
.art .print { transform: translate(-13px, 2px) rotate(-4deg); transition: transform .3s ease; }
.is-lit .print { transform: rotate(5deg); transition: transform .55s var(--snap); }
.art .th { fill: transparent; stroke: var(--ink-c); stroke-width: .45; transition: fill .3s ease; }
.is-lit .th0 { fill: color-mix(in oklab, var(--pc) 30%, #f6f4ec); }
.is-lit .th1 { fill: color-mix(in oklab, var(--pc) 50%, #f6f4ec); }
.is-lit .th2 { fill: color-mix(in oklab, var(--pc) 70%, #f6f4ec); }
.is-lit .th3 { fill: var(--pc); }
/* CloudNotes：鎖扣上 */
.art .shackle { transform: translateY(-2.4px); transition: transform .15s ease; }
.is-lit .shackle { transform: none; transition: transform .3s var(--snap) .25s; }
/* Beautiful Waste：霧 */
.art .mist ellipse { fill: var(--soft); transition: fill .5s ease; }
.art .m1, .art .m2 { transform-box: fill-box; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .is-lit .qa { animation: blink-a 1.1s steps(1) infinite; }
  .is-lit .qb { animation: blink-b 1.1s steps(1) infinite; }
  .is-lit .ray { animation: ray .7s linear infinite; }
  .is-lit .btn-a { transform-origin: 50% 50%; animation: press 1.4s var(--ease) .2s infinite; }
  .is-lit .m1 { animation: drift-a 5s ease-in-out infinite alternate; }
  .is-lit .m2 { animation: drift-b 6s ease-in-out infinite alternate; }
}
@keyframes blink-a { 50% { opacity: 0; } }
@keyframes blink-b { 50% { opacity: 1; } }
@keyframes ray { to { stroke-dashoffset: -4.4; } }
@keyframes press { 0%, 40%, 100% { transform: none; } 15% { transform: scale(.74); } }
@keyframes drift-a { to { transform: translate(14px, -6px) scale(1.1); } }
@keyframes drift-b { to { transform: translate(-16px, 7px) scale(.92); } }

/* 篩選：不符合的工具先被拿起，再留下一圈虛線壓痕 */
.tools > li { transition: opacity .25s ease; }
.tools > li.is-off { opacity: .55; }
.is-off .art * { fill: transparent !important; }
.is-off .art .cast { opacity: 0; }
.is-off .art :is(.b, .s, .p, .leaf) { stroke-dasharray: 1.6 1.4; }
.is-off .art :is(.i, .if, .a, .stroke, .ray, .t) { opacity: .25; }
.is-off :is(.tool-line, .tool-os) { visibility: hidden; }
.tools > li.is-placing { animation: re-place .34s cubic-bezier(.2, .8, .25, 1) both; }
@keyframes re-place { from { opacity: .4; transform: translateY(-12px) rotate(-3deg); } }

/* 關於：放在同一張墊上的三張紙條 */
.notes { margin-top: calc(var(--u) * 4); }
.notes h2 { margin-bottom: calc(var(--u) * 1.2); font-size: 20px; font-weight: 650; color: var(--chalk); }
.note-list { display: grid; grid-template-columns: calc(var(--u) * var(--cols) * var(--span) * .55) calc(var(--u) * var(--cols) * var(--span) * .45); grid-template-rows: auto auto; align-items: start; row-gap: calc(var(--u) * 1.2); padding: 0; list-style: none; }
.note:first-child { grid-row: span 2; gap: 14px; padding: calc(var(--u) * 1.8) calc(var(--u) * 1.8) calc(var(--u) * 2); }
.note:first-child h3 { font-size: clamp(24px, 2.2vw, 32px); }
.note:first-child p { font-size: 17px; }
.note:not(:first-child) { padding: calc(var(--u) * .9) calc(var(--u) * 1.1); }
.note:not(:first-child) h3 { font-size: 17px; }
.note:not(:first-child) p { font-size: 15px; }
.note {
  display: grid; align-content: start; gap: 10px; margin-right: calc(var(--u) * 2); padding: calc(var(--u) * 1.2) calc(var(--u) * 1.2) calc(var(--u) * 1.3);
  border-radius: 3px; background: var(--slip); color: #17231e; box-shadow: 4px 6px 0 var(--cast); transform: rotate(var(--r, 0deg));
}
.note h3 { font-size: 19px; font-weight: 700; line-height: 1.4; }
.note p { color: #45524c; font-size: 16px; line-height: 1.75; }
.note-action { justify-self: start; display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; min-height: 44px; padding: 0 16px; border-radius: 6px; background: var(--marker); color: var(--marker-ink); font-size: 15px; font-weight: 650; box-shadow: 0 3px 0 rgba(8, 22, 17, .35); transition: transform .15s ease, box-shadow .15s ease; }
.note-action:hover { transform: translateY(-1px); box-shadow: 0 4px 0 rgba(8, 22, 17, .35); }
.note-action:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(8, 22, 17, .35); }
.note-link { justify-self: start; padding-bottom: 2px; border-bottom: 1.5px solid currentColor; font-size: 15px; font-weight: 600; }
.note-link:hover { color: #000; }
.note :focus-visible { outline-color: #17231e; }

/* 主按鈕（詳細頁共用） */
.detail-page .download {
  display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 22px; border-radius: 6px;
  background: var(--marker); color: var(--marker-ink); font-size: 16px; font-weight: 650; white-space: nowrap;
  box-shadow: 0 4px 0 var(--cast); transition: transform .15s ease, box-shadow .15s ease;
}
.detail-page .download:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--cast); }
.detail-page .download:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cast); }

/* 頁尾 */
footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px var(--pad) 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer a:hover { color: var(--ink); }
.home-page .site-footer { background: var(--mat); border-top-color: var(--grid-major); color: var(--chalk-2); }
.home-page .site-footer a:hover { color: var(--chalk); }
.footer-brand { color: var(--chalk); font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.footer-meta { display: flex; gap: 24px; }

/* 出場：工具與紙條像被放上墊子——先快後慢，帶一點旋轉後擺正 */
@media (prefers-reduced-motion: no-preference) {
  .tools > li { animation: place .32s cubic-bezier(.2, .8, .25, 1) backwards; animation-delay: calc(var(--i) * 30ms + 60ms); }
}
@keyframes place { from { opacity: 0; transform: translateY(-12px) rotate(-3deg); } }
.motion-ready [data-reveal] { opacity: 0; transform: translateY(-12px) rotate(-2.5deg); transition: opacity .3s ease, transform .5s var(--snap); }
.motion-ready [data-reveal].is-revealed { opacity: 1; transform: none; }
.motion-ready .note[data-reveal] { transform: translateY(-16px) rotate(calc(var(--r) - 4deg)); }
.motion-ready .note[data-reveal].is-revealed { transform: rotate(var(--r)); }
.note:nth-child(2) { transition-delay: 70ms; }
.note:nth-child(3) { transition-delay: 140ms; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
::view-transition-group(*) { animation-duration: .38s; animation-timing-function: var(--ease); }

@media (max-width: 1199px) {
  :root { --cols: 3; --span: 20; }
  .tools > li.is-off { order: 1; }
  .is-off :is(.tool-line, .tool-os) { display: none; }
  .desk-head { flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .header-nav { display: none; }
}
@media (max-width: 760px) {
  :root { --header-height: 58px; --cols: 2; --span: 10; --u: clamp(12px, calc((100vw - 2 * var(--pad)) / 20), 17px); }
  .site-header { gap: 10px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 28px; height: 28px; font-size: 14px; }
  .header-actions { gap: 8px; }
  .theme-label { display: none; }
  .theme-toggle { width: 36px; padding: 0; }
  .lang-switch { padding: 0 10px; }
  .github-link { padding-left: 4px; }
  .desk-head { flex-direction: column; align-items: stretch; gap: 16px; padding-top: 22px; }
  .filter-bar { width: 100%; max-width: 100%; contain: inline-size; overflow-x: auto; scrollbar-width: none; padding-right: 28px; -webkit-mask-image: linear-gradient(90deg, #000 84%, transparent); mask-image: linear-gradient(90deg, #000 84%, transparent); }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-bar button { flex: 0 0 auto; padding: 0 10px; }
  .tool > .tool-label { padding-bottom: 30px; }
  .tools > li { padding-right: 14px; }
  .art { max-width: 100%; }
  .tool-line { max-width: none; }
  .note-list { grid-template-columns: minmax(0, calc(var(--u) * 20)); row-gap: 24px; }
  .note:first-child { grid-row: auto; }
  .note { margin-right: 0; }
  footer { flex-direction: column; align-items: flex-start; }
  .footer-meta { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion-ready [data-reveal] { opacity: 1 !important; transform: none !important; }
  .motion-ready .note[data-reveal] { transform: rotate(var(--r)) !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
