/* ===========================================================
   XGATE 引擎文檔 · 共享樣式 (BookStack 風格 · 純靜態)
   資源引用自父目錄 NT/：../GenSenRounded-B.woff2、../tb.png、../p5.png、../p1.png
   =========================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 18px; }

/* 自定義滾動條 */
::-webkit-scrollbar { width: 5px; height: 0; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #0f3460; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #1a4a8a; }
/* 隱藏橫向滾動條 */
body { overflow-x: hidden; }

body {
  font-family: "SimSun", "宋体", "NSimSun", serif;
  background: #F4F1E3;
  color: #2a2a3a;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: #1565c0; text-decoration: none; }
a:hover { color: #0d47a1; text-decoration: underline; }
strong { color: #e94560; }

/* ---------- 頂部標題列 ---------- */
.bk-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0;
  height: 64px;
  background: url('tb.png') repeat-x center / auto 100%;
  border-bottom: 2px solid #0f3460;
}
.bk-header-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.bk-brand {
  font-size: 1.65rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  white-space: nowrap;
  letter-spacing: 1px;
}
.bk-search {
  width: 280px;
  max-width: 50vw;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 20px;
  background: rgba(15,52,96,0.45);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}
.bk-search::placeholder { color: rgba(255,255,255,0.7); }
.bk-search:focus {
  background: rgba(15,52,96,0.7);
  border-color: #e94560;
  box-shadow: 0 0 0 3px rgba(233,69,96,0.25);
}
/* 搜尋結果下拉（全文搜尋） */
.bk-search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 24px;
  width: 360px;
  max-width: 90vw;
  max-height: 70vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(15,52,96,0.18);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15,52,96,0.22);
  z-index: 200;
  padding: 6px;
}
.bk-search-item {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: #263238;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s;
}
.bk-search-item:hover {
  background: rgba(21,101,192,0.08);
  border-left-color: #e94560;
  text-decoration: none;
}
.bk-search-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f3460;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.bk-search-book {
  font-size: 0.7rem;
  font-weight: 400;
  color: #546e7a;
  background: rgba(15,52,96,0.08);
  padding: 1px 7px;
  border-radius: 10px;
}
.bk-search-sub {
  font-size: 0.74rem;
  color: #607d8b;
  margin-top: 2px;
}
.bk-search-snippet {
  font-size: 0.74rem;
  color: #546e7a;
  margin-top: 3px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bk-search-empty {
  padding: 12px;
  font-size: 0.82rem;
  color: #607d8b;
  text-align: center;
}
/* 頂部導航（原首頁 nav-tabs，移到 header 中） */
.bk-topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}
.bk-topnav-link {
  color: #fff;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 16px;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.2s;
}
.bk-topnav-link:hover {
  color: #fff;
  background: rgba(233,69,96,0.85);
  text-decoration: none;
}

/* ---------- 主體佈局 ---------- */
.bk-body {
  display: flex;
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto 24px;
  padding: 0 24px;
  align-items: flex-start;
}

/* ---------- 側邊欄 ---------- */
.bk-sidebar {
  position: sticky;
  top: 62px;
  margin-top: -4px;
  flex: 0 0 280px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  box-sizing: border-box;
  min-height: 607px; /* 不低於 bar.png 自然高度，避免圖片被壓縮 */
  padding: 16px 14px;
  /* 9-slice：中間直身拉伸，底部 124px 圓弧固定不拉伸（依 bar.png 透明區分析得出） */
  border-style: solid;
  border-width: 0 1px 124px 1px;
  border-image: url('bar.png') 0 1 124 1 fill stretch;
}
.bk-shelf-title {
  font-size: 1.05rem;
  font-weight: bold;
  color: #0f3460;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e94560;
}
.bk-home {
  display: block;
  font-size: 0.88rem;
  color: #1565c0;
  padding: 6px 10px;
  margin-bottom: 12px;
  border-radius: 6px;
  background: rgba(21,101,192,0.08);
}
.bk-home:hover { background: rgba(21,101,192,0.16); text-decoration: none; }

.tree-book { margin-bottom: 6px; }
.tree-sub { margin-left: 2px; border-left: 2px dashed rgba(15,52,96,0.18); padding-left: 0px; }
.tree-sub > .tree-book-head { all: unset; display: flex; align-items: center; gap: 6px; cursor: pointer; color: #546e7a; }
.tree-book-head {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  color: #0f3460;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background 0.15s;
  user-select: none;
}
.tree-book-head:hover { background: rgba(15,52,96,0.08); }
.tree-book-head .caret {
  display: inline-block;
  transition: transform 0.2s;
  font-size: 0.7rem;
  color: #5a6b7a;
  transform: rotate(-90deg); /* 預設收合（箭頭朝右） */
}
.tree-book.open .caret { transform: rotate(0deg); } /* 展開（箭頭朝下） */
.tree-pages { display: none; padding-left: 12px; margin: 2px 0 6px; }
.tree-book.open > .tree-pages { display: block; }
.tree-page {
  display: block;
  border-radius: 6px;
  color: #37474f;
  font-size: 0.8rem;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.tree-page:hover { background: rgba(21,101,192,0.1); text-decoration: none; color: #0d47a1; }
.tree-page.active {
  background: rgba(233,69,96,0.12);
  color: #e94560;
  border-left-color: #e94560;
  font-weight: bold;
}

/* ---------- 正文 ---------- */
.bk-content { flex: 1 1 auto; min-width: 0; }
.bk-crumb {
  font-size: 0.82rem;
  color: #5a6b7a;
  margin-bottom: 14px;
  padding: 6px 12px;
  background: rgba(15,52,96,0.05);
  border-radius: 6px;
}
.bk-crumb span { color: #e94560; }

.bk-article {
  position: relative;
  background-color: #f5f9ff;
  border-style: solid;
  border-color: transparent;
  border-width: 60px 80px 90px 80px;
  border-image: url('p5.png') 105 150 175 150 / 60px 80px 90px 80px stretch;
  border-radius: 8px;
  padding: 32px 44px;
}
.bk-article > * { position: relative; z-index: 1; }
.bk-article h1.section-title {
  font-size: 1.6rem;
  color: #0f3460;
  margin-bottom: 6px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e94560;
  text-align: center;
  font-family: "SimSun", "宋体", "NSimSun", serif;
}
.bk-article .section-subtitle {
  color: #5a6b7a;
  margin-bottom: 24px;
  font-size: 0.92rem;
  text-align: center;
}
.bk-article h2 {
  color: #0f3460;
  font-size: 1.2rem;
  margin: 26px 0 10px;
  padding-left: 10px;
  border-left: 4px solid #e94560;
}
.bk-article h3 { color: #1565c0; font-size: 1.02rem; margin: 18px 0 8px; }
.bk-article p { color: #37474f; margin-bottom: 12px; font-size: 0.95rem; }
.bk-article ul, .bk-article ol { padding-left: 22px; margin-bottom: 14px; }
.bk-article li { color: #37474f; font-size: 0.95rem; margin-bottom: 6px; }
.bk-article code {
  background: rgba(15,52,96,0.1);
  border-radius: 4px;
  padding: 1px 7px;
  font-family: "Consolas", "Microsoft JhengHei", monospace;
  font-size: 0.88rem;
  color: #c62828;
}
.bk-article pre {
  background: #0f3460;
  color: #e3f2fd;
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  margin-bottom: 16px;
  font-size: 0.85rem;
  line-height: 1.6;
}
.bk-article pre code { background: none; color: inherit; padding: 0; }

.bk-note {
  background: #fff8e1;
  border-left: 3px solid #ffb300;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 0.9rem;
  color: #8a6d00;
}
.bk-note strong { color: #c62828; }

/* ---------- 上一篇 / 下一篇 ---------- */
.bk-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed #90caf9;
}
.bk-pager-info { color: #5a6b7a; font-size: 0.85rem; }
.bk-pager .empty { flex: 1; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: bold;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, #e94560, #c62828); color: #fff; }
.btn-primary:hover { background: linear-gradient(135deg, #ff6b81, #e94560); text-decoration: none; transform: translateY(-1px); color:#fff; }
.btn-secondary {
  background: linear-gradient(135deg, #0f3460, #16213e);
  color: #90caf9;
  border: 1px solid #1a5276;
}
.btn-secondary:hover { background: linear-gradient(135deg, #1a5276, #0f3460); text-decoration: none; transform: translateY(-1px); color:#cfe8ff; }
.btn-danger { background: linear-gradient(135deg, #e94560, #c62828); color: #fff; }
.btn-danger:hover { background: linear-gradient(135deg, #ff6b81, #e94560); text-decoration: none; transform: translateY(-1px); color:#fff; }

/* ---------- 前台管理工具（登入後顯示） ---------- */
.bk-admin-tools { display: flex; gap: 8px; padding: 10px 14px; }
.bk-add-btn {
  flex: 1; text-align: center; font-size: 0.82rem; font-weight: bold;
  padding: 7px 0; border-radius: 6px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #1565c0, #0f3460); color: #fff;
}
.bk-add-btn:hover { background: linear-gradient(135deg, #1e88e5, #1565c0); }
.bk-add-page {
  border: none; background: rgba(21,101,192,.15); color: #0f3460;
  width: 20px; height: 20px; line-height: 18px; border-radius: 50%;
  cursor: pointer; font-size: 0.9rem; padding: 0; margin-left: 6px; vertical-align: middle;
}
.bk-add-page:hover { background: #1565c0; color: #fff; }

/* 文章框內右上角的修改 / 刪除 */
.bk-article { position: relative; }
.bk-admin-actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; z-index: 5; }
.bk-admin-actions .btn { padding: 6px 14px; font-size: 0.82rem; }

/* ---------- 彈窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,52,96,.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; z-index: 1000; overflow: auto;
}
.modal {
  background: #fff; border-radius: 12px; width: min(1040px, 100%);
  box-shadow: 0 12px 40px rgba(0,0,0,.25); max-height: 95vh; display: flex; flex-direction: column;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; border-bottom: 1px solid #eee;
}
.modal-head span { font-weight: bold; font-size: 1.05rem; color: #0f3460; }
.modal-x { border: none; background: none; font-size: 1.4rem; cursor: pointer; color: #888; }
.modal-body { padding: 20px; overflow: auto; }
.modal-actions { margin-top: 16px; display: flex; gap: 10px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: .82rem; color: #555; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 10px; border: 1px solid #ccd; border-radius: 7px; font-size: .95rem; font-family: inherit;
}
.row { display: flex; gap: 14px; }
.row > div { flex: 1; }

/* ---------- 文檔中心首頁卡片 ---------- */
.bk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 8px;
}
.bk-card {
  display: block;
  background-color: #f5f9ff;
  border-style: solid;
  border-color: transparent;
  border-width: 55px 70px 80px 70px;
  border-image: url('p5.png') 105 150 175 150 / 55px 70px 80px 70px stretch;
  border-radius: 10px;
  padding: 22px 26px;
  transition: all 0.25s;
}
.bk-card:hover { transform: translateY(-3px); text-decoration: none; filter: brightness(1.02); }
.bk-card > * { position: relative; z-index: 1; }
.bk-card .bk-card-tag {
  display: inline-block;
  background: #e94560;
  color: #fff;
  font-size: 0.78rem;
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.bk-card .bk-card-tag.alt { background: #0f3460; color: #64b5f6; }
.bk-card h3 { color: #0f3460; margin-bottom: 8px; font-size: 1.1rem; }
.bk-card p { color: #4a4a5a; font-size: 0.88rem; }
.bk-card .bk-card-links { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.bk-card .bk-card-links a {
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: 14px;
  background: rgba(21,101,192,0.1);
  color: #1565c0;
}
.bk-card .bk-card-links a:hover { background: rgba(21,101,192,0.2); text-decoration: none; }

.bk-hero {
  text-align: center;
  padding: 18px 0 6px;
  margin-bottom: 18px;
}
.bk-hero h1 { color: #0f3460; font-size: 1.8rem; }
.bk-hero p { color: #5a6b7a; font-size: 0.95rem; margin-top: 6px; }

/* ---------- 建設中 toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: url('p1.png') center / 100% 100% no-repeat;
  color: #fff;
  padding: 18px 36px;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 999;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---------- 頁尾 ---------- */
.bk-footer {
  text-align: center;
  padding: 26px;
  color: #546e7a;
  font-size: 0.8rem;
  border-top: 1px solid #0f3460;
  margin-top: 36px;
}

/* ---------- 響應式 ---------- */
@media (max-width: 900px) {
  .bk-body { flex-direction: column; }
  .bk-sidebar {
    position: static;
    flex: 1 1 auto;
    width: 100%;
    max-height: none;
    margin-top: 0;
  }
  .bk-article { padding: 24px 22px; border-width: 40px 50px 60px 50px; }
  .bk-search { width: 160px; }
  .bk-header-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .bk-topnav { order: 3; width: 100%; justify-content: center; }
}

/* ============================================================
   首頁內聯內容（原 index.html 區塊，作用域限定 .xgate-home）
   資源路徑使用網站根目錄絕對路徑（book 安裝於 /book/ 下）
   ============================================================ */
.xgate-home {
  font-family: "SimSun", "宋体", "NSimSun", serif;
  color: #2a2a3a;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: #F4F1E3;
  border-radius: 10px;
  overflow: hidden;
  padding-bottom: 10px;
}
.xgate-home a { color: #64b5f6; text-decoration: none; }
.xgate-home a:hover { color: #90caf9; text-decoration: underline; }
.xgate-home strong { color: #ffd54f; }

.xgate-home .btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: bold;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.xgate-home .btn-primary { background: linear-gradient(135deg, #e94560, #c62828); color: #fff; }
.xgate-home .btn-primary:hover { background: linear-gradient(135deg, #ff6b81, #e94560); text-decoration: none; transform: translateY(-1px); }
.xgate-home .btn-secondary { background: linear-gradient(135deg, #0f3460, #16213e); color: #90caf9; border: 1px solid #1a5276; }
.xgate-home .btn-secondary:hover { background: linear-gradient(135deg, #1a5276, #0f3460); text-decoration: none; transform: translateY(-1px); }
.xgate-home .btn-bt {
  background: url('bt1.png') center / 100% 100% no-repeat;
  color: #fff;
  width: 100%;
  max-width: 200px;
  height: 46px;
  line-height: 46px;
  padding: 0;
  margin: 3px 4px;
  text-align: center;
  border: none;
  box-sizing: border-box;
}
.xgate-home .btn-bt:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(1.08); }
.xgate-home .password-hint {
  display: inline-block;
  background: rgba(21,101,192,0.12);
  border: 1px solid #1565c0;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.85rem;
  color: #1565c0;
}

/* Navigation tabs（置於首頁內容頂部，非 sticky 以免與頂部標題列重疊） */
.xgate-home .nav-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  background: url('tb.png') repeat-x center / auto 100%;
  border-bottom: 2px solid #0f3460;
}
.xgate-home .nav-tab {
  padding: 14px 28px;
  color: #78909c;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}
.xgate-home .nav-tab:hover { color: #e0e0e0; background: rgba(255,255,255,0.03); }
.xgate-home .nav-tab.active {
  color: #e94560;
  border-bottom-color: #e94560;
  background: rgba(233,69,96,0.05);
}

/* Main container */
.xgate-home .container {
  position: relative;
  max-width: 980px;
  margin: 20px auto;
  padding: 30px 80px 30px 95px;
  box-sizing: border-box;
}
.xgate-home .container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-style: solid;
  border-color: transparent;
  border-width: 400px 75px 70px 90px;
  border-image: url('p6.png') 400 75 70 90 / 400px 75px 70px 90px stretch;
  pointer-events: none;
  z-index: 0;
}

/* Section */
.xgate-home .section { display: none; position: relative; z-index: 1; }
.xgate-home .section.active { display: block; }
.xgate-home .section-title {
  font-size: 1.5rem;
  color: #0f3460;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e94560;
  text-align: center;
  font-family: "SimSun", "宋体", "NSimSun", serif;
}
.xgate-home .section-subtitle { color: #5a6b7a; margin-bottom: 24px; font-size: 0.9rem; max-width: 620px; margin-left: auto; margin-right: auto; }

/* Download cards */
.xgate-home .download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.xgate-home .download-card {
  position: relative;
  min-width: 0;
  max-width: 340px;
  margin: 0 auto;
  background-color: transparent;
  border: 12px solid transparent;
  border-image: url('p2.png') 12 fill / 12px stretch;
  border-radius: 12px;
  padding: 22px;
  overflow: hidden;
  transition: all 0.3s;
}
.xgate-home .download-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(233,69,96,0.4); }
.xgate-home .download-card.card-server::before {
  content: ""; position: absolute; inset: 0;
  background: url('n1.png') center / cover no-repeat; opacity: 0.3; z-index: 0; pointer-events: none;
}
.xgate-home .download-card.card-client::before {
  content: ""; position: absolute; inset: 0;
  background: url('n2.png') center / cover no-repeat; opacity: 0.3; z-index: 0; pointer-events: none;
}
.xgate-home .download-card.card-server > *,
.xgate-home .download-card.card-client > * { position: relative; z-index: 1; }
.xgate-home .platform-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.xgate-home .platform-links .btn { flex: 1 1 130px; text-align: center; }
.xgate-home .platform-links .btn-bt { flex: 1 1 auto; }
.xgate-home .download-card h3 { font-size: 1.1rem; margin-bottom: 10px; color: #2a2a3a; }
.xgate-home .download-card .tag {
  display: inline-block; background: #e94560; color: #fff;
  font-size: 0.8rem; padding: 2px 10px; border-radius: 4px; margin-bottom: 12px;
}
.xgate-home .download-card .tag-alt { background: #0f3460; color: #64b5f6; }
.xgate-home .download-card p { color: #4a4a5a; font-size: 0.9rem; margin-bottom: 16px; }

/* Notes */
.xgate-home .notes {
  position: relative;
  background-color: #e3f2fd;
  border-style: solid;
  border-color: transparent;
  border-width: 70px 100px 112px 100px;
  border-image: url('p5.png') 105 150 175 150 / 70px 100px 112px 100px stretch;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 30px;
}
.xgate-home .notes::before {
  content: ""; position: absolute; top: -70px; left: -100px; right: -100px; bottom: -112px;
  background: url('map.png') center / cover no-repeat; opacity: 0.6; border-radius: 8px; pointer-events: none; z-index: 0;
}
.xgate-home .notes > * { position: relative; z-index: 1; }
.xgate-home .notes h4 { color: #0d47a1; margin-top: -8px; margin-bottom: 10px; text-align: center; font-size: 2rem; font-weight: bold; }
.xgate-home .notes li { color: #37474f; margin-bottom: 6px; font-size: 0.9rem; }

/* Partner logo marquee */
.xgate-home .marquee {
  overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.xgate-home .marquee-track { display: inline-flex; align-items: center; gap: 48px; white-space: nowrap; animation: marquee-scroll 22s linear infinite; }
.xgate-home .marquee-track img { height: auto; width: auto; flex: 0 0 auto; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Report section */
.xgate-home .report-box {
  position: relative;
  background: #e3f2fd;
  border-style: solid;
  border-color: transparent;
  border-width: 100px 150px 160px 150px;
  border-image: url('p5.png') 150 150 250 150 / 100px 150px 160px 150px stretch;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
}
.xgate-home .report-box h3 { color: #e94560; margin-bottom: 14px; font-size: 1.2rem; }
.xgate-home .report-box p { color: #37474f; margin-bottom: 8px; font-size: 0.92rem; }
.xgate-home .report-steps { text-align: left; max-width: 600px; margin: 20px auto 0; }
.xgate-home .report-steps li { color: #37474f; margin-bottom: 8px; font-size: 0.9rem; }

/* 建設中 toast */
.xgate-home .toast {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: url('p1.png') center / 100% 100% no-repeat;
  color: #fff;
  padding: 18px 36px;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 999;
}
.xgate-home .toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

@media (max-width: 700px) {
  .xgate-home .container { max-width: 100%; padding: 20px 75px 20px 90px; }
  .xgate-home .download-grid { grid-template-columns: 1fr; }
  .xgate-home .nav-tab { padding: 12px 16px; font-size: 0.85rem; }
}
