/* ============================================================================
   sg.css — /series-guide/(系列介紹)= /m/series-shop.html 的官網照抄版
   組成:shell.css 的 reset+.mlang 節錄 + series.css(hero 圖路徑改 ./assets/)
        + series-shop.css 原封。設計勿在此改 — 要改先對照 /m/ 原稿。
   ============================================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; }
img { max-width: 100%; }
button { font: inherit; }
:where(a) { text-decoration: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
.brand > a { display: inline-flex; align-items: center; min-height: 40px; }
@media (max-width: 760px) { footer a { display: inline-block; padding-block: 10px; } }
.mlang { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; overflow: hidden; flex: none; }
.mlang button { appearance: none; border: 0; background: none; color: inherit; opacity: .62;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; line-height: 1;
  padding: 9px 13px; min-height: 38px; cursor: pointer;
  transition: background .18s ease, color .18s ease, opacity .18s ease; }
.mlang button + button { border-left: 1px solid var(--line2); }
.mlang button:hover { opacity: 1; }
.mlang button.is-on { background: var(--red); color: var(--red-fg); opacity: 1; }
.mlang button:focus-visible { outline: 2px solid var(--red-ink); outline-offset: 2px; }

/* M · Series Index — dual theme (Lumen / Noir) */

:root[data-theme='light'] {
  --bg: #F6F4EF;
  --bg2: #F0EDE5;
  --ink: #141416;
  --ink2: #3A3833;
  --muted: #63605A;
  --line: #D3CEC3;
  --line2: #BFB9AB;
  --red: #C2151F;
  --red-ink: #A8121B;
  --red-fg: #FFFFFF;
  --hover-bg: #141416;
  --hover-fg: #F6F4EF;
  --scrim: 246, 244, 239;
  --hero: url('./assets/hero-light.jpg');
  --cta-img: url('./assets/shop-workshop.jpg');
  --m-shell-bg: #FFFFFF;
  --m-shell-fg: #141416;
  --m-shell-line: #D3CEC3;
  --m-shell-accent: #C2151F;
  --m-shell-accent-fg: #FFFFFF;
}
:root[data-theme='dark'] {
  --bg: #070708;
  --bg2: #0B0B0C;
  --ink: #F4F2EE;
  --ink2: #DAD7D0;
  --muted: #ABA8A1;
  --line: #2A2A2F;
  --line2: #3A3A40;
  --red: #C2151F;
  --red-ink: #FF7B80;
  --red-fg: #FFFFFF;
  --hover-bg: #C2151F;
  --hover-fg: #FFFFFF;
  --scrim: 7, 7, 8;
  --hero: url('./assets/hero-dark.jpg');
  --cta-img: url('./assets/fleet-dusk.jpg');
  --m-shell-bg: #121214;
  --m-shell-fg: #F4F2EE;
  --m-shell-line: #33333A;
  --m-shell-accent: #C2151F;
  --m-shell-accent-fg: #FFFFFF;
  --m-shell-accent-ink: #FF7B80;   /* #C2151F on the dark shell is only 3.05:1 */
  --band-mix: 11%;   /* 章節條底板混入的分類色比例(亮色 6%;深底吃色要多一點才看得出來) */
  --band-ink-mix: 45%; /* 章節條 h3 標題混入的分類色比例(亮色 38%) */
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Grotesk', 'Noto Sans TC', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  transition: background .3s ease, color .3s ease;
}
a { color: inherit; }
::selection { background: var(--red); color: #fff; }

.serif {
  font-family: 'Noto Serif TC', 'Iowan Old Style', Georgia, serif;
  font-weight: 900;
  letter-spacing: -.005em;
}
/* 全站同一格:1304px = sitenav 黑條 max-width 1340 − 2×18 內距。
   ≥1448px 才會生效(以下維持原本的 clamp),讓頁首選單與底下的內容不會一個縮排一個滿版。*/
.pad { padding-inline: max(clamp(20px, 5vw, 72px), (100% - 1304px)/2); }
.eyebrow {
  font-size: 12.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red-ink);
}
.dot { color: var(--red-ink); }

@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes kenburns { from { transform: scale(1.06) translateX(1.4%); } to { transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; overflow: clip; }
.hero-bg {
  position: absolute; inset: 0;
  background: var(--hero) center right / cover no-repeat;
  animation: kenburns 16s ease-out both;
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(var(--scrim), .96) 0%, rgba(var(--scrim), .74) 42%, rgba(var(--scrim), .10) 76%),
    linear-gradient(to top, rgba(var(--scrim), .97) 0%, rgba(var(--scrim), 0) 36%);
}

.top {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: flex-start;
  gap: 14px; flex-wrap: wrap;
  padding-block: clamp(16px, 2.6vw, 28px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { height: 30px; width: auto; display: block; }
.brand-tag {
  font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
  border-left: 1px solid var(--line2); padding-left: 14px;
}
.top-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.tbtn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line2); background: none; color: var(--ink);
  border-radius: 999px; padding: 9px 15px; min-height: 38px;
  font-size: 12.5px; letter-spacing: .04em; cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.tbtn:hover { border-color: var(--red-ink); color: var(--red-ink); }
.tbtn:focus-visible { outline: 2px solid var(--red-ink); outline-offset: 2px; }
.tbtn.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }   /* 2026-08-16:作用中的主題鈕要看得出來(之前兩顆長一樣) */
.cta-link {
  display: inline-flex; align-items: center; min-height: 38px;
  padding: 9px 18px; background: var(--red); color: var(--red-fg);
  font-size: 13px; font-weight: 700; letter-spacing: .05em; border-radius: 999px;
  transition: background .18s ease;
}
.cta-link:hover { background: var(--red-ink); color: var(--red-fg); }
:root[data-theme='dark'] .cta-link:hover { background: #E01E29; }

.hero-body {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-block: 0 clamp(40px, 6vw, 76px);
}
.hero-body .eyebrow { animation: rise .8s ease both; }
.hero h1 {
  margin: 14px 0 0;
  font-size: clamp(42px, 8.2vw, 116px);
  line-height: 1.16;
  color: var(--ink);
  animation: rise .9s ease .1s both;
}
.hero-foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  margin-top: clamp(22px, 3.4vw, 40px);
  animation: rise .9s ease .22s both;
}
.stats { display: flex; gap: clamp(22px, 4vw, 56px); flex-wrap: wrap; }
.stat-n { font-weight: 700; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -.01em; }
.stat-l { font-size: 12.5px; letter-spacing: .12em; color: var(--muted); margin-top: 5px; }
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .1em; color: var(--ink2); }
.scroll-cue:hover { color: var(--red-ink); }
.scroll-cue span {
  width: 42px; height: 42px; border: 1px solid var(--line2); border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
  animation: bob 2.4s ease-in-out infinite;
}
.hero-credit {
  position: absolute; right: clamp(20px, 5vw, 72px); bottom: clamp(12px, 2vw, 20px);
  font-size: 11px; letter-spacing: .16em; color: var(--muted); white-space: nowrap;
}

/* ---------- marquee ---------- */
.marq { border-block: 1px solid var(--line); background: var(--bg2); overflow: clip; padding: 15px 0; }
.marq-track { display: flex; width: max-content; animation: marquee 52s linear infinite; }
.marq-track > div {
  white-space: nowrap; padding-right: 26px;
  font-weight: 700; font-size: 16px; letter-spacing: .2em; color: var(--muted);
}
.marq-track i { color: var(--red-ink); font-style: normal; padding: 0 .35em; }

/* ---------- index ---------- */
.idx { padding-block: clamp(56px, 8vw, 110px) 0; }
.idx-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: clamp(22px, 3vw, 34px);
}
.idx-head h2 { margin: 12px 0 0; font-size: clamp(28px, 4.6vw, 52px); line-height: 1.32; }
.idx-note { font-size: 13.5px; line-height: 1.95; color: var(--muted); text-align: right; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  border: 1px solid var(--line2); background: none; color: var(--ink2);
  border-radius: 999px; padding: 8px 15px; min-height: 38px;
  font-size: 12.5px; cursor: pointer; letter-spacing: .02em;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.chip b { font-weight: 600; color: var(--muted); margin-left: 7px; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.is-on b { color: inherit; opacity: .82; }
.chip:focus-visible { outline: 2px solid var(--red-ink); outline-offset: 2px; }
.count-line {
  font-size: 13px; color: var(--muted); margin: 0 0 12px;
  font-variant-numeric: tabular-nums;
}

.row {
  display: grid;
  grid-template-columns: clamp(38px, 5vw, 74px) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2.4vw, 28px);
  padding: clamp(16px, 2.4vw, 26px) clamp(8px, 1.4vw, 18px);
  border-top: 1px solid var(--line);
  color: var(--ink);
  transition: background .22s ease, color .22s ease, padding-left .22s ease;
}
.row:hover, .row:focus-visible {
  background: var(--hover-bg); color: var(--hover-fg);
  padding-left: clamp(18px, 2.8vw, 38px);
  outline: none;
}
.row-i { font-size: 12.5px; letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; }
.row:hover .row-i, .row:focus-visible .row-i { color: inherit; opacity: .82; }
.row-main { min-width: 0; }
.row-title { display: flex; align-items: baseline; gap: 13px; flex-wrap: wrap; }
.row-code { font-weight: 700; font-size: clamp(22px, 3.6vw, 42px); line-height: 1.14; letter-spacing: -.01em; }
.row-name { font-size: 14.5px; opacity: .68; }
.row-sub {
  display: block; font-size: 13.5px; opacity: .66; margin-top: 5px; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-end { display: flex; align-items: baseline; gap: clamp(10px, 2vw, 24px); white-space: nowrap; }
.row-n { font-size: 13px; opacity: .8; }
.row-n b { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.row-arrow { font-size: clamp(19px, 2.4vw, 28px); line-height: 1; color: var(--red-ink); }
.row:hover .row-arrow { color: currentColor; }
.idx-end { border-top: 1px solid var(--line); }
.idx-foot { font-size: 12.5px; color: var(--muted); padding: 14px clamp(8px, 1.4vw, 18px) 0; }
.empty { padding: 34px clamp(8px, 1.4vw, 18px); color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* ---------- closing ---------- */
.close {
  position: relative; margin-top: clamp(64px, 9vw, 130px);
  min-height: 62svh; display: flex; align-items: center; overflow: clip;
}
.close-bg { position: absolute; inset: 0; background: var(--cta-img) center / cover no-repeat; }
.close-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(var(--scrim), .95) 0%, rgba(var(--scrim), .62) 58%, rgba(var(--scrim), .82) 100%);
}
.close-body { position: relative; z-index: 2; padding-block: clamp(52px, 8vw, 96px); max-width: 780px; }
.close-body h2 { margin: 14px 0 12px; font-size: clamp(30px, 5.2vw, 58px); line-height: 1.3; }
.close-body p { margin: 0 0 26px; font-size: 16px; line-height: 1.9; color: var(--ink2); max-width: 34em; }
.btn-solid {
  display: inline-flex; align-items: center; min-height: 46px;
  padding: 15px 32px; background: var(--red); color: var(--red-fg);
  font-size: 15.5px; font-weight: 700; letter-spacing: .06em;
}
.btn-solid:hover { background: var(--red-ink); color: var(--red-fg); }
:root[data-theme='dark'] .btn-solid:hover { background: #E01E29; }

footer.foot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted); letter-spacing: .03em;
  padding-block: clamp(26px, 4vw, 44px) clamp(70px, 8vw, 90px);
}
footer.foot a { color: var(--ink2); border-bottom: 1px solid var(--line2); }
footer.foot a:hover { color: var(--red-ink); border-color: var(--red-ink); }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .brand-tag { display: none; }
  .top { padding-block: 14px; }
  .hero { min-height: 92svh; }
  .hero h1 { font-size: clamp(38px, 11vw, 60px); line-height: 1.2; }
  .idx-note { text-align: left; font-size: 14px; }
  .idx-head { align-items: flex-start; }
  .scroll-cue { display: none; }
  .stats { gap: 20px; }
  .stat-l { font-size: 12px; }

  .row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'i i' 'main end';
    gap: 6px 12px;
    padding: 16px 4px;
  }
  .row:hover, .row:focus-visible { padding-left: 4px; }
  .row-i { grid-area: i; }
  .row-main { grid-area: main; }
  .row-end { grid-area: end; align-self: end; }
  .row-code { font-size: 25px; }
  .row-name { font-size: 14px; }
  .row-sub { font-size: 15px; white-space: normal; }
  .close-body p { font-size: 15.5px; }
  .hero-credit { font-size: 12.5px; }
  .count-line, .idx-foot { font-size: 13px; }
  footer.foot { font-size: 13px; }
}

/* M · Series Shop Index — delta on series.css.
   Same Lumen/Noir shell as the catalog index; the difference is that every row
   is a selling entry (27 of them) instead of a catalog series (19), grouped into
   the shop's own six categories. */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- tools row (chips + search) ---------- */
.tools {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.tools .chips { margin-bottom: 0; flex: 1 1 460px; }
.qbox { flex: 0 1 260px; display: block; }
.qbox input {
  width: 100%; min-height: 38px;
  border: 1px solid var(--line2); border-radius: 999px;
  background: none; color: var(--ink);
  font: inherit; font-size: 13.5px; padding: 8px 16px;
  transition: border-color .18s ease;
}
.qbox input::placeholder { color: var(--muted); opacity: 1; }
.qbox input:focus { outline: none; border-color: var(--red-ink); }
.qbox input:focus-visible { outline: 2px solid var(--red-ink); outline-offset: 2px; }

/* ---------- category sections ----------
   2026-08-16:分類標題改成「章節條」,與底下的系列列徹底分開。
   之前的分類標題 = 編號 + 色點 + 無襯線標題 + 右側計數,跟系列列是同一套語法、
   只是字級小一號,讀起來像「比較小的一列」(使用者:分類標題跟系列長得太像)。
   現在:分類色左側粗條 + 淡色底板(color-mix 帶 9% 分類色)+ mono 眉標「分類 04 / 06」
   + 襯線 900 標題(與 h1/h2 同字體;系列列的大代碼是無襯線 Space Grotesk)
   + 右側計數與藥丸鈕。系列列本身一個位元組沒動。 */
.gsec { margin-top: clamp(34px, 4.6vw, 60px); }
.gsec:first-child { margin-top: 6px; }
.gsec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'k side' 'h side' 'd side';
  align-items: start;
  column-gap: clamp(16px, 3vw, 40px);
  padding: clamp(18px, 2.4vw, 26px) clamp(16px, 2.2vw, 28px) clamp(18px, 2.4vw, 26px) clamp(18px, 2.6vw, 32px);
  background: var(--bg2);
  background: color-mix(in srgb, var(--band, var(--ink)) var(--band-mix, 6%), var(--bg2));
  border-left: 5px solid var(--band, var(--ink));
  border-bottom: 1px solid var(--line);
}
.gsec-kicker {
  grid-area: k;
  display: inline-flex; align-items: center; gap: 9px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink2); font-variant-numeric: tabular-nums;
}
.gsec-kicker em { font-style: normal; color: var(--muted); }
.gsec-kicker .band-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  background: var(--band, var(--ink)); flex: none;
}
:root[data-theme='dark'] .gsec-kicker .band-dot { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.gsec-head h3 {
  grid-area: h;
  margin: 8px 0 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.3;
  letter-spacing: -.005em; color: var(--ink);
  /* 標題也吃一點分類色(使用者 2026-08-18:底色不同之外,標題字色也要稍微不同):
     墨色混入分類色 —— 亮色 38% / 深色 45%(深底的淡墨要吃多一點才看得出),
     六色 × 兩主題壓章節條底板對比全部 ≥ 6.4(程式算;最低是亮色琥珀 7.5)。 */
  color: color-mix(in srgb, var(--band, var(--ink)) var(--band-ink-mix, 38%), var(--ink));
}
.gsec-d {
  grid-area: d; margin: 8px 0 0;
  font-size: 14.5px; line-height: 1.7; color: var(--muted); max-width: 58ch;
}
.gsec-side {
  grid-area: side; align-self: center;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  text-align: right;
}
.gsec-n {
  font-size: 13px; color: var(--ink2); white-space: nowrap;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.gsec-n b { font-weight: 700; font-size: 17px; }
.gsec-all {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 0 16px; border: 1px solid var(--line2); border-radius: 999px;
  font-size: 12.5px; letter-spacing: .05em; color: var(--ink);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.gsec-all:hover, .gsec-all:focus-visible {
  background: var(--red); border-color: var(--red); color: var(--red-fg); outline: none;
}
/* 分類條底下的第一列不再需要自己的上框線(章節條的 border-bottom 已經是那條線) */
.gsec-head + .row { border-top-color: transparent; }

/* ---------- rows ---------- */
/* 4-column row: idx | code + official | the "what it is" block | count + arrow.
   The code column is capped (not 1fr) so the spec line sits right beside the series
   instead of drifting to the far edge on wide screens; the count column takes the
   slack and stays right-aligned. */
.row.srow {
  grid-template-columns:
    clamp(38px, 5vw, 74px)
    clamp(168px, 18vw, 226px)   /* 226 = the longest official name on one line */
    minmax(0, max-content)
    minmax(84px, 1fr);
}
/* the official name always breaks to its own line under the code (flex-basis:100%),
   so every row is the same shape and the code column can stay narrow — that is
   what keeps the spec line next to the series instead of far off to the right */
.row.srow .row-title { row-gap: 3px; }
.row.srow .row-name { flex: 0 0 100%; line-height: 1.35; }
.row-desc {
  display: flex; flex-direction: column; align-items: flex-start;
  text-align: left; gap: 5px; min-width: 0;
}
.row.srow .row-end { justify-content: flex-end; }
.row-desc-name {
  font-size: 12px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--red-ink);
}
.row-desc-one {
  font-size: clamp(16px, 1.9vw, 21px); font-weight: 700; line-height: 1.45;
  letter-spacing: .01em; text-wrap: balance;
}
.row:hover .row-desc-name, .row:focus-visible .row-desc-name { color: inherit; opacity: .78; }

.row-dot {
  display: inline-block; width: 12px; height: 12px; border-radius: 3px;
  background: var(--tint, var(--ink)); flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
  align-self: center;
}
:root[data-theme='dark'] .row-dot { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.row-title { align-items: center; }

.row-mark {
  display: inline-block; margin-top: 7px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: .04em; color: var(--muted);
  border: 1px solid var(--line2); border-radius: 999px; padding: 3px 10px;
}
.row:hover .row-mark, .row:focus-visible .row-mark { color: inherit; border-color: currentColor; opacity: .8; }

/* ---------- closing ---------- */
.close-act { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.btn-ghost {
  display: inline-flex; align-items: center; min-height: 46px;
  font-size: 14.5px; color: var(--ink2);
  border-bottom: 1px solid var(--line2);
}
.btn-ghost:hover { color: var(--red-ink); border-color: var(--red-ink); }

@media (max-width: 760px) {
  .tools { flex-direction: column; gap: 10px; }
  .tools .chips, .qbox { flex: 1 1 auto; width: 100%; }
  .gsec { margin-top: 30px; }
  .gsec-head {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'k' 'h' 'd' 'side';
    padding: 18px 16px 18px 18px;
  }
  .gsec-kicker { font-size: 13px; }
  .gsec-head h3 { font-size: 24px; margin-top: 8px; }
  .gsec-d { font-size: 15px; }
  .gsec-side {
    flex-direction: row; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; text-align: left; align-self: stretch;
  }
  .gsec-n { white-space: normal; font-size: 14px; }
  .gsec-all { font-size: 13.5px; min-height: 42px; }
  .row-mark { font-size: 12px; }
  .row-name { font-size: 15px; }   /* official name is body copy, not a label */

  /* phone: the spec block drops under the code, full width, left aligned */
  .row.srow {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'i i' 'main end' 'desc desc';
    gap: 7px 12px;
  }
  .row-desc { grid-area: desc; align-items: flex-start; text-align: left; gap: 3px; }
  .row-desc-name { font-size: 11.5px; }
  .row-desc-one { font-size: 17px; line-height: 1.5; }
  .qbox input { font-size: 15px; }
}

/* ============================================================
   官網主導覽(五項)— 併入頁首列(黑色 sitenav 條在本頁退場)
   放在 brand 之後的左側叢集(hero scrim 左 42% 較實,文字站得住)
   ============================================================ */
.gnav{display:flex;align-items:center;gap:2px;min-width:0;overflow-x:auto;scrollbar-width:none;
  margin-left:6px;border-left:1px solid var(--line2);padding-left:12px}
.gnav::-webkit-scrollbar{display:none}
.gnav a{white-space:nowrap;font-size:13px;letter-spacing:.05em;color:var(--ink2);
  padding:0 11px;min-height:40px;display:inline-flex;align-items:center;transition:color .18s ease}
.gnav a:hover{color:var(--red-ink)}
.gnav a.is-cur{color:var(--red-ink);font-weight:700;box-shadow:inset 0 -2px 0 var(--red)}
@media (max-width:900px){
  .gnav{flex-basis:100%;order:9;margin-left:0;border-left:0;padding-left:0}
  .gnav a{font-size:14px;min-height:42px;padding:0 10px}
  .gnav a:first-child{padding-left:0}
}

/* 全站統一 v2(2026-08-06):logo 高 28px、選單字級 14px */
.brand img{height:28px}
.gnav a{font-size:14px}

/* ---------- 2026-08-10 對比修正:深色主題的 hover 態 ----------
   .row 在深色主題 hover 時底色會轉成品牌紅 #C2151F。此時兩個次要文字
   （程式量測,非目測）：
     .row-name  opacity .68 → 3.44:1
     .row-n     opacity .80 → 4.32:1
   都低於 4.5。亮色主題 hover 是近黑底(#141416),同樣的 opacity 有 7.7:1
   以上,所以只改深色、不動亮色的明暗層次。
   ⚠️ 這是 /m/series-shop.css 原稿就有的問題（本頁是它的照抄版）,那邊尚未修;
   之後若重新照抄原稿,記得把這段補回來。 */
:root[data-theme='dark'] .row:hover .row-name,
:root[data-theme='dark'] .row:focus-visible .row-name,
:root[data-theme='dark'] .row:hover .row-n,
:root[data-theme='dark'] .row:focus-visible .row-n { opacity: .86; }   /* 4.82:1 */

/* ============================================================================
   2026-08-16 區塊導覽牆 .secnav（使用者:hero 下面設一個橫幅牆,按下去跳到該區塊,
   每個區塊再有一顆返回這裡的鈕）
   ----------------------------------------------------------------------------
   設計要點:
   · 全幅色帶（bg2 + 斜向掃描線紋理,兩側用 mask 淡出）→ 與上下的白/黑區塊分開,
     真的像一道「牆」;內容仍收在 .pad 的 1304px 量測裡,不跟全站節奏打架。
   · 六格用 1px hairline 切開（grid gap 吃底色）→ 精密儀器感,不是六張浮卡。
   · 分類色只用在色點與頂部指示條（非文字 UI,門檻 3:1);文字一律走 ink/ink2/muted,
     底板是 color-mix 的極淡分類色,兩個主題的對比都程式量過。
   · 目前捲到哪一區,那一格頂條會亮起（.is-cur,aria-current）。
   ========================================================================== */
.secnav {
  position: relative; overflow: clip;
  border-block: 1px solid var(--line);
  background: var(--bg2);
  padding-block: clamp(30px, 4vw, 52px) clamp(28px, 3.6vw, 46px);
  scroll-margin-top: 0;
}
.secnav-tex {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(114deg,
    transparent 0 13px, var(--line) 13px 14px);
  opacity: .55;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}
/* 亮色主題的線條(#D3CEC3 壓 #F0EDE5)比深色顯眼得多,同樣的 .55 會變成布紋條紋 */
:root[data-theme='light'] .secnav-tex { opacity: .26; }
.secnav > .pad { position: relative; }
.secnav-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px 26px; flex-wrap: wrap; margin-bottom: clamp(18px, 2.2vw, 26px);
}
.secnav-head h2 { margin: 10px 0 0; font-size: clamp(22px, 2.7vw, 32px); line-height: 1.32; }
.secnav-note {
  margin: 0; font-size: 13px; line-height: 1.8; color: var(--muted);
  text-align: right; font-variant-numeric: tabular-nums;
}

.secnav-wall {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 5px; overflow: clip;
}
.snt {
  position: relative; display: flex; flex-direction: column;
  min-height: 152px; padding: 15px 15px 17px;
  background: var(--bg); color: var(--ink);
  transition: background .2s ease;
}
/* 頂部指示條 — hover / 鍵盤焦點 / 目前所在區都會拉開 */
.snt::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 3px;
  background: var(--band, var(--ink));
  transform: scaleX(0); transform-origin: left;
  transition: transform .36s cubic-bezier(.2, .7, .2, 1);
}
.snt:hover, .snt:focus-visible, .snt.is-cur {
  background: color-mix(in srgb, var(--band, var(--ink)) var(--band-mix, 6%), var(--bg));
}
.snt:hover::before, .snt:focus-visible::before, .snt.is-cur::before { transform: scaleX(1); }
.snt:focus-visible { outline: 2px solid var(--red-ink); outline-offset: -2px; }

.snt-top { display: flex; align-items: center; gap: 8px; }
.snt-dot {
  width: 9px; height: 9px; border-radius: 2px; flex: none;
  background: var(--band, var(--ink)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
}
:root[data-theme='dark'] .snt-dot { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.snt-i {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: .18em; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/* ↓ 箭頭:滑鼠裝置在靜置時完全隱藏(純裝飾,aria-hidden),hover/目前所在才浮出來。
   以前給 .38 透明度,量出來只有 1.73(亮)/2.08(深)—— 一個「看得到但看不清」的
   灰影子,不如乾脆藏起來讓 hover 的出現更有份量。觸控裝置沒有 hover,改成常駐
   且不降透明度(亮 5.59 / 深 8.0)。 */
.snt-go {
  margin-left: auto; font-size: 15px; line-height: 1; color: var(--muted);
  opacity: 0; transform: translateY(-2px);
  transition: opacity .22s ease, transform .22s ease, color .22s ease;
}
.snt:hover .snt-go, .snt:focus-visible .snt-go, .snt.is-cur .snt-go {
  opacity: 1; transform: translateY(1px); color: var(--ink);
}
@media (hover: none) {
  .snt-go { opacity: 1; transform: none; }
}
/* 目前所在的分區:除了分類色頂條,編號也轉亮 —— 兩個分類色(工具灰 2.58、
   安全琥珀在亮色主題 2.45)對底色不到 3:1,不能只靠顏色當唯一提示;
   那兩個色是全站分類色,不在這一頁改。 */
.snt.is-cur .snt-i { color: var(--ink); }
.snt-n {
  margin-top: 11px; font-size: clamp(15.5px, 1.35vw, 18px);
  font-weight: 800; line-height: 1.36; letter-spacing: .01em;
  min-height: 2.72em;   /* 保留兩行 —— 英文名稱常斷兩行,底下的代碼行才會整排對齊 */
}
.snt-e {
  margin-top: 5px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  line-height: 1.55; color: var(--muted);
}
.snt-m {
  margin-top: auto; padding-top: 12px; font-size: 12px; letter-spacing: .02em;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.snt-m b { font-weight: 700; font-size: 13.5px; color: var(--ink2); }

@media (max-width: 1080px) {
  .secnav-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .secnav-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .secnav-note { text-align: left; }
  .snt { min-height: 142px; padding: 14px 13px 16px; }
  .snt-n { font-size: 16px; min-height: 0; }
  .snt-e { font-size: 12px; letter-spacing: .07em; }
  .snt-m { font-size: 13px; }
}

/* 返回導覽牆的鈕 — 住在每個章節條的右側欄（.gsec-side 的第三項） */
.gsec-up {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 0 14px;
  border: 1px solid var(--line2); border-radius: 999px;   /* 與隔壁 .gsec-all 同一條邊線 */
  font-size: 12px; letter-spacing: .05em; color: var(--muted);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.gsec-up span { font-size: 13px; line-height: 1; }
.gsec-up:hover, .gsec-up:focus-visible {
  color: var(--ink); border-color: var(--line2);
  background: color-mix(in srgb, var(--band, var(--ink)) 12%, transparent);
  outline: none;
}
.gsec-up:focus-visible { outline: 2px solid var(--red-ink); outline-offset: 2px; }
@media (max-width: 760px) { .gsec-up { min-height: 42px; font-size: 13px; } }

/* 分區錨點:捲過去時上方留一點呼吸,不要頂在視窗邊緣 */
.gsec[id] { scroll-margin-top: 18px; }
