/* ============================================================
   Refractnest v19 — 明亮中樞 · Pollinations 粉彩像素
   Bright, friendly "Generative-AI Hub / Control Tower":
   one request enters the tower, gets dispatched across the
   connected generative-AI channels. Pastel sky, cream paper
   cards, hard offset shadows, pixel clouds/grass/mascot. Playful.
   Deliberately bright & cute — opposite of v18's dark RPG.
   ============================================================ */

/* ---------- pixel fonts (繁中像素字 + 清楚內文) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700;900&family=Press+Start+2P&display=swap');
/* Zpix — 繁體中文像素字,解決中文沒像素的問題(中英文統一像素感) */
@font-face {
  font-family: 'Zpix';
  src: url('https://cdn.jsdelivr.net/gh/SolidZORO/zpix-pixel-font/dist/Zpix.ttf') format('truetype');
  font-display: swap;
}

:root {
  /* ---- pastel sky / paper base ---- */
  --sky-top:    #bfe3ff;   /* soft pastel blue sky */
  --sky-mid:    #d9f0ff;
  --sky-low:    #fdf3e3;   /* warm horizon */
  --paper:      #fdf6ea;   /* cream paper card */
  --paper-2:    #fbeedd;
  --paper-line: #efe2cc;

  --ink:        #3b2f4a;   /* friendly dark plum (text, borders) */
  --ink-soft:   #6c6080;
  --ink-faint:  #9a8fae;

  /* ---- candy pastel palette (channels / accents) ---- */
  --c-pink:   #ff9ec7;
  --c-peach:  #ffb38a;
  --c-yellow: #ffd96b;
  --c-mint:   #8fe3b8;
  --c-sky:    #7cc6ff;
  --c-lilac:  #c4a7ff;
  --c-coral:  #ff7e8f;

  /* solid borders for each accent (slightly deeper) */
  --c-pink-d:   #d96aa0;
  --c-peach-d:  #d98552;
  --c-yellow-d: #d9a72e;
  --c-mint-d:   #4fb583;
  --c-sky-d:    #3f93d9;
  --c-lilac-d:  #8f6fe0;

  --ok:   #4fb583;   /* healthy */
  --warn: #e8923c;   /* degraded */

  --radius: 0px;     /* pixel = sharp */
  --sh-hard: 4px 4px 0 var(--ink);
  --sh-pop:  6px 6px 0 var(--ink);
  --sh-sm:   3px 3px 0 var(--ink);

  /* 標題 / 英數重點:歐美像素字 + Zpix 中文像素字補上中文 */
  --font-head:  'Press Start 2P', 'Zpix', monospace;
  /* UI / 按鈕 / 標籤:Zpix 像素字(中英文統一像素感,夠大夠清楚) */
  --font-pixel: 'Zpix', 'Press Start 2P', monospace;
  /* 內文段落:乾淨圓體,中文好讀(裝在像素殼裡的清楚內文) */
  --font-body:  'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ---------- a11y focus ---------- */
:focus-visible { outline: 3px solid var(--c-coral); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 200;
  background: var(--c-yellow); color: var(--ink);
  font-family: var(--font-pixel); font-size: 15px; font-weight: 700; letter-spacing: 1px;
  padding: 8px 14px; border: 3px solid var(--ink);
  text-decoration: none; transition: top .15s; box-shadow: var(--sh-sm);
}
.skip-link:focus { top: 8px; }

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

body {
  font-family: var(--font-body);
  /* 像素雲天當底:藍色(透明 .section)區塊會透出雲天;.alt 奶油/hero/CTA 蓋住不受影響 */
  background:
    url("../images/bg-clouds.jpg") center center / cover fixed,
    var(--sky-mid);
  color: var(--ink);
  font-size: 15px;        /* 內文基準放大,中文舒服 */
  line-height: 1.75;      /* 行距加寬,好讀 */
  font-weight: 500;
  min-height: 100vh;
  overflow-x: hidden;
}
/* 只讓像素美術(圖、SVG)維持硬邊;真正的內文用 webfont 保持清楚 */
img, svg, .hero-scene, .hub-beam { image-rendering: pixelated; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }
.center { text-align: center; }
.mt  { margin-top: 12px; }
.mt-lg { margin-top: 28px; }
.muted { color: var(--ink-soft); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.blink { animation: blink 1s steps(2,start) infinite; }
@keyframes blink { to { opacity: 0; } }

/* candy rainbow strip (pastel, not neon) */
.rainbow-strip {
  height: 6px;
  background: repeating-linear-gradient(90deg,
    var(--c-coral) 0 14px, var(--c-peach) 14px 28px, var(--c-yellow) 28px 42px,
    var(--c-mint) 42px 56px, var(--c-sky) 56px 70px, var(--c-lilac) 70px 84px);
  position: relative; z-index: 5;
}

/* ============================================================
   NAV — clean cream control bar
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 18px;
}
.logo {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 700;
  letter-spacing: 1px; color: var(--ink);
  text-decoration: none; font-size: 16px;
}
.logo .gem {
  width: 16px; height: 16px; flex: none;
  background: conic-gradient(from 45deg, var(--c-coral), var(--c-yellow),
    var(--c-mint), var(--c-sky), var(--c-lilac), var(--c-coral));
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.nav-links { display: flex; gap: 6px; margin-left: 14px; }
.nav-links a {
  font-family: var(--font-pixel);
  color: var(--ink-soft); text-decoration: none;
  font-size: 15px; font-weight: 700; letter-spacing: .5px;
  padding: 5px 11px;
  border: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); border-color: var(--ink); background: var(--paper-2); }
.nav-links a.active {
  color: var(--ink); background: var(--c-yellow);
  border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink);
}
.nav-right { margin-left: auto; display: flex; gap: 8px; }

.nav-toggle {
  display: none; margin-left: auto;
  background: var(--paper-2); color: var(--ink);
  border: 3px solid var(--ink); cursor: pointer;
  font-family: var(--font-pixel); font-size: 18px; font-weight: 700;
  padding: 7px 14px; line-height: 1;
}
.nav-toggle:hover { border-color: var(--c-sky-d); }

/* ============================================================
   BUTTONS (chunky pixel, candy)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font-pixel); font-size: 17px; font-weight: 700;
  padding: 10px 18px; border: 3px solid var(--ink);
  background: var(--paper); color: var(--ink);
  text-decoration: none; cursor: pointer;
  box-shadow: var(--sh-hard);
  transition: transform .05s, box-shadow .05s;
  text-transform: uppercase; letter-spacing: .5px;
  border-radius: var(--radius);
}
.btn:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled, .btn[disabled] {
  opacity: .5; cursor: not-allowed; filter: grayscale(.4);
  transform: none; box-shadow: var(--sh-hard);
}
.btn-sm { padding: 7px 12px; font-size: 14px; box-shadow: var(--sh-sm); }
.btn-lg { padding: 15px 26px; font-size: 20px; }
.btn-yellow { background: var(--c-yellow); color: var(--ink); }
.btn-pink   { background: var(--c-pink);   color: var(--ink); }
.btn-mint   { background: var(--c-mint);   color: var(--ink); }
.btn-sky    { background: var(--c-sky);    color: var(--ink); }
.btn-ghost  { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: var(--c-sky); }

/* ============================================================
   SPEECH BUBBLE — friendly mascot dialogue (signature)
   ============================================================ */
.dialogue {
  display: flex; gap: 0;
  background: #fff;
  border: 4px solid var(--ink);
  box-shadow: var(--sh-pop);
  margin: 0 auto;
}
.dlg-avatar {
  flex: none; width: 92px;
  background: var(--sky-mid);
  border-right: 4px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
}
.dlg-avatar svg { width: 64px; height: 64px; }
.dlg-body { padding: 14px 18px; flex: 1; min-width: 0; }
.dlg-name {
  font-family: var(--font-pixel); font-size: 15px; font-weight: 700;
  color: var(--c-lilac-d); letter-spacing: 1px;
  margin-bottom: 8px;
}
.dlg-name::before { content: "▎"; color: var(--c-mint-d); }
.dlg-text { font-size: 16px; color: var(--ink); line-height: 1.8; }
.dlg-text b { color: var(--c-sky-d); }
.dlg-cursor {
  display: inline-block; margin-left: 4px;
  color: var(--c-lilac-d); animation: blink 1s steps(2) infinite;
}

/* ============================================================
   HERO — bright pixel scene + control-tower concept
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  min-height: 540px;
  display: flex; align-items: center;
  border-bottom: 4px solid var(--ink);
}
.hero-scene {
  position: absolute; inset: 0;
  min-height: 520px;
  /* 真正用上像素場景圖:cover + pixelated。圖本身已有天空/雲/草丘/塔台/光束,
     上面只疊一層「為了文字可讀」的柔化壓暗(中央較暗、頂底再加重一點)。 */
  background:
    radial-gradient(120% 80% at 50% 42%, rgba(30,22,46,.46) 0%, rgba(30,22,46,.20) 45%, transparent 78%),
    linear-gradient(180deg, rgba(30,22,46,.22) 0%, transparent 30%, transparent 62%, rgba(30,22,46,.34) 100%),
    url("../images/bg-pixel.jpg") center / cover no-repeat,
    var(--sky-mid);   /* 圖載入前的淡色 fallback */
  image-rendering: pixelated;
  overflow: hidden;
}
/* 像素場景圖已自帶太陽 / 雲 / 草丘 / 塔台 / 光束,
   原本疊在上面的 CSS 裝飾會打架,改為隱藏,讓真正的美術乾淨呈現。 */
.hero-sun, .hero-cloud, .hero-grass, .hero-tower { display: none !important; }

/* pixel sun (soft, friendly) */
.hero-sun {
  position: absolute; top: 34px; right: 9%;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--c-yellow);
  box-shadow: 0 0 0 6px rgba(255,217,107,.35), 0 0 28px rgba(255,217,107,.6);
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(255,217,107,.25), 0 0 34px rgba(255,217,107,.55); } }
/* fluffy pixel clouds */
.hero-cloud {
  position: absolute; background: #fff;
  box-shadow:
    14px 0 0 #fff, 28px 0 0 #fff, -14px 0 0 rgba(255,255,255,.9),
    0 -10px 0 #fff, 14px -10px 0 #fff;
  border-radius: 4px;
}
.hero-cloud.c1 { top: 48px; left: 12%; width: 20px; height: 14px; animation: drift 30s linear infinite; }
.hero-cloud.c2 { top: 96px; left: 64%; width: 16px; height: 12px; animation: drift 44s linear infinite; }
@keyframes drift { from { transform: translateX(-20px); } to { transform: translateX(70px); } }

/* pixel grass strip along the bottom */
.hero-grass {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
  background:
    repeating-linear-gradient(90deg, var(--c-mint) 0 6px, #7ad6a6 6px 12px);
  border-top: 3px solid var(--c-mint-d);
  box-shadow: inset 0 4px 0 rgba(255,255,255,.25);
}
.hero-grass::before {
  content: ""; position: absolute; top: -6px; left: 0; right: 0; height: 6px;
  background: repeating-linear-gradient(90deg,
    var(--c-mint) 0 4px, transparent 4px 8px, var(--c-mint) 8px 12px, transparent 12px 16px);
}

/* the control tower mascot standing on the grass */
.hero-tower {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  width: 64px; height: 72px;
  animation: bob 1.6s steps(2) infinite;
  filter: drop-shadow(3px 3px 0 rgba(59,47,74,.25));
}
@keyframes bob { 50% { transform: translateX(-50%) translateY(-4px); } }
.hero-tower svg { width: 100%; height: 100%; }

.hero-overlay {
  position: relative; z-index: 3;
  width: 100%;
  max-width: 1120px; margin: 0 auto;
  padding: 64px 20px 72px;
  text-align: center;
}
.hero-kicker {
  display: inline-block;
  font-family: var(--font-pixel); font-size: 15px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--ink); background: var(--c-yellow);
  border: 3px solid var(--ink); box-shadow: var(--sh-sm);
  padding: 7px 14px; margin-bottom: 20px;
}
.hero-title {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(30px, 6vw, 58px); line-height: 1.22;
  color: #fff; letter-spacing: 1px;
  text-shadow: 4px 4px 0 var(--ink), 0 0 18px rgba(0,0,0,.35);
}
.hero-title .glow {
  color: var(--c-yellow);
  text-shadow: 4px 4px 0 var(--ink), 0 0 18px rgba(0,0,0,.35);
}
.hero-tease {
  color: #fff; font-size: 18px; font-weight: 600; line-height: 1.8;
  margin: 20px auto 0; max-width: 600px;
  text-shadow: 1px 1px 0 var(--ink), 0 2px 8px rgba(30,22,46,.55);
}

/* stats row */
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin: 22px auto 0; max-width: 720px;
}
.hero-stat {
  background: rgba(255,255,255,.96); border: 3px solid var(--ink); box-shadow: var(--sh-sm);
  padding: 10px 16px; min-width: 128px;
}
.hero-stat b {
  display: block; font-family: var(--font-head); font-size: 22px; color: var(--c-lilac-d);
}
.hero-stat span { font-size: 14px; font-weight: 600; color: var(--ink-soft); letter-spacing: .5px; }

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 52px 0; position: relative; z-index: 1; }
.section.alt { background: var(--paper); border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); }
.section-title {
  font-family: var(--font-head); font-size: clamp(22px, 3.5vw, 32px);
  color: var(--ink); letter-spacing: 1px; line-height: 1.4; text-align: center;
  text-shadow: 0 0 8px rgba(253,246,234,.95), 0 2px 0 rgba(253,246,234,.85);
}
.section-title::before { content: "✦ "; color: var(--c-pink-d); }
.section-title::after  { content: " ✦"; color: var(--c-pink-d); }
.section-sub { color: var(--ink); text-align: center; margin-top: 14px; font-size: 16px; font-weight: 600; line-height: 1.8; max-width: 660px; margin-left: auto; margin-right: auto; text-shadow: 0 0 7px rgba(253,246,234,.96), 0 1px 2px rgba(253,246,234,.92); }

/* ============================================================
   HUB DISPATCH — "one request → tower → all AIs"
   the strengthened .quest-log dispatch / summoning visual
   ============================================================ */
.hub {
  margin-top: 30px;
  background:
    radial-gradient(120% 90% at 40% 50%, rgba(124,198,255,.18), transparent 60%),
    var(--paper);
  border: 4px solid var(--ink);
  box-shadow: var(--sh-pop);
  padding: 32px 26px;
  position: relative; overflow: hidden;
}
/* soft scanline texture */
.hub::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(59,47,74,.025) 0 1px, transparent 1px 4px);
}
.hub-flow {
  display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center;
  position: relative; z-index: 1;
}
.hub-in { text-align: center; }
.hub-beam {
  height: 16px; width: 100%;
  background: linear-gradient(90deg, transparent 0%, var(--c-sky) 45%, #fff 100%);
  background-size: 220% 100%;
  border: 2px solid var(--c-sky-d);
  box-shadow: 0 0 14px rgba(124,198,255,.7);
  image-rendering: pixelated;
  animation: beamflow 1.6s linear infinite;
}
@keyframes beamflow { from { background-position: 220% 0; } to { background-position: 0 0; } }
.hub-in p { font-family: var(--font-pixel); font-size: 16px; font-weight: 700; color: var(--ink-soft); margin-top: 12px; letter-spacing: .5px; }

/* the tower hub core (pixel exchange / control tower) */
.hub-core {
  width: 124px; height: 124px; margin: 0 auto; justify-self: center;
  position: relative;
  animation: hubfloat 2.6s ease-in-out infinite;   /* 不旋轉,改輕微浮動 */
  filter: drop-shadow(0 0 14px rgba(124,198,255,.45)) drop-shadow(0 5px 0 rgba(59,47,74,.25));
}
@keyframes hubfloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.hub-core svg { width: 100%; height: 100%; }
/* dispatch fan of pastel beams toward the channels */
.hub-core::after {
  display: none;   /* 不射出光束扇 */
  content: ""; position: absolute; top: 50%; left: 100%;
  width: 90px; height: 130px; transform: translateY(-50%);
  background:
    linear-gradient(10deg,  transparent 45%, var(--c-coral) 45% 50%, transparent 50%),
    linear-gradient(3deg,   transparent 47%, var(--c-yellow) 47% 51%, transparent 51%),
    linear-gradient(-3deg,  transparent 47%, var(--c-mint) 47% 51%, transparent 51%),
    linear-gradient(-10deg, transparent 50%, var(--c-lilac) 50% 55%, transparent 55%);
  opacity: .65; pointer-events: none;
  animation: fanpulse 1.6s ease-in-out infinite;
}
@keyframes fanpulse { 0%,100% { opacity: .4; } 50% { opacity: .8; } }

.hub-out { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .hub-out { grid-template-columns: 1fr; } }
.channel {
  font-size: 17px; font-weight: 700; font-family: var(--font-pixel);
  padding: 13px 15px; border: 3px solid currentColor; border-left-width: 8px;
  background: #fff;
  box-shadow: var(--sh-sm);
  display: flex; align-items: center; gap: 10px;
  opacity: .25; transform: translateX(-6px);
  animation: chon .5s steps(3) forwards;
  transition: transform .15s, box-shadow .15s;
}
.channel::before { content: "\25C6"; font-size: 10px; line-height: 1; }
.channel .ch-name { color: var(--ink); }
.channel .ch-tag { margin-left: auto; font-size: 13px; color: var(--ink-soft); }
@keyframes chon { to { opacity: 1; transform: translateX(0); } }
.channel:hover { transform: translateX(5px); box-shadow: -4px 0 0 currentColor, var(--sh-sm); }
.channel.ch1 { color: var(--c-pink-d);  animation-delay: .15s; }
.channel.ch2 { color: var(--c-mint-d);  animation-delay: .35s; }
.channel.ch3 { color: var(--c-sky-d);   animation-delay: .55s; }
.channel.ch4 { color: var(--c-lilac-d); animation-delay: .75s; opacity: .65; animation: none; transform: none; }   /* 紫;未開放仍微降透明 */

/* ============================================================
   HOW IT WORKS — 3 steps
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.step {
  background: #fff; border: 4px solid var(--ink); box-shadow: var(--sh-hard);
  padding: 22px 18px; position: relative;
}
.step .num {
  position: absolute; top: -16px; left: 16px;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 15px; color: var(--ink);
  background: var(--c-yellow); border: 3px solid var(--ink);
}
.step h3 { font-family: var(--font-pixel); font-weight: 700; font-size: 20px; letter-spacing: .5px; color: var(--ink); margin-top: 8px; }
.step p { font-size: 15px; color: var(--ink-soft); line-height: 1.75; margin-top: 10px; }

/* ============================================================
   FEATURES / connected AIs — Pollinations-style cards
   ============================================================ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.feature {
  background: var(--paper); border: 4px solid var(--ink); box-shadow: var(--sh-hard);
  padding: 20px;
  transition: transform .1s, box-shadow .1s;
}
.feature:hover { transform: translate(-2px,-2px); box-shadow: var(--sh-pop); }
.feature .ico {
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; border: 3px solid var(--ink); margin-bottom: 12px;
}
.feature h3 { font-family: var(--font-pixel); font-weight: 700; font-size: 20px; letter-spacing: .5px; color: var(--ink); }
.feature p { font-size: 15px; color: var(--ink-soft); line-height: 1.75; margin-top: 10px; }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  text-align: center; padding: 46px 24px;
  /* 亮色像素場景圖(塔台)+ 淡奶油罩幕,深字仍可讀,與 hero 首尾呼應 */
  background:
    linear-gradient(rgba(253,246,234,.58), rgba(253,246,234,.40)),
    url("../images/cta-scene.jpg") center / cover no-repeat;
  image-rendering: pixelated;
  border: 4px solid var(--ink); box-shadow: var(--sh-pop);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  position: relative; overflow: hidden;
}
.cta-band h2 { font-family: var(--font-head); font-size: clamp(20px,3vw,28px); line-height: 1.5; color: var(--ink); letter-spacing: 1px; margin: 0; }
.cta-band p { font-size: 16px; line-height: 1.8; }

/* ============================================================
   FOOTER — multi-column control-tower footer
   ============================================================ */
.footer {
  border-top: 4px solid var(--ink);
  background: var(--paper);
  padding: 40px 0 0; margin-top: 0;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 30px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.8; color: var(--ink-soft); max-width: 320px; }
.footer-social { display: flex; gap: 8px; margin-top: 14px; }
.footer-social a {
  width: 34px; height: 34px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; text-decoration: none; color: var(--ink);
  background: #fff; border: 3px solid var(--ink); box-shadow: var(--sh-sm);
}
.footer-social a:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.footer-col h4 {
  font-family: var(--font-pixel); font-weight: 700; font-size: 15px;
  color: var(--ink); letter-spacing: 1px; margin-bottom: 12px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a {
  font-size: 14px; font-weight: 600; color: var(--ink-soft); text-decoration: none;
}
.footer-col a:hover { color: var(--c-sky-d); text-decoration: underline; }
.footer-bottom {
  border-top: 3px solid var(--ink);
  padding: 16px 0 22px;
  text-align: center;
}
.footer-bottom p { font-size: 13px; line-height: 1.7; color: var(--ink-soft); }
.footer-bottom .logo { display: none; }

@media (max-width: 860px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 22px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr; }
}

/* ============================================================
   MODELS — channel tabs + channel cards
   ============================================================ */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 24px; }
.tab {
  font-family: var(--font-pixel); font-size: 16px; font-weight: 700;
  padding: 9px 16px; border: 3px solid var(--ink);
  background: #fff; color: var(--ink-soft); cursor: pointer; box-shadow: var(--sh-sm);
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--c-yellow); color: var(--ink); }

.tab-panel { display: none; margin-top: 30px; }
.tab-panel.active { display: block; }

.ch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.ch-card {
  background: var(--paper); border: 4px solid var(--ink); box-shadow: var(--sh-hard);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .1s, box-shadow .1s;
}
.ch-card:hover { transform: translate(-2px,-2px); box-shadow: var(--sh-pop); }
.ch-card-top {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-bottom: 3px solid var(--ink);
  background: #fff;
}
.ch-icon {
  flex: none; width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--ink); font-size: 24px;
}
.ch-card-head { min-width: 0; }
.ch-slug { font-family: var(--font-pixel); font-weight: 700; font-size: 22px; color: var(--ink); letter-spacing: 1px; }
.ch-modal { font-size: 13px; font-weight: 600; color: var(--c-sky-d); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }
.ch-card-body { padding: 16px; flex: 1; }
.ch-desc { font-size: 15px; line-height: 1.75; color: var(--ink-soft); }
.ch-card-foot {
  padding: 14px 16px; border-top: 3px solid var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ch-price { font-family: var(--font-pixel); font-weight: 700; font-size: 18px; color: var(--c-lilac-d); }
.badge {
  font-family: var(--font-pixel); font-size: 13px; font-weight: 700; padding: 5px 9px;
  border: 2px solid var(--ink);
}
.badge.healthy  { background: var(--c-mint);   color: var(--ink); }
.badge.degraded { background: var(--c-peach);  color: var(--ink); }

.coming-soon {
  text-align: center; padding: 56px 20px;
  background: var(--paper); border: 4px dashed var(--ink);
}
.coming-soon .lock { font-size: 44px; }
.coming-soon h3 { font-family: var(--font-pixel); font-weight: 700; font-size: 22px; color: var(--ink); margin-top: 14px; letter-spacing: 1px; }
.coming-soon p { font-size: 15px; line-height: 1.75; color: var(--ink-soft); margin-top: 10px; }

/* ============================================================
   PRICING — plan cards (chests) + buckets + cost table
   ============================================================ */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; align-items: stretch; }
.plan {
  background: var(--paper); border: 4px solid var(--ink); box-shadow: var(--sh-hard);
  display: flex; flex-direction: column; position: relative;
}
.plan.featured { box-shadow: 0 0 0 3px var(--c-yellow), var(--sh-pop); }
.plan-ribbon {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  background: var(--c-yellow); color: var(--ink);
  font-family: var(--font-pixel); font-size: 14px; font-weight: 700; padding: 5px 14px;
  border: 3px solid var(--ink); letter-spacing: 1px; white-space: nowrap;
}
.plan-head { text-align: center; padding: 26px 16px 16px; border-bottom: 3px solid var(--ink); background: #fff; }
.plan-icon { font-size: 42px; }
.plan-name { font-family: var(--font-pixel); font-weight: 700; font-size: 22px; color: var(--ink); margin-top: 10px; letter-spacing: 1px; }
.plan-price { font-family: var(--font-head); font-size: 30px; font-weight: 700; color: var(--c-lilac-d); margin-top: 14px; letter-spacing: 0; line-height: 1.15; }
.plan-price .per { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.plan-prisms { font-size: 16px; font-weight: 700; color: var(--c-sky-d); margin-top: 6px; }
.plan-body { padding: 18px 18px 8px; flex: 1; }
.plan-body ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.plan-body li { font-size: 15px; line-height: 1.6; color: var(--ink-soft); display: flex; gap: 8px; }
.plan-body li::before { content: "▸"; color: var(--c-mint-d); flex: none; }
.plan-foot { padding: 16px 18px 20px; }
.plan-foot .btn { width: 100%; }

.bucket-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.bucket { background: #fff; border: 4px solid var(--ink); box-shadow: var(--sh-hard); padding: 18px; }
.bucket h4 { font-family: var(--font-pixel); font-weight: 700; font-size: 19px; color: var(--ink); letter-spacing: 1px; margin-top: 8px; }
.bucket .tag { display: inline-block; font-family: var(--font-pixel); font-size: 13px; font-weight: 700; padding: 4px 10px; border: 2px solid var(--ink); }
.bucket .tag.expire { background: var(--c-peach); color: var(--ink); }
.bucket .tag.keep   { background: var(--c-mint);  color: var(--ink); }
.bucket p { font-size: 15px; line-height: 1.75; color: var(--ink-soft); margin-top: 10px; }

.cost-table {
  width: 100%; min-width: 520px; border-collapse: collapse; margin-top: 20px;
  background: var(--paper); border: 4px solid var(--ink); box-shadow: var(--sh-hard);
}
.cost-table th, .cost-table td {
  padding: 13px 15px; text-align: left; font-size: 15px; line-height: 1.6;
  border-bottom: 2px solid var(--paper-line);
}
.cost-table th {
  font-family: var(--font-pixel); font-size: 14px; font-weight: 700; color: var(--ink);
  background: #fff; letter-spacing: 1px;
}
.cost-table td .px-cost { font-family: var(--font-pixel); font-weight: 700; color: var(--c-lilac-d); }
.cost-table tr:last-child td { border-bottom: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .features, .plan-grid, .ch-grid, .steps { grid-template-columns: 1fr; }
  .bucket-row { grid-template-columns: 1fr; }
  .hub-flow { grid-template-columns: 1fr; }
  .hub-core::after { display: none; }

  .nav-toggle { display: inline-flex; }
  .nav-right { display: none; }
  .nav-links {
    display: none;            /* 手機預設收合,點漢堡(.open)才展開 */
    order: 3; flex-basis: 100%; flex-direction: column; gap: 4px;
    margin: 10px 0 4px;
  }
  .nav-inner.open .nav-links { display: flex; }
  .nav-links a { font-size: 17px; padding: 11px 14px; }
  .nav-inner.open .nav-right {
    display: flex; order: 4; flex-basis: 100%; gap: 8px; margin-top: 6px;
  }
  .nav-inner.open .nav-right .btn { flex: 1; }
}
@media (max-width: 860px) {
  /* 手機:hero 不要太高,文案/CTA 縮排舒服 */
  .hero { min-height: 460px; }
  .hero-scene { min-height: 460px; }
  .hero-overlay { padding: 48px 18px 56px; }
}
@media (max-width: 520px) {
  .dialogue { flex-direction: column; }
  .dlg-avatar { width: 100%; border-right: none; border-bottom: 4px solid var(--ink); }
  .hero-cta .btn { width: 100%; }
  .hero-stat { flex: 1; min-width: 0; }
  .hero-tease { font-size: 16px; }
  .btn-lg { font-size: 17px; padding: 13px 20px; }
  .hero { min-height: 420px; }
  .hero-scene { min-height: 420px; }
}

/* ============================================================
   v19.2 — 優化補充(中英字級平衡 / page-banner / 像素圖示 /
   複製鈕 / 精簡對話框 / 響應式補點)
   附在檔尾,不改既有規則,降低對其他頁面的副作用。
   ============================================================ */

/* ---- (3) 標題中英字級平衡 ----
   問題:.section-title 用 Press Start 2P,Latin 字比 Zpix 中文大一截,
   像「API 快速上手」英文壓過中文。解法:內頁區塊標題改 Zpix 為主字體
   (中英同一套像素字、同一字級),整行平衡;Press Start 2P 留給 hero / logo。 */
.section-title {
  font-family: var(--font-pixel);          /* Zpix 優先,中英一致 */
  font-size: clamp(21px, 3.2vw, 29px);
  letter-spacing: .5px;
  line-height: 1.5;
}
/* hero 主標維持 Press Start 2P 的招牌大字感,但讓中文(Zpix)接近英文體量 */
.hero-title { font-size: clamp(28px, 5.4vw, 52px); line-height: 1.3; }
/* 區塊副標 / 對話框 / 卡片標題:沿用 Zpix,字級已一致,僅微調行高 */
.step h3, .feature h3, .ch-slug, .plan-name, .bucket h4 { line-height: 1.4; }

/* ---- 像素圖示通用 ---- */
.pix { display: block; image-rendering: pixelated; }
.feature .ico .pix,
.ch-icon .pix,
.plan-icon .pix { display: block; }

/* (4)(5) 方案 / model 卡圖示:用像素 SVG,放進像素方框,質感拉齊 */
.plan-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; margin: 0 auto;
  border: 3px solid var(--ink); background: var(--c-lilac);
  box-shadow: var(--sh-sm);
}
.plan-icon.acc-trial   { background: var(--c-pink); }
.plan-icon.acc-starter { background: var(--c-yellow); }
.plan-icon.acc-pro     { background: var(--c-sky); }
/* feature 區圖示置中 */
.feature .ico { padding: 0; }
.feature .ico .pix { width: 26px; height: 26px; }
/* model 卡:像素頭像 / 圖示置中,去除 emoji 行高跳動 */
.ch-icon { padding: 0; overflow: hidden; }
.ch-icon .pix { width: 30px; height: 30px; }
/* 健康徽章用像素點(取代 🟢🟡 emoji),維持像素感 */
.badge .pix, .px-status .pix { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; margin-right: 4px; }
.px-status { display: inline-flex; align-items: center; font-weight: 700; }

/* ---- (6) 內頁輕量 page-banner(取代「◆大標題◆ + sub + 對話框」三件套) ---- */
.page-banner {
  background: var(--paper);
  border-bottom: 4px solid var(--ink);
  padding: 30px 0 26px;
  position: relative; z-index: 1;
}
.page-banner .wrap { display: flex; align-items: center; gap: 16px; }
.page-banner .pb-mascot {
  flex: none; width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--ink); background: var(--sky-mid); box-shadow: var(--sh-sm);
}
.page-banner .pb-mascot svg { width: 38px; height: 38px; }
.page-banner .pb-text { min-width: 0; }
.page-banner h1 {
  font-family: var(--font-pixel); font-size: clamp(22px, 3.4vw, 30px);
  color: var(--ink); letter-spacing: .5px; line-height: 1.4;
}
.page-banner h1::before { content: "◆ "; color: var(--c-pink-d); }
.page-banner .pb-sub {
  font-size: 15px; font-weight: 600; color: var(--ink-soft);
  line-height: 1.7; margin-top: 6px; max-width: 760px;
}
@media (max-width: 520px) {
  .page-banner { padding: 22px 0 20px; }
  .page-banner .pb-mascot { width: 46px; height: 46px; }
  .page-banner .pb-mascot svg { width: 30px; height: 30px; }
}

/* ---- (7) code block 複製鈕 + 醒目 code 卡 ---- */
.code-card {
  position: relative;
  background: var(--ink); color: var(--paper);
  border: 3px solid var(--ink); box-shadow: var(--sh-hard);
  padding: 16px 18px; margin-top: 18px; overflow-x: auto;
}
.code-card pre { margin: 0; white-space: pre; }
.code-card code {
  font-family: var(--font-pixel), monospace; font-size: 14px; line-height: 1.7;
  color: #fdf6ea; background: none; padding: 0;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 18px;
}
.code-head .code-label {
  font-family: var(--font-pixel); font-weight: 700; font-size: 15px;
  letter-spacing: .5px; color: var(--ink);
}
.btn-copy {
  font-family: var(--font-pixel); font-size: 13px; font-weight: 700;
  letter-spacing: .5px; color: var(--ink); cursor: pointer;
  background: var(--c-mint); border: 3px solid var(--ink); box-shadow: var(--sh-sm);
  padding: 6px 12px; line-height: 1; white-space: nowrap;
}
.btn-copy:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.btn-copy:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-copy.copied { background: var(--c-yellow); }

/* ---- (8) 響應式補點 ---- */
/* 6 模態 tabs:窄螢幕可橫向捲(不換行擠成多列),維持單列好點 */
@media (max-width: 860px) {
  .tabs {
    flex-wrap: nowrap; justify-content: flex-start;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .tab { flex: 0 0 auto; white-space: nowrap; }
  .page-banner .wrap { gap: 12px; }
}
/* model 卡 2→1 欄已在既有 860 斷點處理;這裡補 hub stats / dialogue 窄螢幕 */
@media (max-width: 520px) {
  .hero-stats { gap: 8px; }
  .hero-stat { min-width: calc(50% - 4px); padding: 8px 10px; }
  .hero-stat b { font-size: 18px; }
  .code-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .btn-copy { width: 100%; }
}

/* ============================================================
   v19.3 — 首頁互動「丟一句話 → 看中樞假分派」
   (純前端,本版皮:雲天粉彩 + 像素硬框;JS 在 js/site.js)
   ============================================================ */
/* 輸入列:prompt + 丟給中樞 */
.hub-try {
  display: flex; gap: 10px; margin-top: 22px;
  max-width: 620px;
}
.hub-input {
  flex: 1; min-width: 0;
  font-family: var(--font-body); font-size: 16px; color: var(--ink);
  background: #fff; border: 3px solid var(--ink); box-shadow: var(--sh-sm);
  padding: 12px 14px; line-height: 1.2;
}
.hub-input:focus { outline: none; border-color: var(--c-sky-d); box-shadow: 3px 3px 0 var(--c-sky-d); }
.hub-go { flex: none; white-space: nowrap; }

/* 中樞發光(分派中) */
.hub-core.dispatching {
  animation: hubfloat 2.6s ease-in-out infinite,
             hubpulse 0.7s ease-in-out infinite;
}
@keyframes hubpulse {
  0%,100% { filter: drop-shadow(0 0 14px rgba(124,198,255,.45)) drop-shadow(0 5px 0 rgba(59,47,74,.25)); }
  50%     { filter: drop-shadow(0 0 22px rgba(255,217,107,.85)) drop-shadow(0 5px 0 rgba(59,47,74,.25)); }
}

/* 通道依序點亮:JS 加 .lit;中標 Image 加 .win */
.channel.lit {
  opacity: 1; transform: translateX(0);
  box-shadow: -4px 0 0 currentColor, var(--sh-sm);
}
.channel.win {
  background: var(--c-yellow);
  box-shadow: -6px 0 0 var(--c-mint-d), var(--sh-pop);
}
.channel.ch4.lit { opacity: 1; }   /* 蓋掉預設半透明 */

/* 假分派結果列 */
.hub-result {
  margin-top: 22px; padding: 16px 18px;
  background: #fff; border: 3px solid var(--ink); box-shadow: var(--sh-hard);
}
.hub-result-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  font-family: var(--font-pixel); font-size: 15px; color: var(--ink);
}
.hub-result-row .hr-k { color: var(--ink-soft); font-size: 13px; margin-right: 4px; }
.hub-result-row b { color: var(--c-lilac-d); letter-spacing: .5px; word-break: break-all; }
.hub-result .hr-status {
  margin-left: auto; font-family: var(--font-pixel); font-size: 13px; font-weight: 700;
  padding: 4px 11px; border: 2px solid var(--ink); white-space: nowrap;
}
.hr-status[data-state="queued"] { background: var(--c-peach); color: var(--ink); }
.hr-status[data-state="done"]   { background: var(--c-mint);  color: var(--ink); }
.hub-result-note { font-size: 13px; line-height: 1.7; color: var(--ink-soft); margin-top: 10px; }

@media (max-width: 520px) {
  .hub-try { flex-direction: column; }
  .hub-go { width: 100%; }
  .hub-result-row .hr-status { margin-left: 0; }
}
