/* =========================================================================
   蒼玄仙途 官網樣式
   色票取自伺服器圖示：夜墨藍、青玉、仙金、雲霧白
   ========================================================================= */

/* ---- 設計變數 ----------------------------------------------------------- */
:root {
  --ink-1000: #05080d;
  --ink-900: #080d14;
  --ink-800: #0b1220;
  --ink-700: #101a27;
  --ink-600: #16222f;
  --ink-500: #1e2d3d;

  --jade: #63bfae;
  --jade-soft: #a5e3d6;
  --jade-deep: #2b7a6e;
  --gold: #e8c07a;
  --gold-soft: #f7e6bd;
  --gold-deep: #a8823a;
  --seal: #c4513f;

  --text: #e9eef3;
  --text-soft: #c8d4de;
  --muted: #9db0be;
  --dim: #7c8e9c;

  --line: rgba(214, 180, 120, 0.16);
  --line-strong: rgba(214, 180, 120, 0.34);
  --line-cool: rgba(120, 190, 200, 0.14);

  --panel: rgba(12, 20, 30, 0.72);
  --panel-solid: #0c1420;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;

  --serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "STSong",
    "PMingLiU", "SimSun", Georgia, serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Hiragino Sans GB",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", Consolas,
    "Liberation Mono", monospace;

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.6);

  --header-h: 72px;
  --wrap: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- 基礎 --------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1200px 620px at 78% -10%, rgba(99, 191, 174, 0.13), transparent 62%),
    radial-gradient(900px 520px at 8% 4%, rgba(232, 192, 122, 0.09), transparent 60%),
    linear-gradient(180deg, #080d14 0%, #0a1119 40%, #070b11 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* 細微紙紋，讓大面積深色不至於死板 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--jade-soft);
  text-decoration: none;
  transition: color 0.22s var(--ease), opacity 0.22s var(--ease);
}

a:hover {
  color: var(--gold-soft);
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: 0.012em;
  margin: 0 0 0.6em;
  color: #f4f7fa;
}

p {
  margin: 0 0 1.05em;
}

ul,
ol {
  margin: 0 0 1.05em;
  padding-left: 1.35em;
}

li {
  margin-bottom: 0.34em;
}

strong {
  color: var(--gold-soft);
  font-weight: 700;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 0.12em 0.42em;
  border-radius: var(--r-sm);
  background: rgba(99, 191, 174, 0.1);
  border: 1px solid rgba(99, 191, 174, 0.2);
  color: var(--jade-soft);
  white-space: nowrap;
}

kbd {
  background: rgba(232, 192, 122, 0.12);
  border-color: rgba(232, 192, 122, 0.28);
  color: var(--gold-soft);
}

hr {
  border: 0;
  height: 1px;
  margin: 2.6rem 0;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

::selection {
  background: rgba(232, 192, 122, 0.28);
  color: #fff;
}

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

.wrap {
  width: min(100% - 2.6rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -80px;
  transform: translateX(-50%);
  z-index: 999;
  padding: 0.7rem 1.4rem;
  background: var(--gold);
  color: #101820;
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: 700;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0;
  color: #101820;
}

/* ---- 共用元素 ----------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 1rem;
  font-weight: 600;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--jade));
  opacity: 0.7;
}

.eyebrow::after {
  background: linear-gradient(90deg, var(--jade), transparent);
}

.lede {
  font-size: 1.02rem;
  color: var(--text-soft);
  line-height: 1.95;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.86rem;
}

.nowrap {
  white-space: nowrap;
}

.center {
  text-align: center;
}

.divider-orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 3rem 0;
  color: var(--gold-deep);
}

.divider-orn::before,
.divider-orn::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 220px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.divider-orn svg {
  width: 22px;
  height: 22px;
  opacity: 0.8;
}

/* 按鈕 */
.btn {
  --btn-bg: linear-gradient(135deg, #f0d094 0%, #d9a94c 55%, #bf8f34 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.7rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #171008;
  background: var(--btn-bg);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(191, 143, 52, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), filter 0.22s var(--ease);
  text-align: center;
  line-height: 1.3;
}

.btn:hover {
  transform: translateY(-2px);
  color: #171008;
  box-shadow: 0 14px 34px rgba(191, 143, 52, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  filter: brightness(1.04);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn--ghost {
  background: rgba(99, 191, 174, 0.07);
  color: var(--jade-soft);
  border: 1px solid rgba(99, 191, 174, 0.4);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(99, 191, 174, 0.14);
  color: #dff8f1;
  box-shadow: 0 0 0 3px rgba(99, 191, 174, 0.08);
}

.btn--outline {
  background: transparent;
  color: var(--gold-soft);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.btn--outline:hover {
  background: rgba(232, 192, 122, 0.1);
  color: #fff5e0;
}

.btn--sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: grayscale(0.5);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

/* 標籤 / 徽章 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.62rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--gold-soft);
  background: rgba(232, 192, 122, 0.08);
  white-space: nowrap;
  line-height: 1.7;
}

.tag--jade {
  color: var(--jade-soft);
  border-color: rgba(99, 191, 174, 0.4);
  background: rgba(99, 191, 174, 0.1);
}

.tag--seal {
  color: #f1b3a8;
  border-color: rgba(196, 81, 63, 0.45);
  background: rgba(196, 81, 63, 0.12);
}

.tag--dim {
  color: var(--muted);
  border-color: rgba(157, 176, 190, 0.26);
  background: rgba(157, 176, 190, 0.07);
}

/* 面板 */
.panel {
  position: relative;
  padding: 1.9rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.panel--flat {
  background: rgba(8, 14, 21, 0.5);
}

/* 標題群 */
.section {
  padding: 4.2rem 0;
  position: relative;
  z-index: 2;
}

.section--tight {
  padding: 2.8rem 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 2.4rem;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  margin-bottom: 0.5rem;
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

.section-head--wide {
  max-width: none;
}

/* =========================================================================
   頁首導覽
   ========================================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(7, 12, 19, 0.62);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px) saturate(140%);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.is-stuck {
  background: rgba(6, 10, 16, 0.9);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
}

.header-inner {
  width: min(100% - 2rem, 1320px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
  color: #fff;
}

.brand:hover {
  color: var(--gold-soft);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  image-rendering: pixelated;
  box-shadow: 0 0 18px rgba(232, 192, 122, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.brand-text strong {
  font-family: var(--serif);
  font-size: 1.12rem;
  letter-spacing: 0.16em;
  color: var(--gold-soft);
  font-weight: 700;
}

.brand-text em {
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--dim);
}

.nav {
  margin-left: auto;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav li {
  margin: 0;
}

.nav a {
  position: relative;
  display: block;
  padding: 0.5rem 0.68rem;
  font-size: 0.875rem;
  color: var(--text-soft);
  border-radius: var(--r-sm);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-50%);
  transition: width 0.28s var(--ease);
}

.nav a:hover {
  color: var(--gold-soft);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  width: calc(100% - 1.1rem);
}

.nav a[aria-current="page"] {
  color: var(--gold);
}

.nav a.nav-ext svg {
  width: 11px;
  height: 11px;
  margin-left: 0.28rem;
  opacity: 0.7;
  vertical-align: baseline;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
  margin-left: 0.4rem;
}

/* IP 小膠囊 */
.ip-capsule {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.34rem 0.36rem 0.34rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 191, 174, 0.32);
  background: rgba(99, 191, 174, 0.07);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--jade-soft);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease);
}

.ip-capsule:hover {
  border-color: rgba(99, 191, 174, 0.6);
  background: rgba(99, 191, 174, 0.13);
  color: #e2fbf5;
}

.ip-capsule .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
  box-shadow: 0 0 0 3px rgba(124, 142, 156, 0.14);
  flex: none;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.ip-capsule .dot.is-on {
  background: #58e0a8;
  box-shadow: 0 0 0 3px rgba(88, 224, 168, 0.16), 0 0 10px rgba(88, 224, 168, 0.8);
  animation: pulse 2.6s ease-in-out infinite;
}

.ip-capsule .dot.is-off {
  background: var(--seal);
  box-shadow: 0 0 0 3px rgba(196, 81, 63, 0.18);
}

.ip-capsule .ip-label {
  color: var(--dim);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.ip-capsule .copy-ico {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(99, 191, 174, 0.16);
  color: var(--jade-soft);
  flex: none;
}

.ip-capsule .copy-ico svg {
  width: 12px;
  height: 12px;
}

/* 登入鈕 */
.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-1000);
  background: linear-gradient(135deg, #f2d79f, #d9a94c);
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn-login:hover {
  color: #101010;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(217, 169, 76, 0.32);
}

.btn-login.is-user {
  background: rgba(99, 191, 174, 0.14);
  color: var(--jade-soft);
  border: 1px solid rgba(99, 191, 174, 0.4);
}

.btn-login svg {
  width: 14px;
  height: 14px;
}

/* 手機版仙玉閣（保持在漢堡外） */
.nav-store-mobile {
  display: none;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: rgba(232, 192, 122, 0.06);
  color: var(--gold-soft);
  cursor: pointer;
  flex: none;
}

.nav-toggle span {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transform: translateX(-50%);
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle span:nth-child(1) {
  top: 13px;
}

.nav-toggle span:nth-child(2) {
  top: 20px;
}

.nav-toggle span:nth-child(3) {
  top: 27px;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateX(-50%) translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateX(-50%) translateY(-7px) rotate(-45deg);
}

/* 手機 IP 條 */
.mobile-ipbar {
  display: none;
}

/* 抽屜 */
.drawer {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  background: #070b11;
  backdrop-filter: blur(16px);
  padding: 1.6rem 1.4rem 3rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease), visibility 0.26s;
}

.drawer.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.drawer nav ul {
  display: block;
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
}

.drawer nav li {
  margin: 0;
  border-bottom: 1px solid rgba(214, 180, 120, 0.1);
}

.drawer nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 0.4rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: var(--text);
}

.drawer nav a[aria-current="page"] {
  color: var(--gold);
}

.drawer nav a .idx {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--dim);
  letter-spacing: 0.1em;
}

body.drawer-open {
  overflow: hidden;
}

/* =========================================================================
   首頁主視覺
   ========================================================================= */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 5.2rem) 0 0;
  overflow: hidden;
  isolation: isolate;
}

.hero-sky {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(760px 420px at 76% 8%, rgba(232, 192, 122, 0.14), transparent 66%),
    radial-gradient(900px 520px at 20% 0%, rgba(99, 191, 174, 0.14), transparent 70%);
}

/* 星點 */
.hero-sky::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.2px 1.2px at 27% 9%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.6px 1.6px at 44% 22%, rgba(255, 240, 210, 0.7), transparent),
    radial-gradient(1.2px 1.2px at 62% 12%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 78% 26%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.2px 1.2px at 91% 14%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.3px 1.3px at 8% 42%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.3px 1.3px at 70% 46%, rgba(255, 255, 255, 0.35), transparent);
  animation: twinkle 7s ease-in-out infinite alternate;
}

/* 明月（放在導覽列下方、狀態卡上方的空檔，避免被頁首切掉） */
.hero-moon {
  position: absolute;
  z-index: -2;
  top: calc(var(--header-h) + 6px);
  right: 7%;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #fff8e4 0%, #f4dcae 42%, #e0bd80 70%, #c9a063 100%);
  box-shadow:
    0 0 44px rgba(240, 214, 160, 0.3),
    0 0 110px rgba(240, 214, 160, 0.16),
    inset -8px -10px 20px rgba(150, 116, 62, 0.25);
  opacity: 0.9;
}

.hero-moon::after {
  content: "";
  position: absolute;
  inset: -40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 214, 160, 0.12), transparent 62%);
}

.hero-mountains {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  width: 100%;
  pointer-events: none;
  color: #050a10;
}

.hero-mountains svg {
  display: block;
  width: 100%;
  height: auto;
}

.hero-inner {
  position: relative;
  z-index: 3;
  padding-bottom: 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3rem;
  align-items: end;
}

.hero-title {
  font-size: clamp(3.1rem, 8.2vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: 0.1em;
  margin: 0 0 0.5rem;
  color: transparent;
  background: linear-gradient(170deg, #fffdf6 4%, #f7e6bd 34%, #e8c07a 62%, #b98f45 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 6px 24px rgba(232, 192, 122, 0.24));
  text-indent: 0.1em;
}

.hero-sub {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--serif);
  font-size: clamp(0.95rem, 1.7vw, 1.18rem);
  letter-spacing: 0.34em;
  color: var(--jade-soft);
  margin: 0 0 1.5rem;
}

.hero-sub::before {
  content: "";
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--jade));
  flex: none;
}

.hero-copy {
  max-width: 46ch;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 2;
  margin-bottom: 1.9rem;
}

.hero-copy strong {
  color: var(--gold-soft);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}

/* 首頁 IP 區 */
.hero-ip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--r-md);
  border: 1px dashed rgba(99, 191, 174, 0.3);
  background: rgba(6, 12, 18, 0.55);
  max-width: 100%;
  width: fit-content;
}

.hero-ip .lbl {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--dim);
  text-transform: uppercase;
}

.hero-ip code {
  font-size: 1.02rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-soft);
  letter-spacing: 0.06em;
  font-weight: 700;
}

.hero-ip .hint {
  font-size: 0.76rem;
  color: var(--dim);
}

/* 主視覺右側狀態卡 */
.hero-side {
  position: relative;
  padding: 1.5rem 1.6rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(18, 30, 42, 0.86), rgba(8, 14, 21, 0.9));
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
}

.hero-side::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, rgba(232, 192, 122, 0.5), transparent 40%, rgba(99, 191, 174, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(214, 180, 120, 0.14);
}

.hero-side-head h2 {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--dim);
  margin: 0;
  font-family: var(--sans);
  font-weight: 600;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.status-line .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
  flex: none;
}

.status-line .dot.is-on {
  background: #58e0a8;
  box-shadow: 0 0 10px rgba(88, 224, 168, 0.9);
  animation: pulse 2.6s ease-in-out infinite;
}

.status-line .dot.is-off {
  background: var(--seal);
  box-shadow: 0 0 10px rgba(196, 81, 63, 0.7);
}

.status-line.is-on {
  color: #9df0cf;
}

.status-line.is-off {
  color: #f1b3a8;
}

.status-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0 0 1rem;
}

.metric {
  padding: 0.72rem 0.85rem;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric .k {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--dim);
  margin-bottom: 0.2rem;
}

.metric .v {
  font-family: var(--mono);
  font-size: 1.16rem;
  font-weight: 700;
  color: var(--gold-soft);
  line-height: 1.3;
}

.metric .v small {
  font-size: 0.72rem;
  color: var(--dim);
  font-weight: 400;
}

.status-motd {
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--muted);
  padding: 0.7rem 0.8rem;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(120, 190, 200, 0.12);
  margin-bottom: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 6.4em;
  overflow: hidden;
}

.hero-side-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.74rem;
  color: var(--dim);
}

.status-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.status-refresh:hover {
  color: var(--gold-soft);
  border-color: var(--line-strong);
}

.status-refresh svg {
  width: 12px;
  height: 12px;
}

.status-refresh.is-loading svg {
  animation: spin 1s linear infinite;
}

/* =========================================================================
   首頁：狀態帶 / 入口卡 / 公告
   ========================================================================= */
.status-strip {
  position: relative;
  z-index: 3;
  margin-top: -1.4rem;
  padding-bottom: 1rem;
}

.status-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(8, 14, 21, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.strip-cell {
  padding: 1.1rem 1.3rem;
  border-right: 1px solid rgba(214, 180, 120, 0.1);
}

.strip-cell:last-child {
  border-right: 0;
}

.strip-cell .k {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin-bottom: 0.24rem;
  text-transform: uppercase;
}

.strip-cell .v {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: #eef4f8;
  font-weight: 600;
}

.strip-cell .v em {
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  margin-left: 0.35rem;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.9rem 1.7rem 1.7rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(20, 32, 45, 0.75), rgba(9, 15, 22, 0.86));
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  color: var(--text);
}

.entry-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -70% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 191, 174, 0.14), transparent 68%);
  transition: opacity 0.3s var(--ease);
  opacity: 0;
}

.entry-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  color: var(--text);
}

.entry-card:hover::after {
  opacity: 1;
}

.entry-card .ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(232, 192, 122, 0.28);
  background: rgba(232, 192, 122, 0.08);
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.entry-card .ico svg {
  width: 22px;
  height: 22px;
}

.entry-card h3 {
  font-size: 1.28rem;
  margin: 0;
  letter-spacing: 0.06em;
  color: #f6f1e4;
}

.entry-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--muted);
}

.entry-card .go {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.9rem;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--jade);
  font-weight: 600;
}

.entry-card .go svg {
  width: 14px;
  height: 14px;
  transition: transform 0.28s var(--ease);
}

.entry-card:hover .go svg {
  transform: translateX(4px);
}

/* 公告列表（首頁精簡版） */
.news-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-item {
  margin: 0;
}

.news-item > a {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 1.2rem;
  padding: 1.05rem 1.3rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(214, 180, 120, 0.12);
  background: rgba(10, 16, 24, 0.6);
  color: var(--text);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

.news-item > a:hover {
  border-color: var(--line-strong);
  background: rgba(16, 26, 36, 0.85);
  transform: translateX(3px);
  color: var(--text);
}

.news-item time {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--dim);
  letter-spacing: 0.04em;
}

.news-item .t {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: #eef3f7;
  letter-spacing: 0.03em;
}

.news-item .a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.news-item .a svg {
  width: 14px;
  height: 14px;
  color: var(--dim);
}

/* =========================================================================
   內頁頁首
   ========================================================================= */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + 4rem) 0 3.2rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(214, 180, 120, 0.1);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(680px 320px at 82% 0%, rgba(232, 192, 122, 0.1), transparent 68%),
    radial-gradient(720px 380px at 10% 10%, rgba(99, 191, 174, 0.1), transparent 70%);
}

.page-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(5, 9, 14, 0.35));
  pointer-events: none;
}

.page-hero-inner {
  max-width: 860px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--dim);
  margin-bottom: 1.1rem;
  letter-spacing: 0.06em;
  flex-wrap: wrap;
}

.crumbs a {
  color: var(--muted);
}

.crumbs a:hover {
  color: var(--gold-soft);
}

.crumbs svg {
  width: 10px;
  height: 10px;
  opacity: 0.6;
}

.page-hero h1 {
  font-size: clamp(2.05rem, 5vw, 3.1rem);
  letter-spacing: 0.14em;
  margin-bottom: 0.6rem;
  color: #fbf7ee;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.page-hero .lede {
  max-width: 62ch;
  font-size: 0.98rem;
  color: var(--muted);
  margin: 0;
}

.page-hero .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.3rem;
}

/* =========================================================================
   內容元件
   ========================================================================= */
.prose {
  max-width: 74ch;
  margin-inline: auto;
}

/* 有側欄目錄時，正文吃滿欄寬，表格才不會被擠壓 */
.with-toc .prose {
  max-width: none;
  margin-inline: 0;
}

.prose h2 {
  font-size: 1.55rem;
  margin-top: 2.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(214, 180, 120, 0.12);
  letter-spacing: 0.06em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 1.16rem;
  margin-top: 2rem;
  color: var(--gold-soft);
  letter-spacing: 0.05em;
}

.prose h4 {
  font-size: 1rem;
  margin-top: 1.5rem;
  color: var(--jade-soft);
}

.prose ul,
.prose ol {
  color: var(--text-soft);
}

.prose li::marker {
  color: var(--gold-deep);
}

.prose blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.3rem;
  border-left: 2px solid var(--gold-deep);
  background: rgba(232, 192, 122, 0.05);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--text-soft);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

/* 卡片網格 */
.grid {
  display: grid;
  gap: 1.1rem;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  padding: 1.5rem 1.5rem 1.4rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(214, 180, 120, 0.13);
  background: rgba(11, 18, 26, 0.62);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.card:hover {
  border-color: rgba(214, 180, 120, 0.28);
  background: rgba(15, 24, 34, 0.78);
}

.card h3 {
  font-size: 1.06rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--muted);
}

.card p + p {
  margin-top: 0.6rem;
}

.card .card-k {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--jade);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

/* 表格 */
.table-wrap {
  margin: 1.4rem 0;
  border: 1px solid rgba(214, 180, 120, 0.14);
  border-radius: var(--r-md);
  background: rgba(8, 14, 21, 0.55);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 480px;
}

caption {
  caption-side: top;
  text-align: left;
  padding: 0.85rem 1rem 0.2rem;
  font-size: 0.8rem;
  color: var(--dim);
  letter-spacing: 0.08em;
}

thead th {
  padding: 0.78rem 1rem;
  text-align: left;
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-soft);
  background: rgba(232, 192, 122, 0.055);
  border-bottom: 1px solid rgba(214, 180, 120, 0.2);
  white-space: nowrap;
  vertical-align: bottom;
}

tbody td {
  padding: 0.72rem 1rem;
  border-bottom: 1px solid rgba(214, 180, 120, 0.075);
  color: var(--text-soft);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: rgba(99, 191, 174, 0.045);
}

tbody th {
  padding: 0.72rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #eef3f7;
  border-bottom: 1px solid rgba(214, 180, 120, 0.075);
  font-family: var(--sans);
}

td code,
th code {
  white-space: nowrap;
}

td.num,
th.num {
  font-family: var(--mono);
  text-align: right;
  white-space: nowrap;
}

.table-note {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: var(--dim);
}

/* 步驟 */
.steps {
  counter-reset: step;
  display: grid;
  gap: 0.9rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.steps > li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 1.15rem 1.3rem 1.15rem 3.9rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(214, 180, 120, 0.13);
  background: rgba(10, 17, 25, 0.6);
}

.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 1.15rem;
  top: 1.05rem;
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.85;
  letter-spacing: 0.04em;
}

.steps > li::after {
  content: "";
  position: absolute;
  left: 1.72rem;
  top: 2.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(180deg, rgba(232, 192, 122, 0.25), transparent);
}

.steps > li:last-child::after {
  display: none;
}

.steps > li > strong {
  display: block;
  color: #f4f7fa;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  letter-spacing: 0.03em;
}

.steps > li p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
}

/* FAQ */
.faq {
  display: grid;
  gap: 0.65rem;
  margin: 1.4rem 0;
}

.faq details {
  border: 1px solid rgba(214, 180, 120, 0.14);
  border-radius: var(--r-md);
  background: rgba(10, 17, 25, 0.6);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.faq details[open] {
  border-color: rgba(232, 192, 122, 0.3);
  background: rgba(14, 23, 33, 0.8);
}

.faq summary {
  cursor: pointer;
  padding: 1rem 2.8rem 1rem 1.25rem;
  font-size: 0.96rem;
  color: #eef3f7;
  position: relative;
  list-style: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s var(--ease);
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq .faq-body {
  padding: 0 1.25rem 1.15rem;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.9;
}

.faq .faq-body p:last-child {
  margin-bottom: 0;
}

/* 分頁 tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.6rem;
  padding: 0;
  list-style: none;
}

.tabs button {
  padding: 0.5rem 1.15rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: rgba(10, 17, 25, 0.6);
  border: 1px solid rgba(214, 180, 120, 0.16);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.22s var(--ease);
}

.tabs button:hover {
  color: var(--gold-soft);
  border-color: var(--line-strong);
}

.tabs button[aria-selected="true"] {
  color: #171008;
  background: linear-gradient(135deg, #f2d79f, #d9a94c);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(217, 169, 76, 0.25);
}

/* 側欄目錄 */
.with-toc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 3rem;
  align-items: start;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  padding: 1.2rem 1.1rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(214, 180, 120, 0.14);
  background: rgba(9, 15, 22, 0.72);
  backdrop-filter: blur(8px);
}

.toc h2 {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--dim);
  margin: 0 0 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.1rem;
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 0.34rem 0.55rem;
  font-size: 0.83rem;
  color: var(--muted);
  border-radius: var(--r-sm);
  border-left: 1px solid transparent;
  transition: all 0.2s var(--ease);
}

.toc a:hover,
.toc a.is-active {
  color: var(--gold-soft);
  background: rgba(232, 192, 122, 0.07);
  border-left-color: var(--gold);
}

.toc a .n {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--dim);
  margin-right: 0.4rem;
}

/* 分類色塊（境界 / 仙階） */
.badge-tier {
  display: inline-block;
  min-width: 2.6rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

.tier-1 { color: #a8c0d0; background: rgba(168, 192, 208, 0.12); }
.tier-2 { color: #8fd6c6; background: rgba(143, 214, 198, 0.13); }
.tier-3 { color: #f0d9a0; background: rgba(240, 217, 160, 0.13); }
.tier-4 { color: #f3b58f; background: rgba(243, 181, 143, 0.13); }
.tier-5 { color: #d7a0f5; background: rgba(215, 160, 245, 0.13); }

/* 示範資料提示 */
.demo-note {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin: 1.6rem 0;
  padding: 1rem 1.2rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(232, 192, 122, 0.3);
  background: linear-gradient(100deg, rgba(232, 192, 122, 0.09), rgba(232, 192, 122, 0.03));
}

.demo-note .ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(232, 192, 122, 0.16);
  color: var(--gold);
  margin-top: 0.15rem;
}

.demo-note .ico svg {
  width: 15px;
  height: 15px;
}

.demo-note div > strong {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--gold-soft);
  margin-bottom: 0.18rem;
  font-weight: 700;
}

.demo-note p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--muted);
}

.demo-note a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 頁內提示 / 警告 */
.callout {
  display: flex;
  gap: 0.85rem;
  margin: 1.4rem 0;
  padding: 1rem 1.15rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(99, 191, 174, 0.28);
  background: rgba(99, 191, 174, 0.06);
  font-size: 0.9rem;
  color: var(--text-soft);
}

.callout svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 0.28rem;
  color: var(--jade);
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 0.4rem;
}

.callout--warn {
  border-color: rgba(196, 81, 63, 0.35);
  background: rgba(196, 81, 63, 0.08);
}

.callout--warn svg {
  color: #e78e7d;
}

/* 首頁 hero 內的小圖示列 */
.feature-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
  color: var(--muted);
}

.feature-inline li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.feature-inline svg {
  width: 14px;
  height: 14px;
  color: var(--jade);
  flex: none;
}

/* 模擬畫面（連線示意圖） */
.mock {
  border-radius: var(--r-md);
  border: 1px solid rgba(214, 180, 120, 0.2);
  background: #0d1117;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: #151b23;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mock-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #37414d;
  display: block;
}

.mock-bar span {
  margin-left: 0.5rem;
  color: #5e6b7a;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.mock-body {
  padding: 0.9rem;
  display: grid;
  gap: 0.55rem;
}

.mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  border-radius: 5px;
  background: #11161d;
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #b8c4d0;
}

.mock-row.is-active {
  background: #1b2531;
  border-color: rgba(232, 192, 122, 0.35);
  color: #f0e3c8;
}

.mock-row .sub {
  display: block;
  font-size: 0.68rem;
  color: #66727f;
  letter-spacing: 0.04em;
}

.mock-row .bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  flex: none;
}

.mock-row .bars i {
  width: 3px;
  display: block;
  background: #4a5563;
  border-radius: 1px;
}

.mock-row.is-active .bars i {
  background: #6fdcb0;
}

.mock-row .bars i:nth-child(1) { height: 5px; }
.mock-row .bars i:nth-child(2) { height: 8px; }
.mock-row .bars i:nth-child(3) { height: 11px; }
.mock-row .bars i:nth-child(4) { height: 14px; }
.mock-row .bars i:nth-child(5) { height: 17px; }

/* 快捷指令複製格 */
.cmd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.5rem;
  margin: 1.2rem 0;
}

.cmd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(99, 191, 174, 0.2);
  background: rgba(99, 191, 174, 0.05);
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--jade-soft);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-align: left;
}

.cmd:hover {
  border-color: rgba(99, 191, 174, 0.45);
  background: rgba(99, 191, 174, 0.12);
}

.cmd span.ico {
  color: var(--dim);
  font-size: 0.7rem;
  flex: none;
}

/* 分類篩選（指令表） */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.filter-row button {
  padding: 0.36rem 0.95rem;
  font-size: 0.8rem;
  font-family: var(--sans);
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(214, 180, 120, 0.15);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.filter-row button:hover {
  color: var(--gold-soft);
}

.filter-row button[aria-pressed="true"] {
  color: var(--gold-soft);
  border-color: rgba(232, 192, 122, 0.5);
  background: rgba(232, 192, 122, 0.12);
}

/* =========================================================================
   排行榜
   ========================================================================= */
.rank-board {
  border: 1px solid rgba(214, 180, 120, 0.16);
  border-radius: var(--r-lg);
  background: rgba(8, 14, 21, 0.6);
  overflow: hidden;
}

.rank-row {
  display: grid;
  grid-template-columns: 56px 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.72rem 1.2rem;
  border-bottom: 1px solid rgba(214, 180, 120, 0.075);
  transition: background 0.2s var(--ease);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  background: rgba(99, 191, 174, 0.05);
}

.rank-row.is-head {
  background: rgba(232, 192, 122, 0.06);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--dim);
  text-transform: uppercase;
}

.rank-row.is-head:hover {
  background: rgba(232, 192, 122, 0.06);
}

.rank-no {
  font-family: var(--mono);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: 0.04em;
}

.rank-row:nth-child(2) .rank-no { color: #f7e6bd; }
.rank-row:nth-child(3) .rank-no { color: #dfe6ec; }
.rank-row:nth-child(4) .rank-no { color: #e0b28c; }

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-family: var(--serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: #0c131c;
  image-rendering: pixelated;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 -8px 14px rgba(0, 0, 0, 0.18);
  flex: none;
  letter-spacing: 0;
}

.rank-name {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex-wrap: wrap;
}

.rank-name .n {
  font-size: 0.96rem;
  color: #eef3f7;
  letter-spacing: 0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-name .g {
  font-size: 0.72rem;
  color: var(--dim);
  letter-spacing: 0.06em;
}

.rank-val {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--gold-soft);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.rank-val small {
  font-size: 0.72rem;
  color: var(--dim);
  margin-left: 0.25rem;
  font-weight: 400;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--dim);
}

/* =========================================================================
   仙玉閣
   ========================================================================= */
.store-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 191, 174, 0.35);
  background: rgba(99, 191, 174, 0.08);
  color: var(--jade-soft);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.cart-pill:hover {
  background: rgba(99, 191, 174, 0.16);
  color: #dff8f1;
}

.cart-pill svg {
  width: 15px;
  height: 15px;
}

.cart-pill .count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #171008;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 1.1rem;
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.35rem 1.35rem 1.25rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(214, 180, 120, 0.15);
  background: linear-gradient(165deg, rgba(17, 27, 38, 0.8), rgba(9, 15, 22, 0.88));
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  overflow: hidden;
}

.product:hover {
  border-color: rgba(232, 192, 122, 0.34);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product.is-featured {
  border-color: rgba(232, 192, 122, 0.4);
}

.product .ribbon {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: #171008;
  background: linear-gradient(135deg, #f2d79f, #d9a94c);
  box-shadow: 0 0 14px rgba(217, 169, 76, 0.3);
}

.product h3 {
  font-size: 1.1rem;
  margin: 0;
  letter-spacing: 0.05em;
  color: #f6f1e4;
}

.product .p-cat {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--jade);
  text-transform: uppercase;
}

.product .desc {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
  flex: 1;
}

.product .price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem 0;
  border-top: 1px dashed rgba(214, 180, 120, 0.16);
  margin-top: 0.2rem;
}

.product .price {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-soft);
  letter-spacing: 0.02em;
}

.product .price small {
  font-size: 0.72rem;
  color: var(--dim);
  font-weight: 400;
  margin-left: 0.12rem;
}

.product .equiv {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--dim);
  white-space: nowrap;
}

.product .btn {
  padding: 0.6rem 1rem;
  font-size: 0.86rem;
}

/* 購物車面板 */
.cart-panel {
  border: 1px solid rgba(214, 180, 120, 0.18);
  border-radius: var(--r-lg);
  background: rgba(8, 14, 21, 0.7);
  overflow: hidden;
  margin-top: 2.4rem;
}

.cart-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid rgba(214, 180, 120, 0.12);
  background: rgba(232, 192, 122, 0.045);
}

.cart-panel-head h2 {
  font-size: 1.05rem;
  margin: 0;
  letter-spacing: 0.08em;
}

.cart-lines {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid rgba(214, 180, 120, 0.075);
  margin: 0;
}

.cart-line:last-child {
  border-bottom: 0;
}

.cart-line .nm {
  font-size: 0.94rem;
  color: #eef3f7;
}

.cart-line .nm small {
  display: block;
  font-size: 0.74rem;
  color: var(--dim);
  letter-spacing: 0.04em;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(214, 180, 120, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.qty button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.qty button:hover {
  background: rgba(232, 192, 122, 0.14);
  color: var(--gold-soft);
}

.qty span {
  min-width: 26px;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: #eef3f7;
}

.cart-line .amt {
  font-family: var(--mono);
  font-size: 0.94rem;
  color: var(--gold-soft);
  min-width: 78px;
  text-align: right;
}

.cart-line .del {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.18s var(--ease);
}

.cart-line .del:hover {
  background: rgba(196, 81, 63, 0.16);
  color: #f1b3a8;
}

.cart-line .del svg {
  width: 13px;
  height: 13px;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-top: 1px solid rgba(214, 180, 120, 0.14);
  background: rgba(232, 192, 122, 0.035);
  flex-wrap: wrap;
}

.cart-total .lab {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.cart-total .sum {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-soft);
}

.cart-empty {
  padding: 2.6rem 1.4rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.cart-empty svg {
  width: 34px;
  height: 34px;
  margin: 0 auto 0.8rem;
  color: var(--dim);
  opacity: 0.7;
  display: block;
}

/* =========================================================================
   會員 / 結帳 / 結果
   ========================================================================= */
.auth-panel {
  max-width: 520px;
  margin: 0 auto;
  padding: 2.2rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(18, 29, 41, 0.9), rgba(8, 14, 21, 0.92));
  box-shadow: var(--shadow-md);
  text-align: center;
}

.auth-panel h2 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.auth-panel > p {
  color: var(--muted);
  font-size: 0.9rem;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.85rem 1rem;
  margin: 1.5rem 0 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #f8f9fa;
  color: #202124;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.btn-google:hover {
  background: #fff;
  box-shadow: 0 8px 26px rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
  color: #202124;
}

.btn-google svg {
  width: 18px;
  height: 18px;
}

.auth-note {
  font-size: 0.8rem;
  color: var(--dim);
  line-height: 1.8;
  margin: 0;
}

.kv-list {
  display: grid;
  gap: 0;
  margin: 1.4rem 0;
  border-top: 1px solid rgba(214, 180, 120, 0.12);
}

.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.2rem;
  border-bottom: 1px solid rgba(214, 180, 120, 0.1);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.kv dt {
  color: var(--muted);
  letter-spacing: 0.04em;
  margin: 0;
}

.kv dd {
  margin: 0;
  color: #eef3f7;
  font-family: var(--mono);
  font-size: 0.88rem;
  text-align: right;
}

.kv dd.em {
  font-family: var(--sans);
  color: var(--gold-soft);
}

.bind-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.2rem 0;
  padding: 1rem;
  border-radius: var(--r-md);
  border: 1px dashed rgba(232, 192, 122, 0.4);
  background: rgba(232, 192, 122, 0.06);
  font-family: var(--mono);
  font-size: 1.5rem;
  letter-spacing: 0.28em;
  color: var(--gold-soft);
  font-weight: 700;
}

.order-table td:first-child {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.16rem 0.62rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.s-wait {
  color: #f0cf8a;
  background: rgba(240, 207, 138, 0.12);
}

.s-paid {
  color: #8fd6c6;
  background: rgba(143, 214, 198, 0.13);
}

.s-done {
  color: #9df0cf;
  background: rgba(157, 240, 207, 0.13);
}

.s-fail {
  color: #f1b3a8;
  background: rgba(241, 179, 168, 0.13);
}

/* 結帳：兩欄 */
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr);
  gap: 2.4rem;
  align-items: start;
}

.pay-methods {
  display: grid;
  gap: 0.6rem;
  margin: 0.4rem 0 1.4rem;
}

.pay-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(214, 180, 120, 0.16);
  background: rgba(10, 17, 25, 0.6);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-size: 0.9rem;
}

.pay-opt:hover {
  border-color: var(--line-strong);
}

.pay-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pay-opt .radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--dim);
  flex: none;
  display: grid;
  place-items: center;
  transition: all 0.2s var(--ease);
}

.pay-opt input:checked + .radio {
  border-color: var(--gold);
}

.pay-opt input:checked + .radio::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.pay-opt input:checked ~ .pm-text {
  color: var(--gold-soft);
}

.pay-opt input:focus-visible + .radio {
  outline: 2px solid var(--jade);
  outline-offset: 3px;
}

.pay-opt .pm-text strong {
  display: block;
  font-size: 0.92rem;
  color: #eef3f7;
  font-weight: 600;
}

.pay-opt .pm-text small {
  font-size: 0.78rem;
  color: var(--dim);
}

.sticky-summary {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 1.5rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(11, 18, 26, 0.8);
  backdrop-filter: blur(10px);
}

.summary-lines {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.summary-lines li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-soft);
  margin: 0;
}

.summary-lines li span:last-child {
  font-family: var(--mono);
  color: var(--gold-soft);
  white-space: nowrap;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(214, 180, 120, 0.16);
  margin-bottom: 1.2rem;
}

.summary-total span:first-child {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.summary-total span:last-child {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-soft);
}

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.1rem;
  cursor: pointer;
}

.check-line input {
  margin-top: 0.35rem;
  accent-color: #d9a94c;
  width: 15px;
  height: 15px;
  flex: none;
}

.check-line a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 結果頁 */
.result-hero {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  padding: 2.6rem 2rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(18, 29, 41, 0.9), rgba(8, 14, 21, 0.92));
  box-shadow: var(--shadow-md);
}

.result-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 192, 122, 0.35);
  background: rgba(232, 192, 122, 0.1);
  color: var(--gold);
}

.result-icon svg {
  width: 28px;
  height: 28px;
}

.result-hero h1,
.result-hero h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.1em;
}

.result-hero > p {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 44ch;
  margin: 0 auto 1.4rem;
}

/* =========================================================================
   頁尾
   ========================================================================= */
.site-footer {
  position: relative;
  z-index: 2;
  margin-top: 3rem;
  padding: 3.4rem 0 1.6rem;
  border-top: 1px solid rgba(214, 180, 120, 0.14);
  background: linear-gradient(180deg, rgba(5, 9, 14, 0.4), rgba(4, 7, 11, 0.9));
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 2.4rem;
  margin-bottom: 2.6rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.footer-brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  image-rendering: pixelated;
}

.footer-brand strong {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  color: var(--gold-soft);
}

.footer-about p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.85;
  max-width: 34ch;
}

.footer-col h3 {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--dim);
  margin-bottom: 0.9rem;
  text-transform: uppercase;
  font-weight: 700;
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.footer-col li {
  margin: 0;
}

.footer-col a {
  font-size: 0.87rem;
  color: var(--text-soft);
}

.footer-col a:hover {
  color: var(--gold-soft);
}

.footer-ip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--jade-soft);
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(99, 191, 174, 0.24);
  background: rgba(99, 191, 174, 0.06);
  cursor: pointer;
}

.footer-ip:hover {
  border-color: rgba(99, 191, 174, 0.5);
  color: #dff8f1;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--dim);
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom .disclaimer {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-bottom .disclaimer svg {
  width: 13px;
  height: 13px;
  color: var(--dim);
  flex: none;
}

/* =========================================================================
   提示（Toast）
   ========================================================================= */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 300;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  pointer-events: none;
  width: min(92vw, 440px);
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 191, 174, 0.4);
  background: rgba(9, 18, 24, 0.96);
  backdrop-filter: blur(10px);
  color: #dff8f1;
  font-size: 0.87rem;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.28s var(--ease);
  max-width: 100%;
}

.toast.is-out {
  animation: toast-out 0.3s var(--ease) forwards;
}

.toast svg {
  width: 14px;
  height: 14px;
  color: var(--jade);
  flex: none;
}

.toast--warn {
  border-color: rgba(232, 192, 122, 0.45);
  color: var(--gold-soft);
}

.toast--warn svg {
  color: var(--gold);
}

/* =========================================================================
   動畫
   ========================================================================= */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.42; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes twinkle {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px); }
}

@keyframes drift {
  from { transform: translateX(-2%); }
  to { transform: translateX(2%); }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================================
   響應式
   ========================================================================= */
@media (max-width: 1180px) {
  .nav a {
    padding: 0.5rem 0.52rem;
    font-size: 0.83rem;
  }
  .with-toc {
    grid-template-columns: 1fr;
  }
  .toc {
    position: static;
    order: -1;
    margin-bottom: 1.6rem;
  }
  .toc ul {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    display: grid;
  }
}

@media (max-width: 1024px) {
  :root {
    --header-h: 64px;
  }

  .nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-store-mobile {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #171008;
    background: linear-gradient(135deg, #f2d79f, #d9a94c);
    border-radius: 999px;
    white-space: nowrap;
  }

  .nav-store-mobile:hover {
    color: #171008;
  }

  .header-actions {
    margin-left: auto;
  }

  .header-actions .ip-capsule {
    display: none;
  }

  .mobile-ipbar {
    display: block;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 98;
    background: rgba(6, 11, 17, 0.94);
    border-bottom: 1px solid rgba(214, 180, 120, 0.14);
    backdrop-filter: blur(10px);
  }

  .mobile-ipbar-inner {
    width: min(100% - 2rem, 1320px);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.45rem 0;
    font-size: 0.78rem;
  }

  .mobile-ipbar .ip-txt {
    font-family: var(--mono);
    color: var(--jade-soft);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    letter-spacing: 0.02em;
  }

  .mobile-ipbar .ip-txt .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dim);
    flex: none;
  }

  .mobile-ipbar .ip-txt .dot.is-on {
    background: #58e0a8;
    box-shadow: 0 0 8px rgba(88, 224, 168, 0.9);
    animation: pulse 2.6s ease-in-out infinite;
  }

  .mobile-ipbar .ip-txt .dot.is-off {
    background: var(--seal);
  }

  .mobile-ipbar .cp {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(99, 191, 174, 0.35);
    background: rgba(99, 191, 174, 0.08);
    color: var(--jade-soft);
    font-size: 0.74rem;
    cursor: pointer;
  }

  .hero {
    padding-top: calc(var(--header-h) + 3.4rem);
  }

  .mobile-ipbar ~ * .hero,
  body.has-ipbar .hero {
    padding-top: calc(var(--header-h) + 6.2rem);
  }

  .page-hero {
    padding-top: calc(var(--header-h) + 4.6rem);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .hero-moon {
    width: 84px;
    height: 84px;
    right: 12%;
    top: 5%;
    opacity: 0.75;
  }

  .status-strip-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .strip-cell:nth-child(2) {
    border-right: 0;
  }

  .strip-cell:nth-child(1),
  .strip-cell:nth-child(2) {
    border-bottom: 1px solid rgba(214, 180, 120, 0.1);
  }

  .entry-grid,
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .sticky-summary {
    position: static;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
    line-height: 1.8;
  }

  .wrap {
    width: min(100% - 1.8rem, var(--wrap));
  }

  .section {
    padding: 3rem 0;
  }

  .hero-title {
    letter-spacing: 0.08em;
  }

  .hero-sub {
    letter-spacing: 0.22em;
    font-size: 0.9rem;
  }

  .brand-text em {
    display: none;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand-text strong {
    font-size: 1rem;
    letter-spacing: 0.1em;
  }

  .header-inner {
    width: calc(100% - 1.4rem);
    gap: 0.55rem;
  }

  .entry-grid,
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .news-item > a {
    grid-template-columns: 1fr auto;
    gap: 0.4rem 0.9rem;
    padding: 0.95rem 1.05rem;
  }

  .news-item time {
    grid-column: 1 / -1;
    font-size: 0.72rem;
  }

  .news-item .t {
    font-size: 0.95rem;
  }

  .rank-row {
    grid-template-columns: 42px 32px minmax(0, 1fr) auto;
    gap: 0.6rem;
    padding: 0.7rem 0.85rem;
  }

  .rank-row.is-head {
    font-size: 0.64rem;
    letter-spacing: 0.08em;
  }

  .avatar {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
    border-radius: 6px;
  }

  .rank-val {
    font-size: 0.9rem;
  }

  .rank-name .g {
    display: none;
  }

  .cart-line {
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
  }

  .cart-line .amt {
    text-align: right;
  }

  .cart-line .del {
    position: absolute;
    right: 0.4rem;
    top: 0.4rem;
  }

  .cart-line {
    position: relative;
  }

  .cart-panel-head,
  .cart-total {
    padding: 0.9rem 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .steps > li {
    padding: 1rem 1.1rem 1rem 3.2rem;
  }

  .steps > li::before {
    left: 0.95rem;
  }

  .steps > li::after {
    left: 1.5rem;
  }

  .table-wrap {
    margin-inline: -0.9rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  table {
    font-size: 0.85rem;
    min-width: 0;
  }

  /* 欄位標題與首欄不拆字，表格太寬時由外框橫向捲動 */
  thead th,
  tbody th {
    white-space: nowrap;
  }

  thead th,
  tbody td,
  tbody th {
    padding: 0.62rem 0.8rem;
  }

  .auth-panel {
    padding: 1.6rem 1.3rem;
  }

  .result-hero {
    padding: 2rem 1.3rem;
  }

  .bind-code {
    font-size: 1.2rem;
    letter-spacing: 0.18em;
  }

  .sticky-summary {
    padding: 1.2rem;
  }

  .divider-orn {
    margin: 2.2rem 0;
  }

  .hero-ip {
    width: 100%;
  }
}

/* =========================================================================
   補充元件（表單、步驟條、境界格、投票卡、綁定徽章）
   ========================================================================= */

/* hidden 一律不顯示，避免被 display:flex/grid 蓋掉 */
[hidden] {
  display: none !important;
}

/* 行內圖示的保險尺寸（各處仍有專屬規則覆寫） */
.ii {
  width: 1em;
  height: 1em;
  flex: none;
}

/* 表格不會把 grid 欄位撐開 */
.with-toc > * {
  min-width: 0;
}

.prose > .table-wrap {
  max-width: 100%;
}

.tabs li {
  margin: 0;
}

.tabs button {
  line-height: 1.4;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* 表單欄位 */
.field {
  margin: 0 0 1rem;
}

.field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--dim);
  margin-bottom: 0.4rem;
}

.field input {
  width: 100%;
  padding: 0.68rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.95rem;
  color: #eef3f7;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(214, 180, 120, 0.22);
  border-radius: var(--r-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field input::placeholder {
  color: #64747f;
}

.field input:focus {
  outline: none;
  border-color: rgba(99, 191, 174, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 191, 174, 0.12);
}

/* 抽屜底部 */
.drawer-extra {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.drawer-extra .ip-capsule {
  justify-content: space-between;
  width: 100%;
  border-radius: var(--r-md);
  padding: 0.7rem 0.9rem;
}

/* 境界格 */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 0.55rem;
  margin: 1.2rem 0 1.6rem;
}

.tier-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(214, 180, 120, 0.14);
  border-left-width: 2px;
  background: rgba(10, 17, 25, 0.55);
}

.tier-item .nm {
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: #f2f6f9;
}

.tier-item .rg {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
  letter-spacing: 0.04em;
}

.tier-item.tier-1 { border-left-color: #6d8ea6; }
.tier-item.tier-2 { border-left-color: var(--jade); }
.tier-item.tier-3 { border-left-color: var(--gold); }
.tier-item.tier-4 { border-left-color: #e8a06a; }
.tier-item.tier-5 { border-left-color: #c58ef0; }

/* 門規條文（比一般步驟緊湊） */
.rule-steps > li {
  padding: 0.85rem 1.1rem 0.85rem 3.4rem;
}

.rule-steps > li::before {
  top: 0.78rem;
}

.rule-steps > li::after {
  top: 1.9rem;
}

.rule-steps > li p {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.8;
}

/* 投票卡 */
.vote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.vote-body strong {
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .vote-grid {
    grid-template-columns: 1fr;
  }
}

.vote-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.15rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(214, 180, 120, 0.16);
  background: linear-gradient(150deg, rgba(17, 27, 38, 0.8), rgba(9, 15, 22, 0.86));
  color: var(--text);
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.vote-card:hover {
  border-color: rgba(232, 192, 122, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--text);
}

.vote-no {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--gold);
  opacity: 0.85;
  flex: none;
}

.vote-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.vote-body strong {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: #f4f7fa;
}

.vote-body small {
  font-size: 0.78rem;
  color: var(--dim);
}

.vote-go {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 191, 174, 0.35);
  background: rgba(99, 191, 174, 0.08);
  color: var(--jade-soft);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
}

.vote-go svg {
  width: 11px;
  height: 11px;
}

/* 綁定角色徽章 */
.ign-badge {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(99, 191, 174, 0.28);
  background: rgba(99, 191, 174, 0.06);
}

.ign-badge .avatar {
  width: 46px;
  height: 46px;
  font-size: 1.15rem;
  border-radius: 10px;
}

.acc-ign-text {
  display: grid;
  gap: 0.05rem;
  line-height: 1.4;
}

.acc-ign-text strong {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: #f6f9fb;
}

.acc-ign-text small {
  font-size: 0.78rem;
}

/* 付款進度條 */
.stepper {
  display: flex;
  gap: 0;
  margin: 1.4rem 0 1.6rem;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.stepper li {
  position: relative;
  flex: 1;
  margin: 0;
  padding-top: 1.55rem;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.stepper li::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  z-index: 1;
}

.stepper li::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.stepper li:last-child::after {
  display: none;
}

.stepper li.is-done {
  color: var(--jade-soft);
}

.stepper li.is-done::before {
  background: var(--jade);
  border-color: var(--jade);
  box-shadow: 0 0 10px rgba(99, 191, 174, 0.6);
}

.stepper li.is-done::after {
  background: rgba(99, 191, 174, 0.4);
}

.stepper li.is-now {
  color: var(--gold-soft);
  font-weight: 700;
}

.stepper li.is-now::before {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(232, 192, 122, 0.7);
}

/* 側欄裡的公告列表 */
.toc .news-list {
  gap: 0.4rem;
}

.toc .news-item > a {
  display: block;
  padding: 0.6rem 0.7rem;
  border-radius: var(--r-sm);
}

.toc .news-item time {
  display: block;
  font-size: 0.7rem;
  margin-bottom: 0.1rem;
}

.toc .news-item .t {
  font-size: 0.86rem;
  line-height: 1.5;
  display: block;
}

.toc .news-item .a {
  display: none;
}

/* 金額、數量不要換行 */
.metric .v {
  overflow-wrap: anywhere;
}

/* 表格首欄不換行（處罰等級這類短標籤） */
.no-wrap-first tbody th {
  white-space: nowrap;
}

/* 山脈底部淡出，和下一段背景接得順 */
.hero-mountains::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(8, 13, 20, 0) 0%, rgba(8, 13, 20, 0.55) 55%, #080d14 100%);
  pointer-events: none;
}

@media (max-width: 1024px) {
  .header-actions .btn-login {
    display: none;
  }

  .page-hero {
    padding-top: calc(var(--header-h) + 5.8rem);
  }

  .hero {
    padding-top: calc(var(--header-h) + 6rem);
  }

  .hero-moon {
    top: calc(var(--header-h) + 4px);
    right: 8%;
    width: 62px;
    height: 62px;
    opacity: 0.7;
  }
}

/* 沒有 page-hero 的頁面（例如 404）要自己讓開固定導覽列 */
.section--first {
  padding-top: calc(var(--header-h) + 4.5rem);
}

@media (max-width: 1024px) {
  .section--first {
    padding-top: calc(var(--header-h) + 6.5rem);
  }
}

@media (max-width: 720px) {
  .vote-card {
    padding: 0.95rem 1rem;
  }

  .stepper li {
    font-size: 0.72rem;
  }

  .tier-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  }

  .page-hero {
    padding-top: calc(var(--header-h) + 5.4rem);
  }

  /* 太窄的話標語的裝飾線會擠到第二行 */
  .eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    gap: 0.4rem;
  }

  .eyebrow::before {
    width: 16px;
  }

  .eyebrow::after {
    display: none;
  }

  .metric .v {
    font-size: 0.88rem;
  }

  .metric .v small {
    font-size: 0.66rem;
  }

  .hero-moon {
    display: none;
  }

  /* 標籤與數值在窄畫面改上下排，避免數值被擠到下一行靠右 */
  .kv {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.7rem 0.1rem;
  }

  .kv dd {
    text-align: left;
    font-size: 0.82rem;
    line-height: 1.6;
  }
}

@media print {
  .site-header,
  .site-footer,
  .drawer,
  .mobile-ipbar,
  .toast-stack {
    display: none !important;
  }
  body {
    background: #fff;
    color: #111;
  }
  a {
    color: #0b4d8f;
  }
}
