@charset "UTF-8";
/* ==========================================================================
   GreenSoft · 淺白蘋果風主題（全站唯一主題）
   設計語言：高亮度淺白底 / 大留白 / 藥丸按鈕 / 緊字距標題 / 極細分隔線
   技術要點：系統字體棧（真 Apple 觀感）+ 自託管 IBM Plex Mono 做技術資訊層
   全站響應式 · 支援 prefers-reduced-motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. 自託管字體（零第三方請求）
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../font/plex-mono-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../font/plex-mono-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../font/plex-mono-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* 表面 */
  --bg:          #fbfbfd;
  --bg-alt:      #f5f5f7;
  --surface:     #ffffff;
  --surface-2:   #fafafc;

  /* 文字 */
  --ink:         #1d1d1f;
  --ink-2:       #424245;
  --ink-3:       #6e6e73;
  --ink-4:       #86868b;

  /* 線 */
  --line:        #d2d2d7;
  --line-soft:   #e8e8ed;

  /* 主色：Apple 藍 */
  --blue:        #0071e3;
  --blue-hover:  #0077ed;
  --blue-deep:   #0062c4;
  --blue-tint:   #eaf3fe;
  --blue-tint-2: #d6e9fd;
  --link:        #0066cc;

  /* 品牌綠（只用在識別與打勾，不做大面積） */
  --green:       #34c759;
  --green-deep:  #248a3d;
  --green-tint:  #e9f9ee;

  /* 形狀 */
  --radius:      18px;
  --radius-lg:   24px;
  --radius-sm:   12px;
  --radius-xs:   8px;
  --pill:        980px;

  /* 陰影 */
  --sh-xs: 0 1px 2px rgba(0, 0, 0, .04);
  --sh-sm: 0 2px 10px rgba(0, 0, 0, .05);
  --sh:    0 10px 30px rgba(0, 0, 0, .08);
  --sh-lg: 0 26px 60px rgba(0, 0, 0, .12);

  /* 字體 */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang TC", "PingFang SC", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", "Microsoft JhengHei",
    "Malgun Gothic", "Segoe UI", Roboto, "Noto Sans TC", "Noto Sans JP",
    "Noto Sans KR", sans-serif;
  --mono: "Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
    Consolas, monospace;

  /* 節奏 */
  --maxw: 1120px;
  --gutter: 22px;
  --sec-y: clamp(64px, 8vw, 112px);

  /* 動效 */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-out: cubic-bezier(.25, .46, .45, .94);
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button { font-family: inherit; }

/* 内联 SVG 兜底：漏写 width/height 的图标会退化成 300×150 的大色块。
   显式给了 width 属性的（品牌标记、邮箱图标等）不受影响。 */
svg:not([width]) { max-width: 1.4em; max-height: 1.4em; }
svg { flex: none; }
::selection { background: var(--blue-tint-2); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* 主容器：覆蓋 Bootstrap 的 .container */
#body .container { max-width: var(--maxw); width: 100%; padding: 0 var(--gutter); }
main#body { padding: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* --------------------------------------------------------------------------
   3. 頂部導覽列（Apple 全球導航風）
   -------------------------------------------------------------------------- */
#header.navbar {
  background: rgba(251, 251, 253, .82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
  padding: 0;
  min-height: 52px;
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: background .3s var(--ease-out), border-color .3s var(--ease-out);
}
#header.navbar.is-scrolled {
  background: rgba(251, 251, 253, .94);
  border-bottom-color: var(--line);
}
#header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  max-width: var(--maxw);
  min-height: 52px;
}

#header .navbar-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  flex: none;
  padding: 0;
  margin: 0;
}
#header .brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(150deg, var(--green), var(--green-deep));
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(52, 199, 89, .32);
  transition: transform .4s var(--ease);
}
#header .navbar-brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
#header .brand-mark svg { width: 16px; height: 16px; }

#header .navbar-collapse {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
#header .navbar-nav {
  display: flex; align-items: center; gap: .1rem;
  list-style: none; margin: 0; padding: 0;
}
#header .navbar-nav.mr-auto { margin-right: auto; }
#header .nav-item .nav-link {
  display: inline-block;
  padding: .42rem .72rem;
  border-radius: var(--radius-xs);
  font-size: .875rem;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: -0.01em;
  transition: color .2s var(--ease-out), background .2s var(--ease-out);
}
#header .nav-item .nav-link:hover { color: var(--blue); background: transparent; }
#header .nav-item.active .nav-link,
#header .nav-item.home.active .nav-link { color: var(--ink); font-weight: 500; background: transparent; }
#header .nav-item .nav-link i { display: none; }

#header .navbar-user { display: flex; align-items: center; gap: .35rem; margin-left: .5rem; }
#header .navbar-user .nav-link { font-size: .875rem; padding: .38rem .7rem; border-radius: var(--pill); }
#header .navbar-user .nav-link:hover { background: var(--bg-alt); color: var(--ink); }
#header .navbar-user .username .avatar-1 {
  width: 24px; height: 24px; border-radius: 50%;
  vertical-align: middle; margin-right: .3rem;
}
#header .navbar-toggler {
  border: 0; background: transparent; padding: .4rem; cursor: pointer;
  display: none; order: 3;
}
#header .navbar-toggler-icon {
  width: 18px; height: 1.5px; background: var(--ink-2); display: block; position: relative;
}
#header .navbar-toggler-icon::before,
#header .navbar-toggler-icon::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: var(--ink-2);
  transition: transform .3s var(--ease);
}
#header .navbar-toggler-icon::before { top: -6px; }
#header .navbar-toggler-icon::after { top: 6px; }

/* 語言切換器 */
.lang-switch { position: relative; flex: none; }
#header .lang-switch { margin-left: .5rem; }
.lang-switch > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .38rem .7rem;
  border-radius: var(--pill);
  font-size: .84rem; color: var(--ink-2);
  transition: background .2s var(--ease-out), color .2s var(--ease-out);
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover { background: var(--bg-alt); color: var(--ink); }
.lang-switch > summary svg { width: 13px; height: 13px; opacity: .55; transition: transform .3s var(--ease); }
.lang-switch[open] > summary svg { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 190px; max-height: 68vh; overflow-y: auto;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  box-shadow: var(--sh-lg);
  padding: .35rem;
  z-index: 1200;
}
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; padding: .5rem .7rem; border-radius: 9px;
  font-size: .88rem; color: var(--ink-2);
  transition: background .16s var(--ease-out), color .16s var(--ease-out);
}
.lang-menu a:hover { background: var(--bg-alt); color: var(--ink); }
.lang-menu a.is-active { color: var(--blue); font-weight: 500; }
.lang-menu a .code {
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  color: var(--ink-4); text-transform: uppercase; letter-spacing: .04em;
}
.lang-menu a.is-active .code { color: var(--blue); }

/* --------------------------------------------------------------------------
   4. HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 62%);
  padding: clamp(56px, 8vw, 104px) 0 0;
  text-align: center;
}
/*
 * Hero 環境光。
 *
 * 這裡原本有個量出來的錯位：`inset: -20% -10% auto` 配 height 620px，
 * 在 1280px 高的 hero 上等於光暈框從 -256px 開始，
 * 第一道光的中心（at 50% 30%）落在 y≈-20 —— 也就是導航欄上方、螢幕外。
 * 所以光其實大半被裁掉了，截圖看起來就是一片純白。
 * → 真正的問題是「位置」，不是「濃度」。改成從 hero 頂部起算就對了。
 *
 * 濃度試了三輪，記一下結論（用像素取樣量的，不是憑眼睛）：
 *   .16 藍 + .12 綠 + 一層冷灰 → 右上角量到 (236,249,240)，明顯偏綠，
 *     整個上半部像蒙了層霧。兩三種色相疊在一起就是髒，不是層次。
 *   .12 藍 + .07 綠           → 右上角 (246,252,249)，還是有一塊綠色污漬。
 *   只留一道藍                 → 右上角回到 (254,254,255) 的純白，
 *     藍光收在標題正後方，只在按鈕下方留下約 8/255 的冷調。
 * 所以最終只留一道光：單色、收緊、對準標題。
 * 淺白蘋果風要的是「文字浮在光裡」，不是「背景有顏色」。
 */
.hero::before {
  content: "";
  position: absolute; top: 0; left: -12%; right: -12%;
  height: 760px;
  background:
    radial-gradient(32% 36% at 50% 26%, rgba(0, 113, 227, .13), transparent 68%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.hero-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  box-shadow: var(--sh-xs);
  color: var(--ink-3);
  font-size: .78rem; font-weight: 500;
  padding: .34rem .85rem .34rem .7rem;
  border-radius: var(--pill);
  margin-bottom: 1.5rem;
  letter-spacing: 0;
}
.hero-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-tint);
}

.hero-title {
  font-size: clamp(2.5rem, 6.2vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0 auto 1.1rem;
  max-width: 15ch;
}
.hero-title em {
  font-style: normal;
  display: block;
  background: linear-gradient(96deg, var(--blue) 0%, #4aa3f0 52%, var(--green) 128%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.62;
  color: var(--ink-3);
  max-width: 640px;
  margin: 0 auto 2rem;
  letter-spacing: -0.005em;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-bottom: 1.1rem; }
.hero-note {
  font-family: var(--mono);
  font-size: .74rem; font-weight: 400;
  letter-spacing: .02em;
  color: var(--ink-4);
  margin: 0 0 clamp(40px, 5vw, 64px);
}

/* Hero 主視覺 */
.hero-visual {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.hero-shot {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .30), 0 0 0 1px var(--line-soft);
}
.hero-shot img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-shot::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .06));
  pointer-events: none;
}

/* Hero 統計條 */
.hero-stats {
  position: relative; z-index: 1;
  display: grid;
  /* 三項：全部是可核實的真實數字（收錄數 / 語言數 / 分類數），
     不放「可用性 99.9%」這類無法量測的指標。 */
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: var(--maxw);
  margin: clamp(28px, 4vw, 44px) auto 0;
  padding: 0 var(--gutter);
}
.hero-stat {
  text-align: center;
  padding: 1.1rem .6rem;
  border-left: 1px solid var(--line-soft);
}
.hero-stat:first-child { border-left: 0; }
.hero-stat b {
  display: block;
  font-family: var(--mono);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}
.hero-stat span { font-size: .78rem; color: var(--ink-4); letter-spacing: 0; }

/* --------------------------------------------------------------------------
   5. 按鈕（含懸停動效）
   -------------------------------------------------------------------------- */
.btn-pill {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font-size: .95rem; font-weight: 500;
  letter-spacing: -0.01em;
  padding: .74rem 1.6rem;
  border-radius: var(--pill);
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: transform .32s var(--ease), background .24s var(--ease-out),
    box-shadow .32s var(--ease), color .24s var(--ease-out), border-color .24s var(--ease-out);
}
.btn-pill svg { width: 15px; height: 15px; flex: none; }
.btn-pill:active { transform: scale(.975); }

.btn-blue {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 22px -8px rgba(0, 113, 227, .60);
}
.btn-blue:hover {
  background: var(--blue-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px rgba(0, 113, 227, .58);
}
/* 光澤掃過 */
.btn-blue::after {
  content: "";
  position: absolute; top: 0; left: -140%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .42), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}
.btn-blue:hover::after { animation: sheen .85s var(--ease-out); }
@keyframes sheen { from { left: -140%; } to { left: 160%; } }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--sh-xs);
}
.btn-ghost:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--blue-tint);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -12px rgba(0, 113, 227, .40);
}

.btn-text {
  display: inline-flex; align-items: center; gap: .3rem;
  background: transparent; color: var(--link);
  padding: .5rem .2rem; border: 0;
}
.btn-text:hover { color: var(--blue-hover); }
/* 必须给 svg 定尺寸：内联 svg 没有 width/height 时会撑到 300×150。
   在 align-items:flex-end 的区块标题里，那会变成一个巨大的箭头，
   还会把文字挤到标题上方去。 */
.btn-text svg { width: 13px; height: 13px; flex: none; transition: transform .32s var(--ease); }
.btn-text:hover svg { transform: translateX(4px); }

/* 全站通用按鈕（覆蓋 Bootstrap） */
.btn {
  font-family: var(--font);
  border-radius: var(--pill);
  font-weight: 500;
  font-size: .92rem;
  letter-spacing: -0.01em;
  padding: .6rem 1.35rem;
  transition: transform .3s var(--ease), background .22s var(--ease-out),
    box-shadow .3s var(--ease), border-color .22s var(--ease-out), color .22s var(--ease-out);
}
.btn-primary {
  background: var(--blue); border-color: var(--blue); color: #fff;
  box-shadow: 0 6px 18px -8px rgba(0, 113, 227, .60);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--blue-hover); border-color: var(--blue-hover); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(0, 113, 227, .55);
}
.btn-secondary { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.btn-secondary:hover { background: var(--bg-alt); color: var(--blue); border-color: var(--blue); transform: translateY(-2px); }
.btn-sm { border-radius: var(--pill); }
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   6. 區塊標題
   -------------------------------------------------------------------------- */
.sec { padding: var(--sec-y) 0; position: relative; }
.sec-alt { background: var(--bg-alt); }
.sec-white { background: var(--surface); }

.sec-head { margin-bottom: clamp(32px, 4vw, 52px); }
.sec-head--center { text-align: center; }
.sec-eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: .72rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .8rem;
}
.sec-title {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 .7rem;
}
.sec-sub {
  font-size: clamp(.98rem, 1.3vw, 1.1rem);
  color: var(--ink-3);
  line-height: 1.6;
  margin: 0;
  max-width: 62ch;
}
.sec-head--center .sec-sub { margin: 0 auto; }
.sec-head--split {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.sec-head--split .sec-title { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   7. 場景卡（軟體使用場景配圖）
   -------------------------------------------------------------------------- */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.scene-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s var(--ease-out);
}
.scene-card:hover {
  transform: translateY(-6px);
  border-color: var(--blue-tint-2);
  box-shadow: var(--sh);
}
.scene-media { position: relative; overflow: hidden; background: var(--bg-alt); }
.scene-media img {
  display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  transition: transform .8s var(--ease);
}
.scene-card:hover .scene-media img { transform: scale(1.05); }
.scene-body { padding: 1.15rem 1.25rem 1.35rem; }
.scene-name {
  font-size: 1rem; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink); margin: 0 0 .4rem;
  display: flex; align-items: center; gap: .45rem;
}
.scene-name svg { width: 15px; height: 15px; color: var(--blue); }
.scene-desc { font-size: .86rem; line-height: 1.6; color: var(--ink-3); margin: 0; }

/* --------------------------------------------------------------------------
   8. 軟體庫（篩選 + 卡片網格）
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 1.6rem;
}
.filter-chip {
  font-size: .84rem; font-weight: 400;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  padding: .42rem 1rem;
  border-radius: var(--pill);
  cursor: pointer;
  transition: background .22s var(--ease-out), color .22s var(--ease-out),
    border-color .22s var(--ease-out), transform .3s var(--ease);
}
.filter-chip:hover { border-color: var(--line); transform: translateY(-1px); }
.filter-chip.is-on {
  background: var(--ink); color: #fff; border-color: var(--ink);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.app-card {
  display: flex; align-items: center; gap: .9rem;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s var(--ease-out);
}
.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-tint-2);
  box-shadow: var(--sh-sm);
}
.app-icon {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem; font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
  box-shadow: 0 5px 14px -6px rgba(0, 0, 0, .35);
  transition: transform .4s var(--ease);
}
.app-card:hover .app-icon { transform: scale(1.06) rotate(-3deg); }
.app-icon.c1 { background: linear-gradient(145deg, #4aa3f0, #0071e3); }
.app-icon.c2 { background: linear-gradient(145deg, #5ac8fa, #0a84c8); }
.app-icon.c3 { background: linear-gradient(145deg, #34c759, #248a3d); }
.app-icon.c4 { background: linear-gradient(145deg, #a78bfa, #6d4aff); }
.app-icon.c5 { background: linear-gradient(145deg, #ff9f0a, #e07b00); }
.app-icon.c6 { background: linear-gradient(145deg, #ff6482, #d92d55); }

.app-info { flex: 1 1 auto; min-width: 0; }
.app-name {
  display: block;
  font-size: .95rem; font-weight: 500; letter-spacing: -0.015em;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: .25rem;
}
.app-meta {
  display: flex; align-items: center; gap: .4rem;
  /* 分類 · 版本 · 瀏覽數 三項在窄卡片裡會擠，允許換行而不是溢出
     （俄語、葡萄牙語的標籤明顯比中文長） */
  flex-wrap: wrap;
  row-gap: .15rem;
  font-size: .7rem; color: var(--ink-4);
  font-family: var(--mono);
  letter-spacing: 0;
}
.app-meta .tag {
  font-family: var(--font);
  background: var(--bg-alt);
  color: var(--ink-3);
  padding: .06rem .45rem;
  border-radius: var(--pill);
  font-size: .68rem;
}
.app-meta .sep { color: var(--line); }

.app-dl {
  flex: none;
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .8rem; font-weight: 500;
  color: var(--blue);
  background: var(--blue-tint);
  padding: .42rem .85rem;
  border-radius: var(--pill);
  transition: background .24s var(--ease-out), color .24s var(--ease-out), transform .3s var(--ease);
}
.app-dl svg { width: 13px; height: 13px; transition: transform .32s var(--ease); }
.app-card:hover .app-dl { background: var(--blue); color: #fff; }
.app-card:hover .app-dl svg { transform: translateY(2px); }

.app-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-4);
  font-size: .92rem;
}

/* --------------------------------------------------------------------------
   9. 教學區
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: clamp(36px, 4.5vw, 56px);
}
.step-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.7rem;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s var(--ease-out);
}
.step-card:hover {
  transform: translateY(-5px);
  border-color: var(--blue-tint-2);
  box-shadow: var(--sh-sm);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-family: var(--mono);
  font-size: .8rem; font-weight: 600;
  margin-bottom: .95rem;
}
.step-card h3 {
  font-size: 1.06rem; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink); margin: 0 0 .5rem;
}
.step-card p { font-size: .89rem; line-height: 1.65; color: var(--ink-3); margin: 0; }

.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.guide-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.4rem;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s var(--ease-out);
}
.guide-card:hover {
  transform: translateY(-5px);
  border-color: var(--blue-tint-2);
  box-shadow: var(--sh);
}
.guide-meta {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--mono);
  font-size: .7rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: .9rem;
}
.guide-meta .bar { width: 18px; height: 1px; background: var(--line); }
.guide-card h3 {
  font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.35; color: var(--ink); margin: 0 0 .55rem;
}
.guide-card p { font-size: .88rem; line-height: 1.62; color: var(--ink-3); margin: 0 0 1.2rem; }
.guide-more {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .85rem; font-weight: 500; color: var(--link);
}
.guide-more svg { width: 13px; height: 13px; transition: transform .32s var(--ease); }
.guide-card:hover .guide-more svg { transform: translateX(4px); }

/* 指南卡的「檢查重點」區塊 —— 卡片內直接給出可落地的技術要點，
   不需要另開文章頁，也就不會出現死鏈。 */
.guide-check {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--mono);
  font-size: .68rem; font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: .55rem;
}
.guide-check svg { width: 13px; height: 13px; flex: none; }
.guide-card .guide-x {
  font-size: .85rem; line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg-alt);
  border-left: 2px solid var(--green);
  border-radius: 0 10px 10px 0;
  padding: .8rem .95rem;
  margin: 0;
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   10. FAQ
   -------------------------------------------------------------------------- */
.faq-list {
  max-width: 840px;
  margin: 0 auto;
  border-top: 1px solid var(--line-soft);
}
.faq-item { border-bottom: 1px solid var(--line-soft); }
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.35rem .25rem;
  background: transparent; border: 0;
  font-family: var(--font);
  font-size: 1.02rem; font-weight: 500; letter-spacing: -0.02em;
  color: var(--ink);
  text-align: left; cursor: pointer;
  transition: color .22s var(--ease-out);
}
.faq-q:hover { color: var(--blue); }
.faq-sign {
  flex: none; position: relative;
  width: 18px; height: 18px;
}
.faq-sign::before, .faq-sign::after {
  content: ""; position: absolute; background: currentColor;
  border-radius: 1px;
  transition: transform .42s var(--ease), opacity .3s var(--ease-out);
}
.faq-sign::before { top: 8px; left: 0; width: 18px; height: 1.6px; }
.faq-sign::after { left: 8px; top: 0; width: 1.6px; height: 18px; }
.faq-item.is-open .faq-sign::after { transform: rotate(90deg); opacity: 0; }
.faq-item.is-open .faq-q { color: var(--blue); }
.faq-a {
  overflow: hidden;
  max-height: 0;
  transition: max-height .5s var(--ease), opacity .4s var(--ease-out);
  opacity: 0;
}
.faq-item.is-open .faq-a { opacity: 1; }
.faq-a-inner {
  padding: 0 3rem 1.5rem .25rem;
  font-size: .94rem;
  line-height: 1.72;
  color: var(--ink-3);
  letter-spacing: -0.005em;
}
.faq-foot {
  text-align: center;
  margin-top: 2.5rem;
  font-size: .92rem;
  color: var(--ink-3);
}
.faq-foot a { color: var(--link); font-weight: 500; }
.faq-foot a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   11. 底部 CTA
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg) 0%, #ffffff 40%, var(--bg-alt) 100%);
  padding: clamp(64px, 8vw, 110px) 0;
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute; left: 50%; top: 8%;
  width: min(760px, 92vw); height: 420px;
  transform: translateX(-50%);
  background:
    radial-gradient(50% 60% at 50% 50%, rgba(0, 113, 227, .12), transparent 72%),
    radial-gradient(34% 44% at 22% 68%, rgba(52, 199, 89, .10), transparent 74%);
  pointer-events: none;
}
.cta-inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.cta-title {
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 .8rem;
}
.cta-sub {
  font-size: clamp(.98rem, 1.4vw, 1.12rem);
  color: var(--ink-3);
  max-width: 56ch;
  margin: 0 auto 1.9rem;
  line-height: 1.62;
}
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* --------------------------------------------------------------------------
   12. 頁尾（Apple 風：淺灰底 + 小字 + 細分隔）
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line-soft);
  padding: clamp(44px, 5vw, 64px) 0 30px;
  color: var(--ink-3);
  font-size: .82rem;
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.footer-top {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}
.brand-col { max-width: 320px; }
.brand-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(150deg, var(--green), var(--green-deep));
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(52, 199, 89, .28);
}
.brand-mark svg { width: 16px; height: 16px; }
.brand-name { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.brand-tag { font-size: .84rem; line-height: 1.65; color: var(--ink-4); margin: 0 0 1rem; }
.brand-social { display: flex; gap: .5rem; }
.social-btn {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--ink-4);
  border: 1px solid var(--line-soft);
  transition: background .24s var(--ease-out), color .24s var(--ease-out),
    transform .34s var(--ease), border-color .24s var(--ease-out);
}
.social-btn:hover {
  background: var(--blue); color: #fff; border-color: var(--blue);
  transform: translateY(-3px);
}
.social-btn svg { width: 15px; height: 15px; }

.link-col h6 {
  font-size: .78rem; font-weight: 600; letter-spacing: 0;
  color: var(--ink); margin: 0 0 .85rem;
}
.link-col a {
  display: block;
  font-size: .82rem; color: var(--ink-3);
  padding: .26rem 0;
  transition: color .2s var(--ease-out), transform .3s var(--ease);
}
.link-col a:hover { color: var(--blue); transform: translateX(3px); }

.footer-divider { height: 1px; background: var(--line-soft); margin: 0 0 1.4rem; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .9rem;
  font-size: .78rem; color: var(--ink-4);
}
.copyright { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.copyright .copy-mark { color: var(--ink-3); }
.copyright .sep { color: var(--line); }
.footer-legal { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.footer-legal a { color: var(--ink-4); transition: color .2s var(--ease-out); }
.footer-legal a:hover { color: var(--blue); }
.footer-disclaimer {
  margin-top: 1.2rem; padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  font-size: .75rem; line-height: 1.7; color: var(--ink-4);
  max-width: 88ch;
}

/* --------------------------------------------------------------------------
   13. 內頁共用（麵包屑 / 卡片 / 線程 / 表單 / 分頁）
   -------------------------------------------------------------------------- */
.breadcrumb {
  background: transparent; padding: 0; margin: 0 0 1.2rem;
  border-radius: 0; font-size: .8rem;
  display: flex; flex-wrap: wrap; list-style: none;
}
.breadcrumb-item a { color: var(--link); }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: var(--ink-4); }
.breadcrumb-item + .breadcrumb-item::before {
  content: "/"; color: var(--line); padding: 0 .5rem;
}

.row { display: flex; flex-wrap: wrap; margin: 0 -12px; padding: 44px 0; }
.row > .main, .row > .aside { padding: 0 12px; }
.col-lg-9 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-lg-3 { flex: 0 0 33.333%; max-width: 33.333%; }

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
  overflow: hidden;
  box-shadow: var(--sh-xs);
}
.card-header {
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.card-header .nav-tabs { border: 0; display: flex; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.card-header .nav-tabs .nav-link {
  padding: .38rem .95rem; border-radius: var(--pill);
  font-weight: 500; font-size: .88rem; color: var(--ink-3); cursor: pointer;
  transition: background .2s var(--ease-out), color .2s var(--ease-out);
}
.card-header .nav-tabs .nav-link:hover { background: var(--bg-alt); color: var(--ink); }
.card-header .nav-tabs .nav-link.active { background: var(--ink); color: #fff; }
.card-body { padding: 1.25rem; }
.card-threadlist .card-body { padding: 0; }
.card-title { font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin: 0; }
.card-h-title { font-size: 1.08rem; font-weight: 600; color: var(--ink); }

/* 線程列表 */
.threadlist { margin: 0; padding: 0; list-style: none; }
.threadlist li {
  display: flex; align-items: center; gap: .8rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
  transition: background .18s var(--ease-out);
}
.threadlist li:last-child { border-bottom: 0; }
.threadlist li:hover { background: var(--surface-2); }
.threadlist .subject a { font-weight: 500; color: var(--ink); }
.threadlist .subject a:hover { color: var(--blue); }
.threadlist .thread-name { font-weight: 500; color: var(--ink); }
.threadlist .thread-name:hover { color: var(--blue); }
.threadlist .num { margin-left: auto; color: var(--ink-4); font-size: .8rem; font-family: var(--mono); }
.threadlist .text-grey { color: var(--ink-4) !important; }
.threadlist .username { color: var(--ink-3); font-weight: 500; }
.threadlist .media.thread .avatar-3 { border-radius: 50%; }
.threadlist li.media.thread { padding: .85rem 1.1rem; }

/* 分類頁編號列表 */
.threadlist .thread-row {
  display: flex; align-items: center; gap: .9rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line-soft);
  transition: background .18s var(--ease-out);
  position: relative;
}
.threadlist .thread-row:last-child { border-bottom: 0; }
.threadlist .thread-row:hover { background: var(--surface-2); }
.threadlist .thread-row.is-zebra { background: #fcfcfd; }
.threadlist .thread-row.is-top { background: linear-gradient(90deg, rgba(255, 159, 10, .06), transparent 62%); }
.threadlist .thread-row.is-closed .thread-title a { color: var(--ink-4); }
.threadlist .thread-row-check { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--blue); cursor: pointer; margin: 0; }
.threadlist .thread-index {
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--bg-alt); color: var(--ink-3);
  font-family: var(--mono);
  font-weight: 600; font-size: .95rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.threadlist .thread-row.is-top .thread-index {
  background: linear-gradient(145deg, #ff9f0a, #e07b00); color: #fff;
}
.threadlist .thread-tag {
  flex-shrink: 0;
  width: 50px; height: 50px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .95rem; color: #fff;
  box-shadow: 0 4px 12px -5px rgba(0, 0, 0, .3);
  overflow: hidden; white-space: nowrap;
}
.threadlist .thread-info { flex: 1 1 auto; min-width: 0; }
.threadlist .thread-title {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  font-weight: 500; font-size: .98rem; color: var(--ink);
  margin: 0 0 .3rem; line-height: 1.4;
}
.threadlist .thread-title a {
  color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.threadlist .thread-title a:hover { color: var(--blue); }
.threadlist .thread-badge {
  display: inline-flex; align-items: center; gap: .2rem;
  padding: .1rem .45rem; border-radius: 6px;
  font-size: .68rem; font-weight: 600; line-height: 1.3; flex-shrink: 0;
}
.threadlist .badge-top { background: #fff4e0; color: #9a5b00; }
.threadlist .badge-locked { background: var(--bg-alt); color: var(--ink-4); }
.threadlist .badge-file {
  background: transparent; color: var(--blue);
  border: 1px solid var(--blue-tint-2); padding: .08rem .32rem;
}
.threadlist .thread-meta {
  display: flex; align-items: center; gap: .35rem; flex-wrap: wrap;
  font-size: .78rem; color: var(--ink-4); line-height: 1.3;
}
.threadlist .thread-tag-pill {
  background: var(--blue-tint); color: var(--blue);
  padding: .12rem .5rem; border-radius: var(--pill);
  font-weight: 500; font-size: .72rem;
}
.threadlist .meta-dot { color: var(--line); }
.threadlist .meta-author { color: var(--ink-3); }
.threadlist .meta-version {
  background: var(--bg-alt); color: var(--ink-3);
  padding: .08rem .4rem; border-radius: 6px;
  font-family: var(--mono); font-size: .7rem; font-weight: 500;
}
.threadlist .meta-download-count { color: var(--blue); font-weight: 600; font-family: var(--mono); }
.threadlist .thread-action { flex-shrink: 0; }
.threadlist .btn-thread-download {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .5rem 1.1rem; border-radius: var(--pill);
  background: var(--blue); color: #fff;
  font-weight: 500; font-size: .84rem;
  white-space: nowrap;
  transition: background .22s var(--ease-out), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.threadlist .btn-thread-download:hover {
  background: var(--blue-hover); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -10px rgba(0, 113, 227, .55);
}
.threadlist .thread-empty { padding: 3rem 1rem; text-align: center; }
.threadlist .thread-empty-inner { color: var(--ink-4); font-size: .92rem; }

/* 帖子 / 主題詳情 */
.card-thread .media .avatar-3, .card-user-info .avatar-5 { border-radius: 50%; }
.card-thread h4.break-all {
  font-size: 1.3rem; font-weight: 600; letter-spacing: -0.025em;
  color: var(--ink); margin: 0 0 .5rem;
}
.card-thread .message { color: var(--ink-2); line-height: 1.8; font-size: 1rem; }
.card-thread .message img, .card-thread .message table { border-radius: var(--radius-sm); }
.postlist { margin: 0; padding: 0; list-style: none; }
.postlist .post { padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
.postlist .post .avatar-3 { border-radius: 50%; }
.postlist .post .username { color: var(--ink); font-weight: 500; }

/* 分頁 */
.pagination { display: flex; gap: .3rem; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.pagination .page-item .page-link {
  display: inline-block; min-width: 36px; text-align: center;
  padding: .42rem .68rem; border-radius: 10px;
  border: 1px solid var(--line-soft); background: var(--surface);
  color: var(--ink-3); font-weight: 500; font-size: .86rem;
  transition: background .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.pagination .page-item .page-link:hover { background: var(--bg-alt); color: var(--ink); border-color: var(--line); }
.pagination .page-item.active .page-link { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 表單 */
.form-control {
  font-family: var(--font);
  font-size: .95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface);
  padding: .62rem .85rem;
  transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3.5px rgba(0, 113, 227, .14);
  outline: 0;
}
.form-control::placeholder { color: var(--ink-4); }
textarea.form-control { border-radius: var(--radius-sm); }
.form-label, .form-control-label {
  display: block; font-size: .84rem; font-weight: 500;
  color: var(--ink-2); margin-bottom: .4rem;
}
.field { margin-bottom: 1.1rem; }
.input-group .input-group-text {
  background: var(--bg-alt); border: 1px solid var(--line);
  color: var(--ink-3); border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.input-group:focus-within .input-group-text { border-color: var(--blue); color: var(--blue); }
.invalid-feedback { color: #d92d55; font-size: .8rem; }

/* 下拉選單 */
.dropdown-menu {
  border: 1px solid var(--line-soft); border-radius: 12px;
  box-shadow: var(--sh); padding: .3rem; background: var(--surface);
}
.dropdown-item { color: var(--ink-2); border-radius: 8px; font-size: .88rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--bg-alt); color: var(--blue); }
.dropdown-toggle { color: var(--ink-3); }
.dropdown-toggle:hover { color: var(--blue); }

/* 徽標 / 文字 */
.badge-primary { background: var(--blue); }
.text-primary { color: var(--blue) !important; }
.icon.text-primary { color: var(--blue); }
.text-muted { color: var(--ink-4) !important; }
.text-grey { color: var(--ink-4) !important; }
.line-height-2 { line-height: 1.8; }

/* 側欄 */
.aside .btn-primary {
  display: block; text-align: center;
  background: var(--blue); color: #fff; border: 0;
  font-weight: 500; font-size: .95rem;
  padding: .72rem 1rem; border-radius: var(--pill); cursor: pointer;
  transition: background .22s var(--ease-out), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.aside .btn-primary:hover { background: var(--blue-hover); transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(0, 113, 227, .5); }
.aside .card .card-body h5 { color: var(--ink); font-weight: 600; letter-spacing: -0.02em; }
.card-site-info .card-footer { background: var(--surface); border-top: 1px solid var(--line-soft); }
.card-forum-info .card-body, .card-user-info .card-body { color: var(--ink-3); }
.uc-aside { position: sticky; top: 70px; }
.uc-profile { padding: 1.5rem 1rem .9rem; }
.uc-avatar {
  width: 78px; height: 78px; border-radius: 50%;
  border: 2px solid var(--surface); object-fit: cover;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, .22);
}
.uc-name { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin: .7rem 0 .15rem; }
.uc-role { font-size: .8rem; color: var(--ink-4); }
.uc-nav .list-group-item {
  border: 0; border-radius: 10px !important; margin-bottom: .2rem;
  color: var(--ink-2); font-weight: 500; font-size: .9rem;
  transition: background .2s var(--ease-out), color .2s var(--ease-out);
}
.uc-nav .list-group-item:hover { background: var(--bg-alt); color: var(--blue); }
.uc-nav .list-group-item.active { background: var(--ink); color: #fff; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: .9rem; margin: 0; }
.profile-stat { background: var(--bg-alt); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 1rem 1.1rem; }
.profile-stat .ps-num { font-family: var(--mono); font-size: 1.3rem; font-weight: 600; color: var(--ink); line-height: 1.2; word-break: break-all; }
.profile-stat .ps-label { font-size: .78rem; color: var(--ink-4); margin-top: .2rem; }

/* 認證頁 */
.auth-shell { max-width: 440px; margin: 56px auto; padding: 0 var(--gutter); }
.auth-card {
  border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--sh); overflow: hidden;
}
.auth-card .card-body { padding: 2rem 1.8rem 1.8rem; }
.auth-head { text-align: center; margin-bottom: 1.5rem; }
.auth-badge {
  width: 52px; height: 52px; border-radius: 16px; color: #fff;
  background: linear-gradient(150deg, var(--green), var(--green-deep));
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px -8px rgba(52, 199, 89, .55); margin-bottom: .85rem;
}
.auth-badge svg { width: 26px; height: 26px; }
.auth-badge.sm { width: 40px; height: 40px; border-radius: 12px; box-shadow: none; }
.auth-badge.sm svg { width: 20px; height: 20px; }
.auth-title { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); margin: 0 0 .3rem; }
.auth-sub { font-size: .9rem; color: var(--ink-3); margin: 0; }
.auth-foot { display: flex; justify-content: center; gap: 1.3rem; margin-top: 1.2rem; font-size: .88rem; }
.auth-foot a { color: var(--link); font-weight: 500; }
.auth-foot a:hover { text-decoration: underline; }
.auth-card .btn-primary { width: 100%; padding: .76rem; font-size: .98rem; border-radius: var(--pill); }

/* 發帖頁 */
.post-shell { margin: 44px 0; }
.post-tips .tip-card {
  background: var(--bg-alt); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 1.4rem;
}
.post-tips .tip-card h5 { color: var(--ink); font-weight: 600; margin: 0 0 .8rem; font-size: 1rem; }
.post-tips .tip-card ul { margin: 0; padding-left: 1.1rem; color: var(--ink-3); font-size: .88rem; line-height: 1.95; }
.post-tips .tip-card li::marker { color: var(--blue); }
.attach-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.2rem; }
.addattach {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--blue); font-weight: 500; cursor: pointer;
  border: 1px dashed var(--blue-tint-2);
  padding: .5rem .95rem; border-radius: var(--pill);
  transition: background .2s var(--ease-out), border-color .2s var(--ease-out);
}
.addattach:hover { background: var(--blue-tint); border-color: var(--blue); }
.attachlist { list-style: none; padding: 0; margin: .6rem 0 0; }
.attachlist li {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem 0; border-bottom: 1px dashed var(--line-soft); font-size: .88rem;
}

/* 廣告位 */
.ad-slot { margin: 1.6rem 0; text-align: center; }
.ad-rect { text-align: center; }

/* --------------------------------------------------------------------------
   14. 內容頁（About / Contact / Privacy / Terms）
   -------------------------------------------------------------------------- */
.page-head {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  padding: clamp(48px, 6vw, 82px) 0 clamp(28px, 3.5vw, 44px);
  border-bottom: 1px solid var(--line-soft);
}
.page-head .wrap { max-width: 820px; }
.page-head h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 600; letter-spacing: -0.035em; line-height: 1.1;
  color: var(--ink); margin: 0 0 .8rem;
}
.page-lead {
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  line-height: 1.62; color: var(--ink-3); margin: 0;
  max-width: 60ch;
}
.page-meta {
  display: flex; flex-wrap: wrap; gap: .5rem .9rem;
  margin-top: 1.2rem;
  font-family: var(--mono); font-size: .74rem; color: var(--ink-4);
}

.page-body { padding: clamp(40px, 5vw, 68px) 0 var(--sec-y); }
.prose { max-width: 780px; margin: 0 auto; padding: 0 var(--gutter); }
.prose h2 {
  font-size: clamp(1.22rem, 2vw, 1.5rem);
  font-weight: 600; letter-spacing: -0.025em; line-height: 1.25;
  color: var(--ink);
  margin: 2.4rem 0 .8rem;
  scroll-margin-top: 84px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.06rem; font-weight: 600; color: var(--ink); margin: 1.7rem 0 .6rem; }
.prose p { font-size: .98rem; line-height: 1.78; color: var(--ink-2); margin: 0 0 1.05rem; }
.prose ul { margin: 0 0 1.15rem; padding-left: 1.15rem; }
.prose li { font-size: .97rem; line-height: 1.78; color: var(--ink-2); margin-bottom: .45rem; }
.prose li::marker { color: var(--blue); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a:not(.btn-pill):not(.btn-text) { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.prose a:not(.btn-pill):not(.btn-text):hover { color: var(--blue-hover); }
/* 注意 :not(...) 不能省。
   .prose a（0,1,1）的优先级高于 .btn-blue（0,1,0）和 .btn-text（0,1,0），
   而隱私政策／服務條款這兩頁的正文就包在 .prose 裡，於是：
     - .btn-pill.btn-blue → 被刷成藍底藍字，文字直接看不見
     - .btn-text         → 被加上下劃線，和首頁同一個類的鏈接長得不一樣
   用 :not() 把按鈕類排除在外，比事後補 !important 乾淨。 */
.prose code {
  font-family: var(--mono); font-size: .88em;
  background: var(--bg-alt); padding: .12rem .4rem; border-radius: 6px;
}
.prose .callout {
  background: var(--blue-tint);
  border: 1px solid var(--blue-tint-2);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  margin: 1.4rem 0;
}
.prose .callout p:last-child { margin-bottom: 0; }
.prose .callout p { color: var(--ink-2); font-size: .94rem; }

/* 事實清單（About） */
.fact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin: 1.8rem 0 .5rem;
}
.fact {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 1.3rem 1.2rem;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.fact:hover { transform: translateY(-4px); box-shadow: var(--sh-sm); }
.fact b {
  display: block; font-family: var(--mono);
  font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink); line-height: 1.15; margin-bottom: .3rem;
}
.fact span { font-size: .82rem; color: var(--ink-4); }

.check-list { list-style: none; padding: 0; margin: 1.2rem 0; }
.check-list li {
  position: relative; padding-left: 1.9rem;
  font-size: .96rem; line-height: 1.7; color: var(--ink-2);
  margin-bottom: .7rem;
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 15px; height: 9px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}

/* 聯絡頁 */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.25fr;
  gap: clamp(28px, 4vw, 56px);
  max-width: 1020px; margin: 0 auto; padding: 0 var(--gutter);
  align-items: start;
}
.contact-card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 1.5rem 1.5rem 1.4rem;
  box-shadow: var(--sh-xs);
}
.contact-card h2 {
  font-size: 1.02rem; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink); margin: 0 0 .55rem;
}
.contact-mail {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .88rem; font-weight: 500;
  color: var(--blue);
  word-break: break-all;
}
.contact-mail:hover { color: var(--blue-hover); text-decoration: underline; }
.contact-note { font-size: .84rem; line-height: 1.65; color: var(--ink-4); margin: .7rem 0 0; }

.form-card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 1.7rem 1.6rem 1.5rem;
  box-shadow: var(--sh-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-card .btn-primary { width: 100%; padding: .78rem; font-size: .98rem; margin-top: .3rem; }
.form-note { font-size: .78rem; line-height: 1.6; color: var(--ink-4); margin: .9rem 0 0; }
.alert {
  border-radius: var(--radius-sm); border: 1px solid transparent;
  padding: .85rem 1rem; font-size: .9rem; margin-bottom: 1.2rem;
  line-height: 1.6;
}
.alert-ok { background: var(--green-tint); border-color: #bfe8cb; color: #1b6b30; }
.alert-err { background: #fdeef1; border-color: #f6ccd6; color: #a8173b; }
.alert ul { margin: .4rem 0 0; padding-left: 1.1rem; }

.before-list { list-style: none; padding: 0; margin: .8rem 0 0; }
.before-list li {
  font-size: .87rem; line-height: 1.7; color: var(--ink-3);
  padding-left: 1.1rem; position: relative; margin-bottom: .5rem;
}
.before-list li::before {
  content: ""; position: absolute; left: 0; top: .68em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--blue);
}

/* 目錄（法律頁） */
.toc {
  background: var(--bg-alt); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; margin-bottom: 2rem;
}
.toc h2 { font-size: .8rem !important; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4) !important; margin: 0 0 .6rem !important; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc li { font-size: .86rem; margin-bottom: .3rem; }
.toc a { color: var(--ink-3); }
.toc a:hover { color: var(--blue); text-decoration: underline; }

/* --------------------------------------------------------------------------
   14b. 新版頁面：放開 container，讓區塊能滿寬鋪底色
   Bootstrap 的 .container 會把內容鎖在 1120px，區塊的底色就鋪不滿整行。
   這幾條路由改成由區塊自己的 .wrap / .hero-inner / .cta-inner 控制上限。
   刻意用白名單而不是全站放開 —— 舊的內頁（thread / forum / user）
   仍然依賴 .container 的寬度約束。
   -------------------------------------------------------------------------- */
body.route-index #body .container,
body.route-about #body .container,
body.route-contact #body .container,
body.route-privacy #body .container,
body.route-terms #body .container {
  max-width: none;
  padding: 0;
}

/* --------------------------------------------------------------------------
   15. 滾動漸入動畫

   html 上的三個 class 由 <head> 內聯腳本與 site.js 協作：
     rv-on    內聯腳本加，表示「動畫系統已就緒」→ 此時才隱藏 .rv
     rv-ready site.js 啟動後加，告訴安全網「JS 有正常跑，別插手」
     rv-off   3 秒內沒等到 rv-ready 才加，撤銷隱藏

   這樣安排是為了同時滿足兩個互相衝突的需求：
   不閃爍（必須在 body 渲染前就先隱藏）＋ 不因 JS 失效而白屏（必須能撤銷）。
   -------------------------------------------------------------------------- */
html.rv-on .rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
  will-change: opacity, transform;
}
html.rv-on .rv.in { opacity: 1; transform: none; }

html.rv-off .rv {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* --------------------------------------------------------------------------
   16. 響應式
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .scene-grid { grid-template-columns: repeat(2, 1fr); }
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .steps, .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .brand-col { grid-column: span 3; max-width: none; }
}

@media (max-width: 991px) {
  .col-lg-9, .col-lg-3 { flex: 0 0 100%; max-width: 100%; }
  .aside { margin-top: 1.5rem; }
  .uc-aside { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  body { font-size: 16px; }
  #header .navbar-toggler { display: block; }
  #header .navbar-brand { flex: 1; }
  #header .navbar-collapse {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .3rem;
    background: rgba(251, 251, 253, .98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line-soft);
    padding: .9rem var(--gutter) 1.2rem;
    box-shadow: var(--sh);
  }
  #header .navbar-collapse.show { display: flex; }
  #header .navbar-nav { flex-direction: column; align-items: stretch; gap: 0; }
  #header .navbar-nav .nav-link { display: block; padding: .68rem .6rem; font-size: .95rem; }
  #header .navbar-user { margin: .5rem 0 0; flex-direction: column; align-items: stretch; gap: .1rem; }
  #header .navbar-user .nav-link { display: block; padding: .68rem .6rem; font-size: .95rem; }
  .lang-switch { order: 2; margin-left: auto; }
  .lang-switch > summary { padding: .38rem .5rem; }
  .lang-switch > summary .lang-label { display: none; }
  .lang-menu { right: -6px; }

  .hero { padding-top: 44px; }
  /* 三項統計在窄屏排成 2 欄，第 3 項會落單在第二行。
     若只給它 border-top，那條線只畫在左欄，會和右邊的豎線接成一個「L」，
     看起來像沒畫完的半個方框（實測就是這樣）。
     讓落單的那一項橫跨整行，分隔線才是完整的一條橫線。 */
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .hero-stat { border-left: 1px solid var(--line-soft); }
  .hero-stat:nth-child(odd) { border-left: 0; }
  .hero-stat:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .hero-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .hero-cta .btn-pill { flex: 1 1 auto; }
  .hero-shot { border-radius: var(--radius); }

  .scene-grid, .steps, .guide-grid, .app-grid { grid-template-columns: 1fr; }
  .sec-head--split { align-items: flex-start; }
  .faq-a-inner { padding-right: .5rem; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .brand-col { grid-column: span 2; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-legal { gap: .9rem; }
  .toc ol { columns: 1; }
  .form-row { grid-template-columns: 1fr; }
  .row { padding: 28px 0; }
  .prose h2 { margin-top: 1.9rem; }

  .threadlist .thread-row { gap: .6rem; padding: .8rem .9rem; }
  .threadlist .thread-index { width: 30px; height: 30px; font-size: .82rem; border-radius: 9px; }
  .threadlist .thread-tag { width: 42px; height: 42px; font-size: .84rem; border-radius: 10px; }
  .threadlist .thread-title { font-size: .93rem; }
  .threadlist .thread-meta { font-size: .72rem; }
  .threadlist .btn-thread-download { padding: .42rem .8rem; font-size: .78rem; }
}

@media (max-width: 480px) {
  .app-dl span { display: none; }
  .app-dl { padding: .5rem; }
  .fact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .brand-col { grid-column: span 1; }
  .threadlist .thread-row-check { display: none; }
  .threadlist .thread-tag { display: none; }
  .threadlist .thread-meta .meta-version { display: none; }
  .threadlist .btn-thread-download span { display: none; }
  .threadlist .btn-thread-download { padding: .5rem; width: 36px; height: 36px; justify-content: center; }
}

/* --------------------------------------------------------------------------
   16. 返回頂部按鈕（改寫自 xn_top 插件）
   --------------------------------------------------------------------------
   插件 xn_top 會往頁尾注入：
     <div id="scroll_to_top" style="position:fixed; bottom:80px; right:10px;
          width:70px; height:70px; display:none">
       <a style="background:url(plugin/xn_top/scroll_top.png) no-repeat"></a>
   那是一個 70×70 的舊主題 PNG —— 灰色圓底 + 粗箭頭，跟本站的淺白蘋果風
   完全不是一個體系，而且在 390px 上幾乎佔掉半個螢幕寬。

   插件的行內樣式優先於樣式表，所以這裡要覆蓋的屬性都得帶 !important。
   不去改插件本體的原因：插件檔案升級會被覆蓋，覆蓋樣式留在主題裡更安全。
   圖示改用內聯 SVG data URI，不依賴任何外部圖片檔。 */
#scroll_to_top {
  bottom: 24px !important;
  right: 18px !important;
  width: 44px !important;
  height: 44px !important;
}
#scroll_to_top > a {
  display: block !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, .82) !important;
  /* 細箭頭 + 細描邊，取代原本那張粗箭頭 PNG */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1d1f' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 14.5L12 8.5l6 6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 18px 18px !important;
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  transition: transform .28s var(--ease), background-color .22s var(--ease-out),
    border-color .22s var(--ease-out), box-shadow .28s var(--ease);
}
#scroll_to_top > a:hover {
  background-color: #fff !important;
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -12px rgba(0, 113, 227, .42);
}
#scroll_to_top > a:active { transform: scale(.94); }

@media (max-width: 767px) {
  #scroll_to_top { bottom: 18px !important; right: 14px !important; }
}

/* --------------------------------------------------------------------------
   17. 排版精修
   -------------------------------------------------------------------------- */

/*
 * 換行品質。
 *
 * text-wrap: balance —— 讓標題各行長度接近，避免「最後一行只剩兩三個字」。
 *   瀏覽器限制：只對 ≤6 行的區塊生效，超出就自動退回一般換行，不會壞版。
 * text-wrap: pretty —— 段落用，主要作用是避免行尾孤字（orphan）。
 * 兩者都是純增強：不支援的瀏覽器直接忽略，維持原樣，沒有任何副作用。
 */
.hero-title,
.sec-title,
.page-head h1,
.page-head h2 { text-wrap: balance; }

.hero-sub,
.sec-sub,
.page-lead,
.scene-desc { text-wrap: pretty; }

/*
 * 等寬數字。
 * --mono 的 Plex Mono 本來就是等寬，但 .hero-stat b / .fact b 會參與
 * 進場數字動畫（見 site.js 的 initCountUp），逐格改 textContent 時
 * 若字寬不等就會左右抖動。顯式宣告 tabular-nums，把這個風險鎖死。
 */
.hero-stat b,
.fact b,
.app-meta { font-variant-numeric: tabular-nums; }

/* 區塊小標：原本寫在模板的行內 style，抽成類別才好維護 */
.sec-title--sm { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }

/* 無障礙：尊重使用者的動效偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .rv { opacity: 1 !important; transform: none !important; }
}

/* 列印 */
@media print {
  #header, .site-footer, .cta-band, .hero-visual, .ad-slot { display: none !important; }
  body { background: #fff; }
}
