/* =========================================================
   GuDongPet 咕咚桌宠 · 官網樣式
   Material Design 3 語言：圓角 / 色塊拼貼 / tonal palette
   作者：LaswI Studio
   ========================================================= */

/* ---------- 1. 設計 Token ---------- */
:root{
  /* 色板 */
  --coral:      #FF8A65;
  --peach:      #FFAB91;
  --cream:      #FFF8E7;
  --mint:       #81C784;
  --lavender:   #B39DDB;
  --lemon:      #FFD54F;
  --ink:        #2B2430;
  --ink-70:     rgba(43,36,48,.70);
  --ink-45:     rgba(43,36,48,.45);
  --surface:    #FFFBF5;

  /* 圓角（MD3 超大圓角） */
  --r-xs: 16px;
  --r-sm: 24px;
  --r-md: 32px;
  --r-lg: 40px;
  --r-xl: 48px;
  --r-2xl: 64px;
  --r-pill: 999px;

  /* 陰影層級（克制使用，避免疊加過多） */
  --sh-1: 0 2px 6px rgba(43,36,48,.05), 0 8px 22px rgba(43,36,48,.06);
  --sh-2: 0 6px 16px rgba(43,36,48,.08), 0 18px 44px rgba(43,36,48,.10);
  --sh-3: 0 12px 30px rgba(43,36,48,.12), 0 30px 72px rgba(43,36,48,.16);

  /* 動效 */
  --ease: cubic-bezier(.2, 0, 0, 1);
  --dur-1: .25s;
  --dur-2: .32s;
  --dur-3: .55s;

  /* 版面 */
  --pad: clamp(20px, 5vw, 80px);
  --maxw: 1280px;

  /* 由 JS 寫入的視差量（-0.5 ~ 0.5） */
  --mx: 0;
  --my: 0;
}

/* ---------- 2. Reset ---------- */
*,*::before,*::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: "Noto Sans TC", "Noto Sans SC", -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block; }
h1,h2,h3,h4,p,ul,li{ margin: 0; }
ul{ padding: 0; list-style: none; }
a{ color: inherit; text-decoration: none; }
button{ font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
::selection{ background: var(--peach); color: var(--ink); }

.skip-link{
  position: fixed; top: -100px; left: 16px; z-index: 999;
  padding: 12px 20px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--surface);
  transition: top var(--dur-1) var(--ease);
}
.skip-link:focus{ top: 16px; }

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

/* ---------- 3. 排版工具類 ---------- */
.mono{
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-70);
}

.kicker{
  margin-bottom: 18px;
  color: var(--ink-45);
}

/* 巨型鏤空字：background-clip:text */
.stroke-text{
  background-image: linear-gradient(104deg, var(--coral) 0%, var(--lemon) 34%, var(--mint) 62%, var(--lavender) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: .86;
}

.gudong-name{
  font-family: "Fredoka", "Noto Sans TC", sans-serif;
  font-weight: 600;
  letter-spacing: .01em;
}

.huge{
  font-size: clamp(48px, 8.2vw, 132px);
}

.lead{
  max-width: 46ch;
  color: var(--ink-70);
  font-size: clamp(14px, 1.15vw, 17px);
  margin-top: 20px;
}

/* 按鈕：Material 膠囊 + 漣漪 */
.btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--dur-2) var(--ease),
              box-shadow var(--dur-2) var(--ease),
              background-color var(--dur-2) var(--ease);
  will-change: transform;
}
.btn .btn-arrow{
  font-size: 20px;
  transition: transform var(--dur-2) var(--ease);
}
.btn:hover{ transform: translateY(-4px); box-shadow: var(--sh-3); }
.btn:hover .btn-arrow{ transform: translate(3px, -3px); }
.btn:active{ transform: translateY(-1px) scale(.99); }

.btn-primary{ background: var(--cream); color: var(--ink); box-shadow: var(--sh-2); }
.btn-lemon{ background: var(--lemon); color: var(--ink); box-shadow: var(--sh-2); }
.btn-lemon:hover .btn-arrow{ transform: translateY(3px); }
.btn-lg{ padding: 22px 46px; font-size: 18px; }

/* 漣漪 */
.ripple{
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(43,36,48,.14);
  pointer-events: none;
  animation: ripple .62s var(--ease) forwards;
}
@keyframes ripple{
  to{ transform: scale(2.6); opacity: 0; }
}

/* ---------- 4. 導航 ---------- */
.nav{
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 18px var(--pad) 0;
  transition: padding var(--dur-2) var(--ease);
}
.nav-inner{
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 14px 10px 16px;
  border-radius: var(--r-pill);
  background: transparent;
  transition: max-width var(--dur-3) var(--ease),
              background-color var(--dur-2) var(--ease),
              box-shadow var(--dur-2) var(--ease),
              padding var(--dur-2) var(--ease);
}
/* 滾動收合：懸浮圓角膠囊 */
.nav.is-compact{ padding-top: 10px; }
.nav.is-compact .nav-inner{
  max-width: 820px;
  padding: 8px 12px 8px 14px;
  background: rgba(255,251,245,.92);
  box-shadow: var(--sh-2);
}

.brand{ display: flex; align-items: center; gap: 10px; flex: none; }
.brand-logo{ width: 30px; height: 30px; border-radius: 9px; object-fit: contain; }
.brand-word{ font-size: 21px; letter-spacing: -.02em; }

.nav-links{
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav-links a{
  position: relative;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-70);
  transition: color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease);
}
.nav-links a::after{
  content: "";
  position: absolute;
  left: 15px; right: 15px; bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-2) var(--ease);
}
.nav-links a:hover{ color: var(--ink); background: rgba(255,138,101,.13); }
.nav-links a:hover::after{ transform: scaleX(1); }

.nav-right{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* 版本角標 */
.version-chip{
  position: relative;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  background: var(--lemon);
  box-shadow: 0 2px 0 rgba(43,36,48,.10);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.version-chip .version-num{ font-size: 11px; letter-spacing: .12em; color: var(--ink); }
.version-chip:hover,
.version-chip:focus-visible{
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}
.version-pop{
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(300px, 74vw);
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.98);
  transform-origin: top right;
  transition: opacity var(--dur-2) var(--ease),
              transform var(--dur-2) var(--ease),
              visibility var(--dur-2) var(--ease);
}
.version-chip:hover .version-pop,
.version-chip:focus-within .version-pop{
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}
.version-pop h4{
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--ink-45);
  margin-bottom: 10px;
}
.version-pop li{
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-70);
  padding-left: 14px;
  position: relative;
}
.version-pop li::before{
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--coral);
}

/* 語言分段按鈕 */
.lang-seg{
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: rgba(43,36,48,.06);
}
.lang-seg button{
  padding: 7px 13px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-70);
  transition: background-color var(--dur-2) var(--ease),
              color var(--dur-2) var(--ease),
              box-shadow var(--dur-2) var(--ease);
}
.lang-seg button:hover{ color: var(--ink); }
.lang-seg button.is-active{
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-1);
}
.lang-seg .lang-short{ display: none; }

.nav-toggle{
  display: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  place-items: center;
  background: rgba(43,36,48,.06);
  transition: background-color var(--dur-2) var(--ease);
}
.nav-toggle:hover{ background: rgba(43,36,48,.11); }

/* ---------- 5. Hero ---------- */
.hero{
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(88px + 4vh) var(--pad) 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg{
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 78% 12%, #FFD9C7 0%, rgba(255,217,199,0) 58%),
    linear-gradient(152deg, var(--coral) 0%, var(--peach) 46%, #FFC9A8 100%);
}
/* 幾何色塊拼貼（不做毛玻璃，靠半透明疊加做層次） */
.blob{
  position: absolute;
  display: block;
  border-radius: var(--r-2xl);
  transform:
    translate3d(calc(var(--mx) * var(--d, 20) * 1px), calc(var(--my) * var(--d, 20) * 1px), 0)
    rotate(var(--rot, 0deg));
  transition: transform .5s var(--ease);
  will-change: transform;
}
.blob[data-depth]{ --d: 0; }
.blob-a{ width: 42vw; height: 42vw; left: -12vw; top: -8vw; background: rgba(255,248,231,.55); --rot: -12deg; --d: 26; border-radius: 50%; }
.blob-b{ width: 26vw; height: 26vw; right: 6vw; top: 8vh; background: rgba(129,199,132,.34); --rot: 18deg; --d: -18; border-radius: 46% 54% 40% 60% / 52% 44% 56% 48%; }
.blob-c{ width: 30vw; height: 30vw; right: -8vw; bottom: -10vw; background: rgba(179,157,219,.40); --rot: 8deg; --d: 40; border-radius: 50%; }
.blob-d{ width: 18vw; height: 18vw; left: 12vw; bottom: 8vh; background: rgba(255,213,79,.52); --rot: -22deg; --d: -34; border-radius: var(--r-2xl); }
.blob-e{ width: 120px; height: 120px; left: 44vw; top: 6vh; background: rgba(255,248,231,.68); --rot: 0deg; --d: 14; border-radius: 50%; }
.blob-f{ width: 200px; height: 76px; right: 22vw; bottom: 16vh; background: rgba(255,248,231,.42); --rot: -8deg; --d: -22; border-radius: var(--r-pill); }
.hero-glow{
  position: absolute;
  inset: 0;
  background: radial-gradient(44% 46% at 68% 52%, rgba(255,255,255,.52) 0%, rgba(255,255,255,0) 70%);
}
.hero-ring{
  position: absolute;
  border: 1.5px solid rgba(255,248,231,.55);
  border-radius: 50%;
}
.ring-1{ width: 46vw; height: 46vw; right: 4vw; top: 18vh; }
.ring-2{ width: 62vw; height: 62vw; right: -6vw; top: 6vh; border-color: rgba(255,248,231,.3); }

.hero-inner{
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}

.hero-brandline{ display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.hero-logo{ width: 34px; height: 34px; border-radius: 10px; object-fit: contain; background: rgba(255,251,245,.9); padding: 3px; }
.hero-brandword{ font-size: 26px; letter-spacing: -.02em; }

.hero-kicker{ color: rgba(43,36,48,.55); margin-bottom: 10px; }

.hero-title{
  font-size: clamp(88px, 15vw, 232px);
  margin: 0;
}
.hero-en{
  font-size: 13px;
  letter-spacing: .38em;
  color: rgba(43,36,48,.6);
  margin-top: 6px;
}
.hero-tagline{
  margin-top: 22px;
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 500;
  max-width: 24ch;
  line-height: 1.55;
}
.hero-actions{
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 38px;
}
.hero-meta{ color: rgba(43,36,48,.6); }

.hero-stage{
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(56vh, 520px);
}
.gudong-slot{ position: relative; }
.gudong-slot svg{ display: block; width: 100%; height: auto; overflow: visible; }

/* 咕咚本體動效：呼吸 + 彈跳（純 CSS keyframes） */
.gudong-main{
  width: clamp(240px, 30vw, 400px);
  animation: breathe 4.6s var(--ease) infinite;
  filter: drop-shadow(0 24px 42px rgba(43,36,48,.22));
}
@keyframes breathe{
  0%,100%{ transform: scale(1) translateY(0); }
  50%    { transform: scale(1.03) translateY(-6px); }
}
.gd-eyes{ transition: transform .22s var(--ease); }
.gudong-main .gd-eyes{
  transform: translate(calc(var(--mx) * 9px), calc(var(--my) * 7px));
}
/* 眨眼 */
.gd-eye{ animation: blink 5.4s var(--ease) infinite; transform-origin: center; }
.gd-eye:nth-child(2){ animation-delay: .04s; }
@keyframes blink{
  0%, 92%, 100%{ transform: scaleY(1); }
  95%          { transform: scaleY(.12); }
}

.hero-foot{
  position: absolute;
  left: var(--pad); right: var(--pad); bottom: 24px;
  display: flex;
  justify-content: space-between;
  color: rgba(43,36,48,.55);
  font-size: 11px;
}

/* 進場：色塊淡入 / 咕咚彈跳 / 文字上移 */
.hero-copy > *{
  opacity: 0;
  transform: translateY(22px);
  animation: riseIn .78s var(--ease) forwards;
}
.hero-copy > *:nth-child(1){ animation-delay: .05s; }
.hero-copy > *:nth-child(2){ animation-delay: .12s; }
.hero-copy > *:nth-child(3){ animation-delay: .19s; }
.hero-copy > *:nth-child(4){ animation-delay: .24s; }
.hero-copy > *:nth-child(5){ animation-delay: .29s; }
.hero-copy > *:nth-child(6){ animation-delay: .35s; }
@keyframes riseIn{ to{ opacity: 1; transform: translateY(0); } }

.hero-stage{
  opacity: 0;
  animation: petIn .92s var(--ease) .18s forwards;
}
@keyframes petIn{
  0%  { opacity: 0; transform: scale(1.08); }
  62% { opacity: 1; transform: scale(.985); }
  100%{ opacity: 1; transform: scale(1); }
}

/* ---------- 6. 通用 Section ---------- */
.section{
  position: relative;
  padding: clamp(72px, 9vw, 140px) var(--pad);
}
.section-head{ max-width: var(--maxw); margin: 0 auto clamp(36px, 5vw, 64px); }
.head-row{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

/* 滾動淡入 */
.reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in{ opacity: 1; transform: none; }

/* ---------- 7. Features 磁貼 ---------- */
.tile-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(168px, auto);
  gap: clamp(14px, 1.5vw, 22px);
  max-width: var(--maxw);
  margin: 0 auto;
  perspective: 1400px;
}

.tile{
  position: relative;
  border-radius: var(--r-2xl);
  perspective: 1100px;
  min-height: 168px;
  transition: transform var(--dur-2) var(--ease), z-index 0s;
}
.tile.wide{ grid-column: span 2; }
.tile.tall{ grid-row: span 2; }

.tile-inner{
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  transform-style: preserve-3d;
  transition: transform .78s var(--ease), box-shadow var(--dur-2) var(--ease);
  border-radius: inherit;
  box-shadow: var(--sh-1);
  will-change: transform;
}
.tile:hover{ transform: translateY(-8px) scale(1.035); z-index: 3; }
.tile:hover .tile-inner{ box-shadow: var(--sh-3); }
/* 懸停不強制翻面：僅暫停自動翻轉（JS 判 hover）+ 放大，保留當前正/背面 */
.tile.is-flipped .tile-inner{
  transform: rotateY(180deg);
}

.tile-face{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 2vw, 30px);
  border-radius: inherit;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
.tile-back{
  transform: rotateY(180deg);
  background: var(--ink);
  color: var(--cream);
}

/* 磁貼配色輪換（tonal，非高飽和大面積） */
.tile[data-tone="coral"] .tile-front{ background: #FFD9CC; }
.tile[data-tone="mint"] .tile-front{ background: #D9EEDA; }
.tile[data-tone="lav"]  .tile-front{ background: #E4DDF3; }
.tile[data-tone="lemon"].tile-front,
.tile[data-tone="lemon"] .tile-front{ background: #FFF0C2; }
.tile[data-tone="peach"] .tile-front{ background: #FFE6D9; }
.tile[data-tone="cream"] .tile-front{ background: var(--cream); }

.tile-icon{
  font-size: 30px;
  color: var(--ink);
  align-self: flex-start;
  transition: transform var(--dur-2) var(--ease);
}
.tile-front h3{
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.tile-front p{ margin-top: 6px; font-size: 12px; color: var(--ink-45); letter-spacing: .12em; font-family: "JetBrains Mono", monospace; }
.tile-back p{
  font-size: 14px;
  line-height: 1.66;
  color: rgba(255,248,231,.86);
}
.tile-back .tile-icon{ color: var(--lemon); }

/* 角落迷你咕咚 */
.tile-mini{
  position: absolute;
  right: 14px; bottom: 12px;
  width: 34px;
  opacity: .9;
  transition: transform var(--dur-2) var(--ease);
}
.tile:hover .tile-mini{ animation: miniHop .6s var(--ease); }
.tile-mini svg{ display: block; width: 100%; height: auto; }
@keyframes miniHop{
  0%,100%{ transform: translateY(0) rotate(0); }
  40%    { transform: translateY(-6px) rotate(-6deg); }
  70%    { transform: translateY(-2px) rotate(4deg); }
}

/* ---------- 8. Scenes 場景卡 ---------- */
.scene-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 1.8vw, 26px);
  max-width: var(--maxw);
  margin: 0 auto;
}
.scene-card{
  position: relative;
  padding: 14px;
  border-radius: var(--r-xl);
  background: var(--cream);
  box-shadow: var(--sh-1);
  transform-style: preserve-3d;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
  will-change: transform;
}
.scene-card.span-2{ grid-column: span 2; }
.scene-card:hover{
  transform: translateY(-10px) rotateY(-2.5deg) rotateX(1.5deg);
  box-shadow: var(--sh-3);
}

.scene-canvas{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #EFE6D8;
}
.scene-card.span-2 .scene-canvas{ aspect-ratio: 16 / 7.4; }

.scene-el{
  position: absolute;
  border-radius: 10px;
  will-change: transform;
}
.scene-pet{
  position: absolute;
  transform: rotate(var(--pet-rot, 0deg));
  transform-origin: 50% 88%;
  transition: transform var(--dur-3) var(--ease);
}
.scene-card:hover .scene-pet{
  transform: translateY(-6px) rotate(calc(var(--pet-rot, 0deg) - 3deg));
}
.scene-pet svg{ display: block; width: 100%; height: auto; }

.scene-meta{
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 10px 6px;
}
.scene-meta h3{
  font-size: clamp(16px, 1.35vw, 20px);
  font-weight: 700;
  flex: none;
  letter-spacing: -.01em;
}
.scene-meta p{
  font-size: 13.5px;
  color: var(--ink-70);
  line-height: 1.55;
}

/* 場景內特殊元素 */
.sc-walker{ animation: walker 6.4s var(--ease) infinite alternate; }
@keyframes walker{
  from{ transform: translateX(0); }
  to  { transform: translateX(var(--walk, 120px)); }
}
.scene-card:hover .sc-walker{ animation-duration: 1.8s; }

.sc-zzz{
  animation: floatZ 3.4s var(--ease) infinite;
}
@keyframes floatZ{
  0%  { opacity: .2; transform: translate(0, 6px) scale(.9); }
  50% { opacity: .95; transform: translate(6px, -8px) scale(1.05); }
  100%{ opacity: .2; transform: translate(0, 6px) scale(.9); }
}

.sc-cursor{ animation: cursorMove 2.8s var(--ease) infinite alternate; }
@keyframes cursorMove{
  from{ transform: translate(0, 0); }
  to  { transform: translate(10px, -8px); }
}

/* ---------- 9. Quotes 氣泡 ---------- */
.quotes{ background: linear-gradient(180deg, var(--surface) 0%, #FFF4E9 100%); }

.bubble-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 1.8vw, 26px);
  max-width: var(--maxw);
  margin: 0 auto;
}
.bubble{
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 26px 24px;
  border-radius: var(--r-md);
  text-align: center;
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 500;
  line-height: 1.55;
  cursor: pointer;
  box-shadow: var(--sh-1);
  transition: transform var(--dur-2) var(--ease),
              box-shadow var(--dur-2) var(--ease),
              background-color var(--dur-2) var(--ease);
}
/* 氣泡小尾巴（clip-path 三角） */
.bubble::before{
  content: "";
  position: absolute;
  left: 26px;
  bottom: -11px;
  width: 22px; height: 12px;
  background: inherit;
  clip-path: polygon(0 0, 100% 0, 18% 100%);
  transition: transform var(--dur-2) var(--ease);
}
.bubble:nth-child(2n)::before{ left: auto; right: 26px; clip-path: polygon(0 0, 100% 0, 82% 100%); }
.bubble:hover{
  transform: translateY(-6px) scale(1.025);
  box-shadow: var(--sh-2);
  color: var(--ink);
}
.bubble:hover::before{ transform: rotate(-6deg) translateY(2px); }
.bubble.swap{ animation: bubbleSwap .5s var(--ease); }
@keyframes bubbleSwap{
  0%  { transform: scale(1); }
  45% { transform: scale(.94); }
  100%{ transform: scale(1); }
}

.bubble[data-tone="coral"]{ background: #FFDFD3; }
.bubble[data-tone="mint"]{ background: #DCF0DD; }
.bubble[data-tone="lav"]{ background: #E7E0F5; }
.bubble[data-tone="lemon"]{ background: #FFF1C6; }
.bubble[data-tone="peach"]{ background: #FFE9DF; }
.bubble[data-tone="cream"]{ background: var(--cream); }
.bubble[data-tone="ink"]{ background: var(--ink); color: var(--cream); }

/* 錯落排列 */
.bubble-grid > :nth-child(3n+2){ margin-top: 22px; }
.bubble-grid > :nth-child(3n+3){ margin-top: 8px; }

.quotes-hint{
  max-width: var(--maxw);
  margin: 40px auto 0;
  text-align: center;
  color: var(--ink-45);
}

/* ---------- 10. Skins ---------- */
.skin-track{
  display: flex;
  gap: clamp(16px, 1.8vw, 26px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6px 4px 26px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}
.skin-track::-webkit-scrollbar{ display: none; }

.skin-card{
  flex: 0 0 clamp(230px, 24vw, 300px);
  scroll-snap-align: start;
  padding: 26px 24px 24px;
  border-radius: var(--r-lg);
  background: var(--cream);
  box-shadow: var(--sh-1);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.skin-card:hover{
  transform: translateY(-8px);
  box-shadow: var(--sh-2);
}
.skin-visual{
  display: grid;
  place-items: center;
  height: 168px;
  margin-bottom: 18px;
  border-radius: var(--r-md);
  background: var(--skin-bg, #FFE7DC);
  overflow: hidden;
}
.skin-visual svg{
  width: 128px;
  transition: transform var(--dur-3) var(--ease);
}
.skin-card:hover .skin-visual svg{ transform: rotate(-6deg) scale(1.06); }
.skin-card h3{
  font-family: "Fredoka", "Noto Sans TC", sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .01em;
}
.skin-card .skin-en{
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin-top: 2px;
}
.skin-card p.skin-desc{
  font-size: 13.5px;
  color: var(--ink-70);
  margin-top: 10px;
  line-height: 1.6;
}

.fab-row{ display: flex; gap: 10px; }
.fab{
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--sh-1);
  color: var(--ink);
  transition: transform var(--dur-2) var(--ease),
              box-shadow var(--dur-2) var(--ease),
              background-color var(--dur-2) var(--ease);
}
.fab:hover{ transform: translateY(-3px); background: var(--lemon); box-shadow: var(--sh-2); }
.fab:disabled{ opacity: .4; transform: none; box-shadow: var(--sh-1); cursor: default; }

/* ---------- 11. Release ---------- */
.release-card{
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.15fr);
  gap: clamp(24px, 4vw, 72px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 64px);
  border-radius: var(--r-2xl);
  background: #E9F3EA;              /* 薄荷 tonal */
}
.release-version{
  font-size: clamp(46px, 7.5vw, 108px);
  margin: 8px 0 16px;
}
.release-meta{ display: flex; gap: 8px; flex-wrap: wrap; color: var(--ink-45); }
.release-meta .dot{ color: var(--ink-45); opacity: .6; }

.release-log-title{
  font-size: 15px;
  letter-spacing: .02em;
  margin-bottom: 14px;
  color: var(--ink);
}
.log-list li{
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: .02em;
  line-height: 1.6;
  color: var(--ink-70);
  padding: 11px 14px;
  border-radius: var(--r-xs);
  transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.log-list li:hover{ background: rgba(255,255,255,.72); color: var(--ink); }

/* ---------- 12. Download ---------- */
.download{ padding-top: clamp(40px, 6vw, 90px); }
.download-card{
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(44px, 7vw, 104px) clamp(22px, 4vw, 72px);
  border-radius: var(--r-2xl);
  background:
    radial-gradient(90% 80% at 20% 12%, #FFD9C7 0%, rgba(255,217,199,0) 60%),
    linear-gradient(146deg, var(--coral) 0%, var(--peach) 62%, #FFD0B4 100%);
  text-align: center;
  overflow: hidden;
}
.download-card::after{
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255,248,231,.44);
  pointer-events: none;
}
.download-pet{
  width: clamp(110px, 13vw, 168px);
  margin: 0 auto 18px;
  animation: breathe 5s var(--ease) infinite;
  filter: drop-shadow(0 16px 28px rgba(43,36,48,.2));
}
.download-title{
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(8px, 1.6vw, 22px);
  font-size: clamp(40px, 8vw, 124px);
  margin-bottom: 34px;
  flex-wrap: wrap;
}
.download-pre{
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(13px, 1.1vw, 16px);
  letter-spacing: .28em;
  color: rgba(43,36,48,.62);
  align-self: flex-start;
  margin-top: .6em;
}
.download-meta{
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  color: rgba(43,36,48,.62);
}
.download-notes{
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.download-note{
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(43,36,48,.72);
  background: rgba(255,251,245,.6);
  padding: 8px 16px;
  border-radius: var(--r-pill);
}

/* ---------- 12.5 安裝包下載卡 ---------- */
.dl-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 620px;
  margin: 26px auto 0;
}
.dl-card{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.92);
  box-shadow: var(--sh-1);
  color: var(--ink);
  text-decoration: none;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.dl-card:hover,
.dl-card:focus-visible{
  transform: translateY(-3px);
  box-shadow: var(--sh-2);
}
.dl-icon{
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--cream);
  font-size: 22px;
  color: var(--ink);
}
.dl-body{
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  text-align: left;
}
.dl-os{
  font-family: "Fredoka", "Noto Sans SC", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}
.dl-note{
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dl-size{
  margin-left: auto;
  font-size: 11.5px;
  color: var(--ink-70);
  white-space: nowrap;
}
.dl-arrow{
  flex: none;
  font-size: 19px;
  color: var(--coral);
}
.download-privacy{
  background: rgba(129,199,132,.18);
  color: var(--ink);
}
/* 散步狀態：剪影輕微起伏，避免與待機剪影完全相同 */
.skin-card[data-skin="stroll"] .skin-visual svg{
  animation: strollBob 1.8s var(--ease) infinite;
}
@keyframes strollBob{
  0%, 100%{ transform: translateY(0); }
  50%     { transform: translateY(-5px); }
}
@media (prefers-reduced-motion: reduce){
  .skin-card[data-skin="stroll"] .skin-visual svg{ animation: none; }
}
@media (max-width: 620px){
  .dl-grid{ grid-template-columns: 1fr; max-width: 420px; }
}

/* ---------- 13. Footer ---------- */
.footer{
  position: relative;
  padding: clamp(64px, 8vw, 120px) var(--pad) 40px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer-title{
  font-size: clamp(52px, 11vw, 176px);
  letter-spacing: -.04em;
  margin-bottom: 34px;
}
.mail-list{ display: flex; flex-direction: column; gap: 6px; margin-bottom: 26px; }
.mail-list a{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(19px, 2.8vw, 40px);
  font-weight: 600;
  letter-spacing: -.02em;
  padding-bottom: 4px;
  transition: color var(--dur-2) var(--ease);
}
.mail-list a::after{
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 3px;
  border-radius: 3px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-2) var(--ease);
}
.mail-list a:hover{ color: var(--coral); }
.mail-list a:hover::after{ transform: scaleX(1); }
.mail-list a .material-symbols-rounded{
  font-size: .8em;
  transition: transform var(--dur-2) var(--ease);
}
.mail-list a:hover .material-symbols-rounded{ transform: translate(4px, -4px); }

.footer-note{
  font-size: 14px;
  color: var(--ink-70);
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(43,36,48,.1);
}
.footer-copy{
  margin-top: 22px;
  color: var(--ink-45);
  font-size: 11px;
}

/* ---------- 14. 語言切換淡入 ---------- */
.lang-fade{ animation: langFade .4s var(--ease); }
@keyframes langFade{
  from{ opacity: .25; }
  to  { opacity: 1; }
}

/* ---------- 15. 響應式 ---------- */
@media (max-width: 1080px){
  .tile-grid{ grid-template-columns: repeat(3, 1fr); }
  .scene-grid{ grid-template-columns: repeat(2, 1fr); }
  .scene-card.span-2{ grid-column: span 2; }
  .bubble-grid{ grid-template-columns: repeat(3, 1fr); }
  .release-card{ grid-template-columns: 1fr; }
  .nav-links a{ padding: 8px 11px; font-size: 13px; }
}

@media (max-width: 820px){
  .nav{ padding: 10px 16px 0; }
  .nav-inner{ padding: 8px 10px; }
  .nav.is-compact .nav-inner{ max-width: 100%; }

  .nav-toggle{ display: grid; }
  .nav-links{
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 10px;
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: var(--sh-3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--dur-2) var(--ease),
                transform var(--dur-2) var(--ease),
                visibility var(--dur-2) var(--ease);
  }
  .nav-links.is-open{ opacity: 1; visibility: visible; transform: none; }
  .nav-links a{ padding: 12px 16px; font-size: 15px; }
  .nav-links a::after{ display: none; }

  .lang-seg .lang-full{ display: none; }
  .lang-seg .lang-short{ display: inline; }
  .version-chip .version-num{ font-size: 10px; }

  .hero{ padding-top: 96px; }
  .hero-inner{ grid-template-columns: 1fr; gap: 12px; }
  .hero-stage{ min-height: 0; order: -1; }
  .gudong-main{ width: clamp(180px, 46vw, 260px); }
  .hero-title{ font-size: clamp(72px, 22vw, 132px); }
  .hero-foot{ position: static; margin-top: 40px; }
  .hero-tagline{ font-size: 16px; }
  .hero-actions{ margin-top: 26px; }

  .tile-grid{ grid-template-columns: repeat(2, 1fr); }
  .tile.wide{ grid-column: span 2; }
  .tile.tall{ grid-row: span 1; }

  .scene-grid{ grid-template-columns: 1fr; }
  .scene-card.span-2{ grid-column: span 1; }
  .scene-card.span-2 .scene-canvas{ aspect-ratio: 16 / 10; }

  .bubble-grid{ grid-template-columns: repeat(2, 1fr); }
  .bubble-grid > :nth-child(n){ margin-top: 0; }
  .bubble-grid > :nth-child(2n){ margin-top: 14px; }

  .head-row{ align-items: center; }
  .release-card{ padding: 28px 22px; border-radius: var(--r-xl); }
  .download-card{ border-radius: var(--r-xl); }
  .mail-list a{ font-size: clamp(16px, 5vw, 26px); }
}

@media (max-width: 520px){
  .tile-grid{ grid-template-columns: 1fr; }
  .tile.wide{ grid-column: span 1; }
  .bubble-grid{ grid-template-columns: 1fr; }
  .bubble-grid > :nth-child(n){ margin-top: 0; }
  .brand-word{ display: none; }
  .scene-meta{ flex-direction: column; gap: 6px; }
  .download-title{ gap: 8px; }
  .fab{ width: 46px; height: 46px; }
}

/* ---------- 16. prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,
  *::before,
  *::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  /* 保留靜態可讀狀態：咕咚依然完整可見，只是不動 */
  .gudong-main,
  .download-pet,
  .scene-pet,
  .gd-eye,
  .sc-walker,
  .sc-zzz,
  .sc-cursor{ animation: none !important; transform: none !important; }
  .hero-copy > *,
  .hero-stage{ opacity: 1 !important; transform: none !important; }
  .reveal{ opacity: 1 !important; transform: none !important; }
  .scene-card:hover,
  .tile:hover{ transform: none; }
  .tile:hover .tile-inner{ transform: none; }
  .blob{ transform: rotate(var(--rot, 0deg)) !important; }
  .skin-track{ scroll-behavior: auto; }
}
