/* Q MAKER LAB — colours follow the clip graphics (navy, teal, blue, coral, amber) */
:root,
[data-theme="dark"] {
  --bg: #0a0e1a;
  --bg-2: #0d1322;
  --surface: #111a2d;
  --surface-2: #16213a;
  --surface-3: #1b2744;
  --line: #1f2b45;
  --line-2: #2b3a5c;
  --text: #f3f6fb;
  --text-2: #c3ccdb;
  --muted: #8b95a7;
  --teal: #35e0c9;
  --blue: #5b8cff;
  --coral: #ff5d73;
  --amber: #ffc24b;
  --green: #5fd39a;
  --accent: var(--teal);
  --on-accent: #06201c;
  --dot: #1a2540;
  --glow: rgba(53, 224, 201, .18);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .75);
  --shadow-sm: 0 10px 30px -18px rgba(0, 0, 0, .7);
  --code-bg: #0b1222;
  --code-line: #172139;
  --header-bg: rgba(10, 14, 26, .78);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-2: #edf1f8;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --surface-3: #e9eef7;
  --line: #e1e7f0;
  --line-2: #cfd8e6;
  --text: #0d1424;
  --text-2: #34405a;
  --muted: #647089;
  --teal: #0c9c89;
  --blue: #3563e9;
  --coral: #dc3450;
  --amber: #b7791f;
  --green: #1d8f55;
  --on-accent: #ffffff;
  --dot: #dde4ef;
  --glow: rgba(12, 156, 137, .14);
  --shadow: 0 24px 60px -30px rgba(15, 23, 42, .28);
  --shadow-sm: 0 10px 30px -20px rgba(15, 23, 42, .3);
  --code-bg: #0e1628;
  --code-line: #1a2540;
  --header-bg: rgba(245, 247, 251, .82);
  color-scheme: light;
}

:root {
  --f-head: 'Kanit', 'Sarabun', system-ui, sans-serif;
  --f-body: 'Sarabun', 'Kanit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 34px 34px;
  color: var(--text);
  font: 400 17px/1.75 var(--f-body);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; }
img { height: auto; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 700; line-height: 1.25; margin: 0; letter-spacing: -.005em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
code, kbd, pre { font-family: var(--f-mono); font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--teal); color: var(--on-accent); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 12px; }
.when-light { display: none; }
[data-theme="light"] .when-light { display: inline-flex; }
[data-theme="light"] .when-dark { display: none; }

/* ------------------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--header-bg); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line); }
.hdr { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 600 19px/1 var(--f-head); letter-spacing: .04em; white-space: nowrap; }
.brand b { color: var(--teal); font-weight: 600; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 700 18px/1 var(--f-head); color: #0a0e1a; background: linear-gradient(135deg, #35e0c9, #5b8cff); box-shadow: 0 0 22px -6px #35e0c9; }
.nav { display: flex; gap: 2px; margin-left: 10px; }
.nav a { color: var(--text-2); text-decoration: none; font: 500 15.5px/1 var(--f-head); padding: 10px 13px; border-radius: 10px; transition: color .2s, background .2s; }
.nav a:hover, .nav a[aria-current] { color: var(--text); background: var(--surface-2); }
.nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--teal); }
.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; min-width: 40px; justify-content: center; padding: 0 10px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; transition: border-color .2s, color .2s; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.search-btn { padding: 0 10px 0 12px; min-width: 150px; justify-content: flex-start; }
.search-hint { font-size: 14.5px; color: var(--muted); margin-right: auto; }
kbd { font: 500 11.5px/1 var(--f-mono); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); background: var(--bg-2); }
.menu-btn { display: none; }

/* ------------------------------------------------------------ buttons, chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 46px; padding: 0 18px; border-radius: 13px; font: 500 15.5px/1 var(--f-head); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s, background .2s, border-color .2s, color .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--teal); color: var(--on-accent); box-shadow: 0 12px 28px -14px var(--teal); }
.btn-primary:hover { color: var(--on-accent); box-shadow: 0 16px 34px -14px var(--teal); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--teal); color: var(--text); }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16.5px; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14.5px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-mini { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font: 500 13px/1 var(--f-head); text-decoration: none; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.btn-mini:hover { color: var(--text); border-color: var(--teal); }
.btn-mini.is-done { color: var(--green); border-color: var(--green); }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font: 500 14px/1.2 var(--f-head); text-decoration: none; cursor: pointer; transition: all .2s; }
.pill:hover, .pill.is-on { color: var(--text); border-color: var(--teal); background: var(--surface-2); }
.pill.is-on { box-shadow: inset 0 0 0 1px var(--teal); }
.chip, .chip-plain { display: inline-flex; align-items: center; gap: 6px; font: 500 13.5px/1.2 var(--f-head); color: var(--text-2); }
.chip { padding: 5px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); }
.chip-board { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .02em; color: var(--teal); border-color: color-mix(in srgb, var(--teal) 35%, transparent); background: color-mix(in srgb, var(--teal) 8%, transparent); }
.meta-chips, .card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.diff { display: inline-flex; align-items: center; gap: 7px; font: 500 13.5px/1 var(--f-head); color: var(--text-2); }
.diff-bars { display: inline-flex; gap: 3px; align-items: flex-end; }
.diff-bars i { width: 5px; border-radius: 2px; background: var(--line-2); }
.diff-bars i:nth-child(1) { height: 7px; } .diff-bars i:nth-child(2) { height: 11px; } .diff-bars i:nth-child(3) { height: 15px; }
.diff-1 .diff-bars i:nth-child(-n+1) { background: var(--green); }
.diff-2 .diff-bars i:nth-child(-n+2) { background: var(--amber); }
.diff-3 .diff-bars i:nth-child(-n+3) { background: var(--coral); }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.kind-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 7px; font: 600 12.5px/1.2 var(--f-head); letter-spacing: .03em; color: #0a0e1a; background: var(--teal); }
.kind-article { background: var(--blue); color: #fff; }
.kind-tip { background: var(--amber); }
.kind-shop { background: var(--coral); color: #fff; }
.cat-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font: 500 14px/1 var(--f-head); text-decoration: none; }
.cat-link:hover { color: var(--teal); }
.series { font: 500 13px/1 var(--f-mono); color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font: 500 13.5px/1.4 var(--f-head); text-decoration: none; }
.tag:hover { color: var(--teal); border-color: var(--teal); }
.tag-lg { font-size: 15px; padding: 7px 14px; }
.tag span { font: 500 11.5px/1 var(--f-mono); color: var(--muted); }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 500 13.5px/1 var(--f-head); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }
.h-sm { display: flex; align-items: center; gap: 8px; font-size: 18px; margin-bottom: 14px; }

/* ------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 100px); isolation: isolate; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(600px 380px at 78% 38%, var(--glow), transparent 70%),
  radial-gradient(520px 320px at 8% 8%, rgba(91, 140, 255, .12), transparent 70%),
  linear-gradient(transparent 70%, var(--bg)); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent); background: color-mix(in srgb, var(--teal) 8%, transparent); color: var(--teal); font: 500 14px/1.3 var(--f-head); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 var(--teal); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 60%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero-title { font-size: clamp(42px, 6.6vw, 80px); font-weight: 800; line-height: 1.08; margin: 22px 0 18px; letter-spacing: -.01em; }
.grad { background: linear-gradient(95deg, #35e0c9 0%, #5b8cff 55%, #ff5d73 110%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lede { font-size: clamp(17px, 1.6vw, 19.5px); color: var(--text-2); max-width: 36em; margin-bottom: 28px; }
.hero-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.hero-art { position: relative; }
.hero-svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .35)); }
.hero-svg .led { animation: led 1.6s ease-in-out infinite; }
@keyframes led { 50% { opacity: .35; } }
[data-theme="light"] .hero-svg rect[fill="#0f1729"] { fill: #111a2d; }

/* ------------------------------------------------------------ sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-tight { padding-top: 28px; }
.section-alt { background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box; border-block: 1px solid var(--line); background-color: var(--bg-2); }
.sub-section { margin-top: 56px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.sec-head h2 { font-size: clamp(26px, 3.2vw, 38px); }
.more { display: inline-flex; align-items: center; gap: 6px; font: 500 15px/1 var(--f-head); text-decoration: none; white-space: nowrap; }
.page-head { padding: clamp(32px, 5vw, 60px) 0 12px; }
.page-head h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; margin-bottom: 12px; }
.page-head .lede { max-width: 44em; }
.lede { font-size: clamp(17px, 1.5vw, 19px); color: var(--text-2); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 400 14px/1.4 var(--f-head); color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--teal); }
.crumbs span[aria-current] { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(42ch, 100%); min-width: 0; }
.crumbs .sep { opacity: .5; }

/* ------------------------------------------------------------ cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.post-card, .product-card { transition: transform .35s var(--ease), border-color .3s, box-shadow .3s; }
.post-card:hover, .product-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--teal) 45%, var(--line)); box-shadow: var(--shadow); }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card-link:hover { color: inherit; }
.card-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0c1222; border-bottom: 1px solid var(--line); }
.product-cover { aspect-ratio: 1 / 1; }
.card-cover > svg, .card-cover > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.card-link:hover .card-cover > svg, .card-link:hover .card-cover > img { transform: scale(1.04); }
.card-cover .kind-badge { position: absolute; left: 12px; top: 12px; }
.clip-badge { position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 7px; background: rgba(10, 14, 26, .78); color: #fff; font: 500 12.5px/1.2 var(--f-head); }
.card-cover .stock { position: absolute; right: 12px; top: 12px; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.card-title { font-size: 20px; font-weight: 600; line-height: 1.35; }
.card-summary { color: var(--text-2); font-size: 15.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; padding-top: 6px; }
.card-price { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-go { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--text-2); transition: all .25s; }
.card-link:hover .card-go { background: var(--teal); color: var(--on-accent); border-color: var(--teal); }
.empty-card { padding: 36px; text-align: center; display: grid; justify-items: center; gap: 10px; border-style: dashed; }
.empty-card h3 { font-size: 22px; }
.empty-card p { color: var(--text-2); }
.empty-ic { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: var(--teal); background: color-mix(in srgb, var(--teal) 10%, transparent); font-size: 24px; }

/* feature (latest project) */
.feature { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); overflow: hidden; box-shadow: var(--shadow); }
.feature-cover { display: block; min-height: 320px; background: #0c1222; }
.feature-cover > svg, .feature-cover > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-body { padding: clamp(24px, 3.4vw, 42px); display: flex; flex-direction: column; gap: 16px; }
.feature-title { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; }
.feature-title a { color: var(--text); text-decoration: none; }
.feature-title a:hover { color: var(--teal); }
.feature-summary { color: var(--text-2); }
.feature-files { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.feature-files a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); font: 500 13px/1.3 var(--f-mono); text-decoration: none; overflow: hidden; }
.feature-files a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feature-files a:hover { color: var(--teal); border-color: var(--teal); }
.more-files { font: 500 13px/1 var(--f-head); color: var(--muted); align-self: center; padding-left: 6px; }

/* categories */
.cat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.cat-tile { --c: var(--teal); position: relative; display: grid; gap: 8px; padding: 24px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); overflow: hidden; transition: transform .35s var(--ease), border-color .3s; }
.cat-tile::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 30%, transparent), transparent); opacity: .7; transition: transform .5s var(--ease); }
.cat-tile:hover { transform: translateY(-4px); border-color: var(--c); color: var(--text); }
.cat-tile:hover::after { transform: scale(1.35); }
.cat-0 { --c: var(--teal); } .cat-1 { --c: var(--coral); } .cat-2 { --c: var(--blue); } .cat-3 { --c: var(--amber); }
.cat-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; color: var(--c, var(--teal)); background: color-mix(in srgb, var(--c, var(--teal)) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c, var(--teal)) 30%, transparent); margin-bottom: 6px; }
.cat-ic-lg { width: 68px; height: 68px; font-size: 30px; border-radius: 18px; }
.cat-name { font: 600 21px/1.3 var(--f-head); }
.cat-desc { color: var(--text-2); font-size: 15px; line-height: 1.55; }
.cat-count { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font: 500 14px/1 var(--f-head); color: var(--c); }
.cat-head { display: flex; gap: 20px; align-items: center; }
.cat-head .cat-ic { margin: 0; }

/* shop teaser, steps, cta */
.shop-teaser { display: flex; align-items: center; gap: 22px; padding: 26px 28px; border-radius: var(--r); border: 1px dashed var(--line-2); background: var(--surface); flex-wrap: wrap; }
.shop-teaser > div:nth-child(2) { flex: 1; min-width: 240px; }
.shop-teaser h3 { font-size: 21px; margin-bottom: 4px; }
.shop-teaser p { color: var(--text-2); }
.shop-teaser-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; color: var(--coral); background: color-mix(in srgb, var(--coral) 12%, transparent); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); counter-reset: s; }
.steps li { position: relative; padding: 26px 24px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); counter-increment: s; }
.steps li::after { content: "0" counter(s); position: absolute; right: 20px; top: 14px; font: 800 44px/1 var(--f-head); color: transparent; -webkit-text-stroke: 1px var(--line-2); }
.step-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; color: var(--teal); background: color-mix(in srgb, var(--teal) 10%, transparent); margin-bottom: 14px; }
.steps h3 { font-size: 20px; margin-bottom: 6px; }
.steps p { color: var(--text-2); font-size: 15.5px; }
.cta-band { padding: clamp(40px, 6vw, 64px) 0; background: radial-gradient(700px 240px at 50% 0%, var(--glow), transparent 70%), var(--bg-2); border-top: 1px solid var(--line); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 4px; }
.cta-inner p { color: var(--text-2); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.social { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); text-decoration: none; font: 500 15px/1 var(--f-head); transition: all .2s; }
.social:hover { transform: translateY(-2px); color: var(--text); }
.social-youtube:hover { border-color: #ff3b3b; } .social-tiktok:hover { border-color: #35e0c9; } .social-facebook:hover { border-color: #3b82f6; } .social-line:hover { border-color: #06c755; } .social-shopee:hover { border-color: #ee4d2d; }
.socials-sm .social { height: 36px; padding: 0 12px; font-size: 13.5px; }

/* ------------------------------------------------------------ post */
.post-hero { padding: clamp(28px, 4vw, 48px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); background: radial-gradient(700px 300px at 85% 30%, var(--glow), transparent 70%); }
.post-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.post-hero-text { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.post-hero-text .crumbs { margin-bottom: 0; }
.post-title { font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; line-height: 1.15; }
.post-hero-art { border-radius: calc(var(--r) + 4px); overflow: hidden; border: 1px solid var(--line-2); box-shadow: var(--shadow); aspect-ratio: 16 / 11; background: #0c1222; }
.post-hero-art > svg, .post-hero-art > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: clamp(28px, 4vw, 56px); padding-top: clamp(28px, 4vw, 48px); padding-bottom: 72px; }
.post-main { min-width: 0; }
.post-aside { position: relative; }
.post-aside > * + * { margin-top: 16px; }
.post-aside .toc { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; }
.aside-card { padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.aside-card h2 { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 600; margin-bottom: 12px; color: var(--text-2); }
.toc-list { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc-list li a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font: 400 14.5px/1.45 var(--f-head); transition: color .2s, border-color .2s; }
.toc-list li.toc-l3 a { padding-left: 28px; font-size: 13.5px; }
.toc-list li a:hover { color: var(--text); }
.toc-list li a.is-active { color: var(--teal); border-left-color: var(--teal); }
.toc-mobile { display: none; margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.toc-mobile summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; font: 500 15px/1 var(--f-head); list-style: none; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile .toc-list { margin: 0 16px 14px; }
.aside-files { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 4px; }
.aside-files a { display: block; padding: 6px 10px; border-radius: 8px; font: 500 13px/1.35 var(--f-mono); color: var(--text-2); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aside-files a:hover { background: var(--surface-2); color: var(--teal); }
.qr-card { text-align: center; }
.qr-card img { display: block; margin: 0 auto 12px; border-radius: 12px; background: #fff; padding: 8px; }
.preview-bar { position: sticky; top: 66px; z-index: 30; display: flex; justify-content: center; align-items: center; gap: 10px; padding: 10px 16px; background: var(--amber); color: #1a1300; font: 500 15px/1.4 var(--f-head); text-align: center; }
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }

/* ------------------------------------------------------------ prose */
.prose { font-size: 17.5px; line-height: 1.85; color: var(--text); overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(25px, 2.8vw, 31px); margin-top: 2.2em; padding-top: .2em; position: relative; }
.prose h3 { font-size: clamp(20px, 2.2vw, 23px); margin-top: 1.8em; }
.prose h4 { font-size: 18px; margin-top: 1.5em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .7em; }
.prose > :first-child { margin-top: 0; }
.anchor { position: absolute; margin-left: -1.1em; width: 1em; color: var(--line-2); text-decoration: none; opacity: 0; transition: opacity .2s; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor { opacity: 1; }
.prose h2 .anchor, .prose h3 .anchor { position: relative; margin-left: 0; margin-right: .2em; display: none; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--teal); }
.prose .parts-list, .prose .download-list, .prose .toc-list, .prose .feature-files, .prose .aside-files { padding-left: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose :not(pre) > code { font-size: .86em; padding: .15em .45em; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--line-2); color: var(--text-2); font-style: italic; }
.prose img, .prose video { border-radius: var(--r-sm); border: 1px solid var(--line); display: block; }
.figure { display: block; }
.figcap { display: block; margin-top: 8px; font-size: 14.5px; color: var(--muted); text-align: center; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.prose table, .spec-table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.prose th, .prose td, .spec-table th, .spec-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); font: 600 15px/1.4 var(--f-head); color: var(--text); }
.prose tr:last-child td, .spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.md-missing { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: var(--r-sm); border: 1px dashed var(--coral); color: var(--coral) !important; font-size: 15px; }
.callout { --c: var(--blue); padding: 16px 20px; border-radius: var(--r-sm); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 8%, var(--surface)); }
.callout > * + * { margin-top: .6em; }
.callout-title { display: flex; align-items: center; gap: 8px; font: 600 15.5px/1.2 var(--f-head); color: var(--c); }
.callout p, .callout li { color: var(--text); }
.callout-tip { --c: var(--green); } .callout-important { --c: #b28dff; } .callout-warning { --c: var(--amber); } .callout-caution { --c: var(--coral); }
.mermaid-wrap { padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow-x: auto; text-align: center; }
.mermaid-wrap pre.mermaid { margin: 0; background: none; font-family: var(--f-body); color: var(--text-2); white-space: pre; }

/* code */
.code-block { margin: 0; border-radius: var(--r-sm); background: var(--code-bg); border: 1px solid #1c2842; overflow: hidden; position: relative; color: #e7ecf5; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px solid #1c2842; background: #0e172b; font: 500 13px/1.3 var(--f-mono); color: #9aa6bd; }
.code-title { display: inline-flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.code-title a { color: #9aa6bd; text-decoration: none; }
.code-title a:hover { color: #35e0c9; }
.code-head .btn-mini { color: #b9c3d6; border-color: #2b3a5c; }
.code-head .btn-mini:hover { color: #fff; border-color: #35e0c9; }
pre.code { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 14px; line-height: 1.7; tab-size: 2; background: var(--code-bg); color: #e7ecf5; }
.prose pre.code { font-size: 14px; }
pre.code code { font-family: var(--f-mono); display: block; min-width: max-content; }
.numbered pre.code { padding-left: 0; }
.numbered .ln { display: block; padding-right: 18px; }
.numbered .ln::before { content: attr(data-n); display: inline-block; width: 3.6em; padding-right: 1.2em; text-align: right; color: #45547a; user-select: none; -webkit-user-select: none; }
.numbered .ln:hover { background: var(--code-line); }
.code-block.is-collapsed pre.code { max-height: 520px; overflow-y: hidden; }
.code-block.is-collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 44px; height: 90px; background: linear-gradient(transparent, var(--code-bg)); pointer-events: none; }
.code-more { display: block; width: 100%; height: 44px; border: 0; border-top: 1px solid #1c2842; background: #0e172b; color: #35e0c9; font: 500 14px/1 var(--f-head); cursor: pointer; }
.code-more:hover { background: #121d36; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-doctag { color: #7aa2ff; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-char.escape_ { color: #ffb86b; }
.hljs-comment, .hljs-quote { color: #5fd39a; font-style: italic; }
.hljs-number, .hljs-symbol, .hljs-bullet { color: #ffc24b; }
.hljs-title, .hljs-title.function_, .hljs-section, .hljs-selector-id { color: #35e0c9; }
.hljs-built_in, .hljs-type, .hljs-title.class_, .hljs-selector-class { color: #c3a6ff; }
.hljs-meta, .hljs-meta .hljs-keyword { color: #ff7a8c; }
.hljs-meta .hljs-string { color: #ffb86b; }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable, .hljs-params, .hljs-property { color: #a9c7ff; }
.hljs-deletion { color: #ff7a8c; }
.hljs-link { color: #35e0c9; text-decoration: underline; }
.hljs-emphasis { font-style: italic; } .hljs-strong { font-weight: 700; }

/* post blocks */
.block-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.block-head h2 { display: flex; align-items: center; gap: 10px; margin: 0 !important; }
.parts, .files, .gallery, .kits, .clips { margin-top: 2.4em !important; }
.clips:first-child { margin-top: 0 !important; margin-bottom: 2em; }
.parts { padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.parts-progress { font: 500 14px/1 var(--f-head); color: var(--muted); padding: 7px 12px; border-radius: 999px; background: var(--surface-2); }
.parts-progress.is-done { color: var(--on-accent); background: var(--green); }
.parts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.part { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); margin: 0 !important; }
.part-check { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.part-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.part-check .box { width: 22px; height: 22px; flex: none; border-radius: 7px; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; transition: all .2s; }
.part-check .box .i { width: 15px; height: 15px; }
.part-check input:checked + .box { background: var(--green); border-color: var(--green); color: #06170e; }
.part-check input:focus-visible + .box { outline: 2px solid var(--teal); outline-offset: 2px; }
.part-name { font: 500 16px/1.4 var(--f-head); color: var(--text); }
.part-check input:checked ~ .part-name { color: var(--muted); text-decoration: line-through; }
.part-qty { font: 600 14px/1.6 var(--f-mono); color: var(--teal); align-self: center; }
.part-note { grid-column: 1 / -1; padding-left: 34px; font-size: 15px; color: var(--muted) !important; line-height: 1.55; }
.part-links { grid-column: 1 / -1; padding-left: 34px; display: flex; flex-wrap: wrap; gap: 4px 14px; font: 500 14px/1.4 var(--f-head); }
.part-links:empty { display: none; }
.part-links a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.part-price { color: var(--amber); }
.part-shop { color: var(--coral) !important; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; margin-bottom: 12px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); scrollbar-width: thin; }
.tab { flex: none; padding: 9px 14px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font: 500 13.5px/1.2 var(--f-mono); cursor: pointer; white-space: nowrap; transition: all .2s; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--surface-3); color: var(--teal); box-shadow: inset 0 0 0 1px var(--line-2); }
.js .tab-panel[data-inactive] { display: none; }
.tab-panel + .tab-panel { margin-top: 20px; }
.js .tab-panel + .tab-panel { margin-top: 0; }
.file-info { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.file-desc b { font: 600 16px/1.4 var(--f-mono); color: var(--text); }
.file-desc p { font-size: 15px; color: var(--text-2); margin-top: 2px !important; }
.file-meta { display: flex; align-items: center; gap: 10px; font: 400 13.5px/1.3 var(--f-head); color: var(--muted); }
.download-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.download-list li { margin: 0 !important; }
.download-list a { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .2s; }
.download-list a:hover { border-color: var(--teal); color: var(--text); }
.download-list .dl-name { flex: 1; font: 500 15px/1.3 var(--f-head); overflow: hidden; text-overflow: ellipsis; }
.download-list .dl-meta { font: 400 13px/1 var(--f-mono); color: var(--muted); }
.download-list p { font-size: 14.5px; padding: 4px 16px 0; color: var(--muted) !important; }
.g-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.g-item { margin: 0; }
.g-item img, .g-item video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; }
.g-item figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: #000; border: 1px solid var(--line-2); }
.yt + .yt { margin-top: 16px; }
.yt-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: #000; }
.yt-play img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .3s; border: 0; border-radius: 0; }
.yt-play:hover img { opacity: 1; }
.yt-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 54px; border-radius: 16px; background: #ff0033; color: #fff; display: grid; place-items: center; font-size: 26px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: transform .25s var(--ease); }
.yt-play:hover .yt-btn { transform: translate(-50%, -50%) scale(1.08); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video { width: 100%; }
.clip-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); margin-top: 16px; }
.clip-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .2s, transform .25s var(--ease); }
.clip-card:hover { transform: translateY(-2px); border-color: var(--teal); color: var(--text); }
.clip-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--surface-2); color: var(--teal); flex: none; }
.clip-tiktok .clip-ic { color: #25f4ee; } .clip-facebook .clip-ic { color: #4b8bff; } .clip-youtube .clip-ic { color: #ff3b3b; } .clip-instagram .clip-ic { color: #ff5d9e; }
.clip-txt { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.clip-txt b { font: 600 15.5px/1.35 var(--f-head); }
.clip-txt small { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 44px; }
.pn { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font: 500 16px/1.4 var(--f-head); transition: border-color .2s; }
.pn:hover { border-color: var(--teal); color: var(--text); }
.pn small { display: block; font-size: 13px; color: var(--muted); }
.pn-next { justify-content: flex-end; text-align: right; }

/* ------------------------------------------------------------ shop */
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-family: var(--f-head); }
.price b { font-size: 21px; font-weight: 700; color: var(--text); }
.price s { color: var(--muted); font-size: 15px; }
.price .off { font: 600 13px/1 var(--f-head); color: #fff; background: var(--coral); padding: 4px 7px; border-radius: 6px; }
.price-ask { font: 500 16px/1 var(--f-head); color: var(--amber); }
.price-lg b { font-size: clamp(32px, 4vw, 42px); }
.price-lg s { font-size: 19px; }
.stock { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 7px; font: 600 12.5px/1.2 var(--f-head); background: color-mix(in srgb, var(--green) 16%, var(--surface)); color: var(--green); }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock-low_stock { color: var(--amber); background: color-mix(in srgb, var(--amber) 16%, var(--surface)); }
.stock-out_of_stock { color: var(--coral); background: color-mix(in srgb, var(--coral) 14%, var(--surface)); }
.stock-preorder, .stock-made_to_order { color: var(--blue); background: color-mix(in srgb, var(--blue) 14%, var(--surface)); }
.product { padding: clamp(24px, 4vw, 44px) 0 clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); background: radial-gradient(640px 300px at 20% 30%, var(--glow), transparent 70%); }
.product-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.gallery-main { border-radius: calc(var(--r) + 4px); overflow: hidden; border: 1px solid var(--line-2); background: #0c1222; aspect-ratio: 1 / 1; box-shadow: var(--shadow); }
.gallery-main img, .gallery-main svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.thumb { flex: none; width: 76px; height: 76px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: var(--surface); cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-on { border-color: var(--teal); }
.product-info { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; position: sticky; top: 90px; }
.product-title { font-size: clamp(30px, 4vw, 46px); font-weight: 800; line-height: 1.15; }
.price-box { display: grid; gap: 10px; padding: 20px 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.price-note { color: var(--muted); font-size: 14px; }
.stock-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sku { font: 400 13px/1 var(--f-mono); color: var(--muted); }
.buy-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-buy { flex: 1 1 200px; height: 52px; font-size: 16.5px; }
.buy-shopee.btn-primary { background: #ee4d2d; color: #fff; box-shadow: 0 12px 28px -14px #ee4d2d; }
.buy-lazada.btn-primary { background: #0f146d; color: #fff; }
.buy-line.btn-primary { background: #06c755; color: #fff; box-shadow: 0 12px 28px -14px #06c755; }
.buy-facebook.btn-primary { background: #1877f2; color: #fff; }
.buy-soon { display: flex; align-items: center; gap: 8px; color: var(--amber); font: 500 15.5px/1.4 var(--f-head); }
.shop-note { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 15px; }
.includes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.includes li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 15.5px; }
.includes li .i { color: var(--green); margin-top: 4px; }
.product-details { display: grid; gap: 40px; max-width: 900px; }
.specs h2 { display: flex; align-items: center; gap: 10px; font-size: 24px; margin-bottom: 16px; }
.spec-table th { width: 34%; font: 500 15px/1.5 var(--f-head); color: var(--muted); background: var(--surface-2); }
.spec-table td { color: var(--text); }
.shop-empty { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 56px 24px; border-radius: var(--r); border: 1px dashed var(--line-2); background: var(--surface); }
.shop-empty > .i { width: 48px; height: 48px; color: var(--coral); }
.shop-empty p { color: var(--text-2); max-width: 36em; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.is-hidden { display: none !important; }

/* ------------------------------------------------------------ search */
.search-modal { position: fixed; inset: 0; z-index: 90; display: grid; justify-items: center; align-items: start; padding: clamp(12px, 10vh, 110px) 16px 16px; }
.search-modal[hidden] { display: none; }
.search-backdrop { position: absolute; inset: 0; background: rgba(4, 7, 14, .66); backdrop-filter: blur(4px); }
.search-panel { position: relative; width: min(680px, 100%); max-height: min(640px, 82vh); display: flex; flex-direction: column; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .8); overflow: hidden; }
.search-bar { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-bar input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; color: var(--text); font: 400 18px/1 var(--f-body); outline: none; }
.search-bar input::-webkit-search-cancel-button { display: none; }
.search-results { overflow-y: auto; padding: 8px; }
.search-results:empty { display: none; }
.sr { display: grid; gap: 3px; padding: 12px 14px; border-radius: 12px; color: var(--text); text-decoration: none; }
.sr:hover, .sr.is-active { background: var(--surface-2); color: var(--text); }
.sr-top { display: flex; align-items: center; gap: 10px; }
.sr-kind { font: 600 11.5px/1 var(--f-head); padding: 4px 7px; border-radius: 6px; background: var(--surface-3); color: var(--teal); flex: none; }
.sr-title { font: 600 16px/1.35 var(--f-head); }
.sr-sub { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.sr mark { background: color-mix(in srgb, var(--teal) 25%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.sr-empty { padding: 26px; text-align: center; color: var(--muted); }
.search-inline .search-bar { border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); margin-top: 18px; }
.search-results-page { padding: 0; display: grid; gap: 6px; }
.search-results-page .sr { border: 1px solid var(--line); background: var(--surface); }

/* ------------------------------------------------------------ connect / misc */
.copy-field { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--line-2); }
.copy-field code { flex: 1; color: #35e0c9; font-size: 15px; overflow-x: auto; white-space: nowrap; background: none !important; border: 0 !important; }
.prose pre.code { border-radius: var(--r-sm); border: 1px solid #1c2842; }
.nf { padding: clamp(64px, 12vw, 140px) 0; text-align: center; }
.nf-inner { display: grid; justify-items: center; gap: 14px; }
.nf-code { font: 800 clamp(90px, 18vw, 180px)/1 var(--f-head); background: linear-gradient(95deg, #35e0c9, #5b8cff, #ff5d73); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf h1 { font-size: 30px; }
.nf p { color: var(--text-2); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); z-index: 95; padding: 12px 18px; border-radius: 12px; background: var(--text); color: var(--bg); font: 500 15px/1.3 var(--f-head); opacity: 0; transition: opacity .25s, transform .25s var(--ease); pointer-events: none; }
.toast.is-on { opacity: 1; transform: translateX(-50%); }

/* ------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-top: 48px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; padding-bottom: 36px; }
.footer-brand { display: grid; gap: 14px; align-content: start; }
.footer-brand p { color: var(--text-2); }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.footer-links h2 { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; font-weight: 500; }
.footer-links a { display: flex; align-items: center; gap: 6px; padding: 5px 0; color: var(--text-2); text-decoration: none; font: 400 15.5px/1.4 var(--f-head); }
.footer-links a:hover { color: var(--teal); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 18px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
  .post-aside > * + * { margin-top: 0; }
  .post-aside .toc { display: none; }
  .toc-mobile { display: block; }
}
@media (max-width: 900px) {
  .hero-grid, .post-hero-grid, .product-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { max-width: 460px; margin: 0 auto; order: -1; }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature-cover { min-height: 0; aspect-ratio: 16 / 9; }
  .post-hero-art { max-width: 560px; }
  .product-info { position: static; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 66px; flex-direction: column; gap: 2px; margin: 0; padding: 10px var(--gutter) 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
  .nav-open .nav { display: flex; }
  .nav a { padding: 13px 12px; font-size: 17px; }
  .search-btn { min-width: 40px; padding: 0; }
  .search-btn .search-hint, .search-btn kbd { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .hdr { gap: 10px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 30px; height: 30px; font-size: 16px; }
  .hero-art { max-width: 340px; }
  .btn-row .btn { flex: 1 1 auto; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .prev-next { grid-template-columns: minmax(0, 1fr); }
  .prose { font-size: 16.5px; }
  pre.code { font-size: 13px; }
  .numbered .ln::before { width: 2.8em; padding-right: .9em; }
  .parts { padding: 16px; }
  .part-note, .part-links { padding-left: 0; }
  .cat-head { flex-direction: column; align-items: flex-start; }
  .footer-links { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-svg .packet { display: none; }
}
