/* Yongseng 自製字體 AHMEK（目前用在區塊標題的英文） */
@font-face { font-family: "AHMEK"; src: url("fonts/AHMEK-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
/* =========================================================
   新首頁樣式（index.html、works.html、digital.html 共用）
   2026-11-17 依照阿咩的手繪草稿：黑色線條、奶白底、手繪感
   手繪元素目前是占位（images/deco/*.svg），之後換成阿咩手繪 PNG
   ========================================================= */

.h-site {
  --head-h: 84px;
  --maxw-home: 1240px;
  --frame: 3px solid var(--ink);
  --hand: 18px 22px 16px 24px / 22px 16px 24px 18px; /* 不規則圓角：手繪感 */
  --board: #F1E4CC;
  background: var(--paper);
}
.h-site main { max-width: none; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.h-site .wrap { max-width: var(--maxw-home); margin: 0 auto; padding: 0 40px; }

/* 圖片還沒放時的虛線框 */
.ph {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  border: 2.5px dashed #B9AC97;
  border-radius: var(--hand);
  background: rgba(255, 255, 255, .5);
}
.ph-label { color: var(--muted); font-size: .95rem; padding: 0 16px; text-align: center; white-space: pre-line; }

/* ===== 導覽列 ===== */
.site-head { position: sticky; top: 0; z-index: 40; background: var(--paper); transition: box-shadow .2s; } /* 頁首跟著往下滑 */
html { scroll-padding-top: 100px; } /* 跳到頁面錨點時不被頁首擋住 */
.head-in {
  max-width: 1440px; height: var(--head-h);
  margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; gap: 8px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; color: var(--ink); }
.logo-mark { width: 54px; height: auto; }
.logo-img { height: 28px; width: auto; display: block; } /* logo 跟選單字差不多大 */
.logo-word { font-size: 1.7rem; font-weight: 900; letter-spacing: .02em; }

.globe-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 40px; padding: 0 10px;
  font: inherit; font-size: .85rem; font-weight: 700;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer;
}
.globe-btn:hover { background: var(--accent-soft); }

.h-site .nav { display: flex; align-items: center; gap: 4px; }
.h-site .nav > a, .drop-btn {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 8px 14px;
  font: inherit; font-size: 1.05rem; font-weight: 700; letter-spacing: .06em;
  color: var(--ink); text-decoration: none;
  border: 0; border-radius: 999px; background: transparent; cursor: pointer;
}
.h-site .nav > a:hover, .drop-btn:hover, .nav-drop.is-open .drop-btn { background: var(--accent-soft); }
.nav-drop { position: relative; }
.drop-btn svg { transition: transform .2s; }
.nav-drop.is-open .drop-btn svg { transform: rotate(180deg); }
.drop-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 190px;
  padding: 6px; background: var(--card);
  border: var(--frame); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink);
}
.drop-menu a { display: block; padding: 10px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.drop-menu a:hover { background: var(--accent-soft); }
.nav-drop.is-open .drop-menu { display: block; }
@media (hover: hover) and (min-width: 761px) {
  .nav-drop:hover .drop-menu { display: block; }
  .nav-drop::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; } /* 滑鼠移到選單時不會斷開 */
}
.h-site .cart-btn { width: 44px; height: 44px; margin-left: 6px; }
.h-site .menu-btn { width: 44px; height: 44px; }

/* ===== 1. Hero：電腦剛好一個畫面，完整看到大字 + 角色 ===== */
.hero {
  position: relative;
  height: calc(100vh - var(--head-h));
  height: calc(100svh - var(--head-h));
  min-height: 520px; /* 不設上限：大螢幕也剛好一整個畫面，看不到下一區的標題 */
  padding: 1vh 40px 4vh;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  justify-items: center;
  overflow: hidden;
  text-align: center;
}
.hero-word {
  position: relative; z-index: 2;
  margin: 0;
  font-size: clamp(64px, min(15vw, 19svh), 220px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: .03em;
  color: var(--ink);
}
.hero-art { position: relative; z-index: 1; min-height: 0; width: 100%; display: flex; justify-content: center; align-items: flex-start; }
.hero-art > img, .hero-art > svg { height: 100%; width: auto; max-width: min(100%, 1200px); object-fit: contain; }
.hero-ph text { font-family: var(--font); }
/* 有手繪封面圖：大字已在圖裡，h1 只留給搜尋引擎；圖片填滿整個畫面高度 */
.hero.has-art { grid-template-rows: minmax(0, 1fr); padding-top: 2vh; padding-bottom: 3vh; }
.hero.has-art .hero-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero.has-art .hero-art { align-items: center; }
/* 封面畫布：圖片 + 可以點的小雲（位置用 % 對齊圖片） */
.hero-canvas { position: relative; height: 100%; aspect-ratio: 1800 / 1500; max-width: none; flex: 0 0 auto; }
.hero-canvas .hero-base { display: block; width: 100%; height: 100%; object-fit: contain; }
.hero-eyes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-pupil { transition: transform .18s ease-out; transform-box: view-box; }
/* 分層封面（content.js 的 heroLayers）：大字 + 雲 + 角色，點角色有反應 */
.hero-word-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.hero-word-art text { font-family: "AHMEK", var(--font); font-weight: 800; fill: #3A2324; }
.hero-layer, .hero-react { position: absolute; display: block; height: auto; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.hero-char {
  position: absolute; padding: 0; border: 0; background: none; cursor: default;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.hero-char .hero-layer { position: static; width: 100%; }
.hero-char:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 16px; }
.hero-char.is-react .hero-layer { visibility: hidden; }
.hero-react { visibility: hidden; } /* 反應圖跟原本的圖層同一層（阿咩的反應圖不會蓋到卷卷） */
.hero-react[data-anim="fly"] { z-index: 3; } /* 卷卷飛走時在最上面 */
@media (pointer: coarse) and (min-width: 761px) { .hero-react[data-anim="fly"] { --fly-end-y: -98%; } } /* iPad：飛低一點，才不會被左上角的小雲擋住（終點 y = 20%，跟 main.js 的 TWINKLE 一致） */
.hero-react.is-on { visibility: visible; }
.hero-react.is-on[data-anim="shake"] { animation: heroBuzz .1s linear infinite; }   /* 可可：氣到微微震動（帶一點動態模糊） */
.hero-react.is-on[data-anim="steam"] { animation: heroBuzzSoft .14s linear infinite; } /* 阿薇：氣到微微發抖 + 頭上冒熱氣 */
.hero-canvas.react-ahmek .hero-eyes { visibility: hidden; }
.hero-react.is-on[data-anim="shy"] { transform-origin: 50% 100%; animation: heroShy .6s ease-in-out; } /* 阿咩：害羞縮一下、扭一扭 */
.hero-react.is-on[data-anim="fly"] { animation: heroBlast 1s cubic-bezier(.25, .6, .45, 1) forwards; } /* 卷卷：往左上角飛走，邊飛邊縮小，慢慢轉一圈（動態模糊） */
.hero-char.is-rise { /* 從大雲朵裡升上來：分界線是柔和的漸層，跟著慢慢往下退，最後腳完整露出來 */
  padding-bottom: 3%;
  -webkit-mask: linear-gradient(#000 51.7%, transparent 57.3%) 0 50% / 100% 300% no-repeat;
  mask: linear-gradient(#000 51.7%, transparent 57.3%) 0 50% / 100% 300% no-repeat;
  animation: heroRiseMask 1.1s ease-out both; /* both：動畫結束後停在最後一格，不會閃一下 */
}
@keyframes heroRiseMask { 0%, 55% { -webkit-mask-position: 0 50%; mask-position: 0 50%; } 100% { -webkit-mask-position: 0 27.5%; mask-position: 0 27.5%; } } /* 分界線先停在肚子附近，最後才往下退 */
.hero-char.is-rise .hero-layer { animation: heroRise 1.1s ease-out both; } /* 卷卷回來：從大雲朵慢慢升上來（不透明） */
.hero-twinkle { position: absolute; display: block; width: 6%; translate: -50% -50%; z-index: 4; pointer-events: none; animation: heroTwinkle .55s ease-out forwards; }
.hero-twinkle svg { display: block; width: 100%; height: auto; overflow: visible; }
@keyframes heroBuzz {
  0%, 100% { translate: 0 0; filter: blur(.4px); }
  25% { translate: -.8% .3%; filter: blur(.7px); } 50% { translate: .8% -.3%; } 75% { translate: -.5% -.3%; filter: blur(.7px); }
}
@keyframes heroBuzzSoft { 0%, 100% { translate: 0 0; } 25% { translate: -.25% 0; } 75% { translate: .25% 0; } }
.hero-steam { position: absolute; display: block; width: 1.8%; translate: -50% -100%; z-index: 4; pointer-events: none; opacity: 0; filter: blur(1.2px); animation: heroSteam 1.1s ease-out forwards; } /* 阿薇的熱氣：細線往上飄，模糊一點比較不搶眼 */
.hero-steam svg { display: block; width: 100%; height: auto; overflow: visible; }
@keyframes heroSteam { 0% { opacity: 0; translate: -50% -60%; scale: .7; } 25% { opacity: .75; } 100% { opacity: 0; translate: -50% -260%; scale: 1.2; } }
@keyframes heroShy { 0% { scale: 1; rotate: 0deg; } 20% { scale: 1.04 .94; } 45% { scale: 1; rotate: -3deg; } 70% { rotate: 3deg; } 100% { rotate: 0deg; } }
@keyframes heroBlast { /* 從卷卷原本的位置往左上角飛，終點 = 封面 (18%, 10%)，跟 main.js 的 TWINKLE 一致 */
  0% { translate: 34% 44%; rotate: 0deg; scale: 1; filter: blur(0); }
  20% { filter: blur(2.5px); }
  70% { filter: blur(1.5px); }
  100% { translate: -20% var(--fly-end-y, -133%); rotate: -360deg; scale: .04; filter: blur(0); }
}
@keyframes heroRise { from { translate: 0 100%; } to { translate: 0 0; } }
@keyframes heroTwinkle { 0% { scale: 0; rotate: 0deg; } 35% { scale: 1.25; rotate: 30deg; } 100% { scale: 0; rotate: 90deg; opacity: .6; } }
.hero-cloud {
  position: absolute; left: var(--x); top: var(--y);
  padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.hero-cloud::before { content: ""; position: absolute; inset: -30%; } /* 手機比較好點 */
.hero-cloud img:not(.fx) { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; }
.hero-cloud:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 12px; }
/* 封面小雲：手機和電腦效果一樣（iPhone 開了「減少動態」也照樣漂浮、果凍彈、光圈） */
.hero-cloud img:not(.fx) { animation: cloudFloat var(--dur, 6s) ease-in-out infinite alternate; animation-delay: calc(var(--d) * -1); }
@media (hover: hover) { .hero-cloud:hover img:not(.fx) { scale: 1.08; transition: scale .2s; } }
@keyframes cloudFloat { /* 微微漂浮：上下加一點左右 */
  0% { translate: 0 0; }
  35% { translate: 5% -7%; }
  70% { translate: -4% -3%; }
  100% { translate: 3% -10%; }
}
.hero-cloud.is-side { z-index: 1; } /* 左右兩邊多加的雲（位置以整個封面區塊為準） */
.hero-cloud.is-pop img:not(.fx) { animation: cloudJelly .42s ease forwards; }
@keyframes cloudJelly { /* 果凍彈兩下，最後鼓起來消失 */
  0% { transform: scale(1); opacity: 1; }
  25% { transform: scale(1.25, .7); }
  50% { transform: scale(.82, 1.22); }
  68% { transform: scale(1.15, .9); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}
.hero-cloud.is-gone { visibility: hidden; pointer-events: none; }
.hero-cloud.is-back img { animation: cloudBack .6s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes cloudBack { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.fx { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.fx-ring {
  width: 40%; aspect-ratio: 1; border: 3px solid rgba(31, 29, 26, .22); border-radius: 50%; /* 淡淡的光圈 */
  transform: translate(-50%, -50%); animation: fxRing .6s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes fxRing { 0% { opacity: .9; } 100% { width: 170%; border-width: 1px; opacity: 0; } }
/* 點掉雲朵後飄出的「煩惱 -1 / Stress -1」 */
.stress-tip {
  position: absolute; z-index: 5; pointer-events: none; white-space: nowrap;
  font-weight: 900; font-size: clamp(.9rem, 1.3vw, 1.15rem); color: var(--accent);
  transform: translate(-50%, 0); animation: stressUp 1.2s ease-out forwards;
}
.stress-tip.is-lucky { color: #1FA7A8; } /* 好運 +1、財運 +1：青色 */
html[lang="en"] .stress-tip { font-family: "AHMEK", var(--font); font-weight: 800; }
@keyframes stressUp { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -38px) scale(1); } }
.deco-cloud { position: absolute; z-index: 0; width: clamp(56px, 6vw, 96px); height: auto; pointer-events: none; }
.deco-cloud.c1 { top: 4%;  left: 14%; width: clamp(48px, 4.5vw, 72px); }
.deco-cloud.c2 { top: 30%; left: 6%; }
.deco-cloud.c3 { top: 72%; left: 3%; }
.deco-cloud.c4 { top: 8%;  right: 12%; width: clamp(48px, 4.5vw, 72px); transform: scaleX(-1); }
.deco-cloud.c5 { top: 36%; right: 6%; transform: scaleX(-1); }
.deco-cloud.c6 { top: 80%; right: 3%; }
@media (prefers-reduced-motion: no-preference) {
  .deco-cloud { animation: drift 7s ease-in-out infinite alternate; }
  .deco-cloud.c2, .deco-cloud.c5 { animation-duration: 9s; }
  .deco-cloud.c3, .deco-cloud.c6 { animation-duration: 8s; animation-delay: -3s; }
}
@keyframes drift { to { translate: 14px -6px; } }

/* ===== 區塊 & 雲朵標題 ===== */
.sec { padding: 110px 0 40px; }
.cloud-title {
  display: flex; justify-content: center; text-align: center;
  margin: 0 auto 56px;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 900; line-height: 1.2;
}
/* 區塊標題（方案 B）：中文大字 + 下面一行紅色英文小字；英文版只顯示英文大字（用 Yongseng 的 AHMEK 字體） */
html[lang="en"] .cloud-title { font-family: "AHMEK", var(--font); font-weight: 800; font-size: clamp(2rem, 3.4vw, 2.8rem); }
.cloud-title span::after { /* 英文小字：main.js 會把英文標題放進 data-sub */
  content: attr(data-sub); display: block; margin-top: .45em; padding-left: .3em;
  font: 800 clamp(.8rem, 1vw, .95rem) / 1 "AHMEK", var(--font); letter-spacing: .3em; color: var(--accent);
}
html[lang="en"] .cloud-title span::after { content: none; }
/* 首頁標題可以點進頁面（周邊商品 → 商店、作品展示 → 作品集）；hover 時微微放大 */
.title-link { color: inherit; text-decoration: none; display: inline-block; transition: transform .2s, color .2s; }
.title-link:hover { transform: scale(1.04); color: var(--accent); }
.title-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; border-radius: 8px; }
.all-row { margin: 48px 0 0; text-align: center; }
.all-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 28px;
  font-weight: 700; font-size: 1.1rem; letter-spacing: .04em;
  color: var(--ink); text-decoration: none;
  background: var(--card);
  border: var(--frame); border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s, background .12s;
}
.all-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); background: var(--accent-soft); }
.all-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* ===== 2. 周邊商品（2 行 × 3 格） ===== */
.merch-grid { gap: 48px 48px; max-width: 1060px; margin: 0 auto; }
/* 首頁周邊卡片：跟商店頁一樣（用 shop.css 的 .pcard 樣式），只是不顯示庫存 */
.merch-grid .pcard-stock { display: none; }

/* ===== 3. 角色介紹（卡牌輪播） ===== */
#characters { overflow: hidden; }
.carousel {
  --cw: clamp(240px, 29vw, 400px); /* 電腦版角色卡大一點 */
  position: relative;
  max-width: 1300px; margin: 0 auto;
}
.car-track { position: relative; height: calc(var(--cw) * 1.5); outline: none; }
.ccard {
  position: absolute; top: 0; left: 50%;
  width: var(--cw);
  padding: 10px 10px 12px;
  background: var(--card);
  border: var(--frame); border-radius: 12px;
  box-shadow: 2px 2px 0 var(--ink); /* 平常小陰影；點開後變大 */
  cursor: pointer;
  transition: transform .45s cubic-bezier(.3, .8, .3, 1), opacity .35s, box-shadow .2s, filter .3s;
  transform-origin: 50% 100%;
}
.ccard[data-pos="center"] { z-index: 3; transform: translateX(-50%); }
.ccard[data-pos="left"]   { z-index: 2; transform: translateX(calc(-50% - var(--cw) * .7)) scale(.82) rotate(-4deg); }
.ccard[data-pos="right"]  { z-index: 2; transform: translateX(calc(-50% + var(--cw) * .7)) scale(.82) rotate(4deg); }
.ccard[data-pos="back"]   { z-index: 1; transform: translateX(-50%) scale(.6); opacity: 0; pointer-events: none; }
.ccard:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.ccard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 10px; }
.ccard-name { display: flex; align-items: baseline; gap: 10px; font-weight: 900; font-size: 1.6rem; line-height: 1.15; } /* 角色名字：大、粗 */
.ccard-en { font: 800 1.4rem / 1 "AHMEK", var(--font); letter-spacing: .06em; } /* 英文名字放旁邊，用 AHMEK 字體 */
.eyes { width: 40px; height: auto; flex-shrink: 0; }

.ccard-body {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 2.5px solid var(--ink); border-radius: 6px;
  background: var(--card);
}
.ccard-art {
  position: absolute; left: 0; right: 0; top: 0;
  height: 100%;
  display: grid; place-items: center;
  transition: height .4s cubic-bezier(.3, .8, .3, 1);
}
.ccard-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.ccard-info {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 44%;
  padding: 12px 14px;
  background: var(--card);
  border-top: 2.5px solid var(--ink);
  transform: translateY(102%);
  transition: transform .4s cubic-bezier(.3, .8, .3, 1);
  overflow: hidden;
}
.ccard-role { font-size: 1rem; line-height: 1.55; }
.ccard-traits { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 5px; }
.ccard-traits li { font-size: .85rem; line-height: 1.5; padding: 1px 10px; border: 1.5px solid var(--ink); border-radius: 999px; }
/* 點擊（手機）或 hover（電腦）：角色放大（看上半身），下方出現介紹；介紹框只跟內容一樣高 */
.ccard-art img { transition: transform .4s cubic-bezier(.3, .8, .3, 1); transform-origin: 50% 0; }
.ccard-info { height: auto; max-height: 46%; }
.ccard.is-open .ccard-art img { transform: var(--zoom, scale(1.22)); }
/* 可可、卷卷在圖裡位置比較低：打開時多往上移、放大一點（data-i = content.js CHARACTERS 的順序） */
.ccard[data-i="1"] { --zoom: translateY(-6%) scale(1.22); } /* 阿薇：高一點點 */
.ccard[data-i="2"] { --zoom: translateY(-34%) scale(1.6); } /* 可可放大到只看到頭，看不到腿 */
.ccard[data-i="3"] { --zoom: translateY(-22%) scale(1.42); }
.ccard.is-open .ccard-info { transform: none; }
@media (hover: hover) {
  .ccard[data-pos="center"]:hover .ccard-art img { transform: var(--zoom, scale(1.22)); }
  .ccard[data-pos="center"]:hover .ccard-info { transform: none; }
}

.car-arrow {
  position: absolute; top: 45%; z-index: 5;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border: var(--frame); border-radius: 50%;
  background: var(--card); color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}
.car-arrow:hover { background: var(--accent-soft); }
.car-arrow.prev { left: 0; }
.car-arrow.next { right: 0; }
.car-dots { display: flex; justify-content: center; gap: 10px; margin-top: 28px; }
.car-dots .dot { width: 12px; height: 12px; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: transparent; cursor: pointer; }
.car-dots .dot[aria-current="true"] { background: var(--ink); }
.car-hint { margin-top: 12px; text-align: center; color: var(--muted); font-size: .9rem; }

/* ===== 4. 作品展示（布告板） ===== */
.board {
  max-width: 1080px; margin: 0 auto;
  padding: 14px;
  background: var(--card);
  border: var(--frame); border-radius: 10px;
  box-shadow: 2px 2px 0 var(--ink); /* 布告板：跟角色卡一樣的小陰影 */
}
.board-in {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 44px;
  padding: 56px 52px 52px;
  background-color: var(--board);
  background-image: radial-gradient(rgba(120, 90, 50, .14) 1.2px, transparent 1.4px);
  background-size: 14px 14px;
  border: 2.5px solid var(--ink); border-radius: 4px;
}
.paper {
  position: relative;
  display: block;
  padding: 14px 14px 12px;
  font: inherit; color: inherit; text-align: left;
  background: var(--card);
  border: 2.5px solid var(--ink); border-radius: 3px;
  cursor: pointer;
  transition: transform .25s ease;
}
.paper:nth-child(3n+1) { transform: rotate(-2deg); }
.paper:nth-child(3n+2) { transform: rotate(1.5deg); }
.paper:nth-child(3n)   { transform: rotate(-1deg); }
.paper:hover, .paper:focus-visible { transform: rotate(0) translateY(-4px); outline: none; }
.paper .pin { position: absolute; top: -34px; left: 50%; width: 40px; height: auto; margin-left: -24px; z-index: 2; } /* 圖釘位置（針在右下角） */
.paper-img { display: block; aspect-ratio: 1 / 1; overflow: hidden; border: 1.5px solid var(--ink); }
.paper-img img { width: 100%; height: 100%; object-fit: cover; }
.paper-title { display: block; margin-top: 8px; font-size: .95rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 右下角紙張微微翻起 */
.paper::after {
  content: "";
  position: absolute; right: -2.5px; bottom: -2.5px;
  width: 0; height: 0;
  /* 圓潤的翻角：用圓弧取代斜線 */
  background: radial-gradient(circle at 0 0, #EFE7DA 0 66%, var(--ink) 66% 70.7%, var(--board) 70.7%);
  border-top-left-radius: 12px;
  transition: width .25s ease, height .25s ease;
}
.paper:hover::after, .paper:focus-visible::after { width: 46px; height: 46px; }
.paper.is-soon { cursor: default; }
.paper.is-soon:hover { transform: rotate(1.5deg); }
.paper.is-soon:hover::after { width: 0; height: 0; }
.soon-box { display: grid; place-items: center; text-align: center; color: var(--muted); border-style: dashed; white-space: pre-line; }

/* ===== 5. 自我介紹 ===== */
#about { padding-bottom: 110px; }
.intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px; align-items: center; }
.intro-art { aspect-ratio: 1 / 1; }
.intro-art img { width: 100%; height: 100%; object-fit: contain; }
.intro-link { display: block; width: 100%; height: 100%; transition: transform .2s; } /* 首頁：點懶人沙發去關於我 */
@media (hover: hover) { .intro-link:hover { transform: scale(1.03) rotate(-1deg); } }
.bubble { /* 對白泡泡：一整條手繪感黑線畫出泡泡和尾巴（SVG），尾巴指向阿咩 */
  position: relative;
  display: grid; place-items: center;
  width: min(110%, 580px);
  aspect-ratio: 620 / 320;
  margin: 0 0 24px -10%; /* 尾巴從左下角伸出，指向懶人沙發上的阿咩 */
  padding: 0 5% 9% 8%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 620 320'%3E%3Cpath d='M190 256 C320 272 610 245 610 136 C610 46 480 10 325 10 C170 10 40 46 40 136 C40 180 68 215 120 236 C114 258 100 276 82 290 Q70 300 86 298 C126 290 162 276 190 256 Z' fill='%23FBFBFB' stroke='%231F1D1A' stroke-width='7' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  white-space: pre-line;
}
html[lang="en"] .bubble { font-size: clamp(1.5rem, 2.5vw, 2.25rem); }
.quote-text { display: block; animation: quoteIn .35s ease; }
.quote-text.is-out { opacity: 0; transform: translateY(-4px); transition: opacity .28s ease, transform .28s ease; }
@keyframes quoteIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .quote-text { animation: none; } .quote-text.is-out { transition: none; } }
.h-site .about { font-size: 1.05rem; color: var(--ink); }
.h-site .about p + p { margin-top: 12px; }
.sign { margin-top: 22px; text-align: right; font-size: 1.5rem; font-weight: 700; transform: rotate(-3deg); }
.work-row { margin-top: 22px; text-align: right; }

/* ===== 頁尾 ===== */
.site-foot { border-top: 4px solid var(--ink); padding: 40px 0 28px; }
.foot-in { max-width: var(--maxw-home); margin: 0 auto; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-foot .logo { margin-right: 0; }
.foot-icons { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; }
.foot-icons a { display: grid; place-items: center; width: 46px; height: 46px; color: var(--ink); border-radius: 50%; transition: background .15s, transform .15s; }
.foot-icons a:hover { background: var(--accent-soft); transform: translateY(-2px); }
.foot-icons svg { width: 30px; height: 30px; }
.foot-bottom { max-width: var(--maxw-home); margin: 28px auto 0; padding: 0 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .85rem; }
.foot-bottom .foot-links { margin: 0; }

/* ===== 作品頁、虛擬周邊頁 ===== */
.page-top { padding-top: 40px; padding-bottom: 110px; }
.soon-page { text-align: center; }
.soon-cloud { width: 140px; margin: 0 auto 8px; }
.soon-big { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 900; }
.soon-text { margin-top: 12px; }

/* ===== 平板 ===== */
@media (max-width: 1024px) {
  .merch-grid { gap: 36px 28px; }
  .board-in { gap: 40px 28px; padding: 48px 32px 40px; }
  .intro { gap: 36px; }
}

/* ===== 手機 ===== */
@media (max-width: 760px) {
  .h-site { --head-h: 64px; }
  .h-site .wrap { padding: 0 20px; }
  .head-in { padding: 0 14px; gap: 2px; }
  .logo-mark { width: 42px; }
  .logo-img { height: 24px; } /* 手機 logo */
  .logo-word { font-size: 1.3rem; }
  /* 手機：地球看不出是切換語言，改成直接寫 EN / 中文 */
  .globe-btn svg, .lang-full { display: none; } /* 手機：英文頁按鈕只寫「中」 */
  .globe-btn { padding: 0 10px; font-size: .95rem; }
  .h-site .menu-btn { display: inline-flex; }
  .h-site .nav {
    display: none;
    position: absolute; top: calc(100% - 4px); left: 12px; right: 12px; z-index: 40;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px; background: var(--card);
    border: var(--frame); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink);
  }
  .h-site .nav.is-open { display: flex; }
  .h-site .nav > a, .drop-btn { width: 100%; justify-content: space-between; padding: 12px 14px; }
  .drop-menu { position: static; display: block; min-width: 0; padding: 0 0 4px 14px; border: 0; box-shadow: none; }
  .drop-btn svg { display: none; }

  /* 手機的 Hero 照圖片比例完整顯示 */
  /* 手機：封面也占滿一整個畫面，往下滑才看到周邊 */
  .hero {
    height: auto; max-height: none;
    min-height: calc(100vh - var(--head-h));
    min-height: calc(100svh - var(--head-h));
    padding: 16px 12px 40px;
    display: flex; flex-direction: column; justify-content: center; gap: 4svh;
  }
  .hero-word { font-size: clamp(64px, 21vw, 120px); }
  .hero-art { margin-top: 0; flex: 0 0 auto; }
  .hero-art > img, .hero-art > svg { width: 100%; height: auto; }
  /* 手機：封面圖放大一點（兩旁的小雲會稍微超出畫面），AHMEK 和角色更大更滿 */
  .hero.has-art .hero-art { display: block; min-width: 0; }
  .hero-cloud { left: var(--mxp, var(--mx)); top: var(--myp, var(--my)); } /* 手機版位置（main.js 依手機實際空白位置算） */
  .hero-cloud.no-mobile { display: none; } /* mobile: false = 手機版不顯示 */
  .hero.has-art .hero-canvas { width: 136%; height: auto; max-width: none; margin: 0 -18%; }
  .deco-cloud { width: 44px !important; }
  .deco-cloud.c2, .deco-cloud.c5 { display: none; }
  .deco-cloud.c3 { top: auto; bottom: 6%; }
  .deco-cloud.c6 { top: auto; bottom: 2%; }

  .sec { padding: 72px 0 24px; }
  .cloud-title { margin-bottom: 36px; }
  .merch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .all-row { margin-top: 36px; }

  .carousel { --cw: 62vw; }
  .car-arrow { width: 42px; height: 42px; top: 40%; }
  .car-arrow.prev { left: 6px; }
  .car-arrow.next { right: 6px; }
  .ccard-info { height: auto; max-height: 46%; padding: 8px 10px; } /* 手機：介紹字小一點，少擋角色 */
  .ccard-role { font-size: .74rem; line-height: 1.45; }
  .ccard-traits { margin-top: 6px; gap: 4px; }
  .ccard-traits li { font-size: .66rem; padding: 0 7px; border-width: 1.2px; }


  .board { padding: 8px; }
  .board-in { padding: 40px 18px 24px; gap: 40px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #works .board:not(.board-all) .board-in { grid-template-columns: minmax(0, 1fr); padding: 40px 15% 28px; }
  .paper .pin { width: 32px; height: auto; margin-left: -19px; top: -28px; }

  #about { padding-bottom: 72px; }
  .intro { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  /* 手機：泡泡放在懶人沙發上面，尾巴往下指向阿咩 */
  .intro-text { display: contents; }
  .intro .bubble { order: -1; justify-self: center; }
  .intro .intro-art { order: 0; }
  .intro .about, .intro .sign, .intro .work-row { order: 1; }
  .work-row { text-align: center; } /* 手機：Work with me 置中 */
  .intro-art { max-width: 240px; width: 68%; margin: 0 auto; } /* 手機：懶人沙發圖小一點 */
  .intro-text { text-align: center; }
  .bubble { width: min(62%, 225px); aspect-ratio: 600 / 330; margin: 0 auto -26px; padding: 1% 5% 6% 5%; display: grid; place-items: center; align-content: center; /* 字放在泡泡正中間（扣掉下面的尖角） */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 330'%3E%3Cpath d='M270 268 C380 274 590 245 590 140 C590 50 470 10 300 10 C130 10 10 50 10 140 C10 220 100 258 200 266 C206 286 204 302 195 314 Q187 326 202 321 C228 309 252 291 270 268 Z' fill='%23FBFBFB' stroke='%231F1D1A' stroke-width='7' stroke-linejoin='round'/%3E%3C/svg%3E"); font-size: clamp(1.2rem, 5.6vw, 1.45rem); }
  html[lang="en"] .bubble { font-size: clamp(.85rem, 3.9vw, 1rem); line-height: 1.3; }
  html[lang="en"] .bubble .quote-text { white-space: pre; } /* 英文照原本的兩行，不自動多換行 */
  .h-site .about { text-align: left; }
  .foot-in, .foot-bottom { padding: 0 20px; }
  .foot-in { justify-content: center; flex-direction: column; }
  .foot-bottom { justify-content: center; text-align: center; }
}

/* 直放的平板（iPad 直向）：封面照手機的排法——圖照寬度完整顯示，小雲放在大字上方和角色下方的空白處 */
@media (orientation: portrait) and (min-width: 761px) and (max-width: 1100px) {
  .hero {
    height: auto; max-height: none;
    min-height: calc(100vh - var(--head-h));
    min-height: calc(100svh - var(--head-h));
    padding: 16px 24px 40px;
    display: flex; flex-direction: column; justify-content: center;
  }
  .hero.has-art .hero-art { display: block; min-width: 0; flex: 0 0 auto; }
  .hero.has-art .hero-canvas { width: 120%; height: auto; max-width: none; margin: 0 -10%; }
  .hero-cloud { left: var(--mxp, var(--mx)); top: var(--myp, var(--my)); }
  .hero-cloud.no-mobile { display: none; }
}

/* ===== 新頁面（關於、作品集）和商店頁共用 ===== */
/* 導覽列：目前所在的頁面 */
.h-site .nav > a[aria-current="page"], .nav-drop.is-current .drop-btn { color: var(--accent); }
.drop-menu a[aria-current="page"] { color: var(--accent); }

/* 頁面最上面的長 banner（content.js 的 SITE.banners） */
.page-banner { width: 100%; }
.page-banner img { display: block; width: 100%; height: auto; }
.banner-ph {
  aspect-ratio: 4 / 1; margin: 16px 40px 0; border: 3px dashed #D9CDB9; border-radius: 22px;
  display: grid; place-content: center; gap: 6px; text-align: center; color: var(--muted); background: #F4ECDD;
}
.banner-ph small { font-size: .85rem; opacity: .8; }
.page-banner + .page-top { padding-top: 56px; }

/* 商店頁：用新的頁首後，內容維持原本的寬度 */
.h-site main.page { max-width: 1040px; margin: 0 auto; padding: 32px 20px 0; }

/* 作品集：分類按鈕、合作標籤 */
.work-filter { justify-content: center; margin: 0 0 28px; }
.paper-tag { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .78rem; font-weight: 700; }
.empty-note { grid-column: 1 / -1; padding: 40px 0; text-align: center; color: var(--muted); list-style: none; }

/* 關於頁：里程碑時間軸 */
.timeline { max-width: 720px; margin: 0 auto; padding: 0; list-style: none; position: relative; }
.timeline .ms-item { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 0 0 28px; }
.timeline .ms-item::before { content: ""; position: absolute; left: 124px; top: 10px; bottom: -6px; width: 3px; background: var(--ink); border-radius: 2px; }
.timeline .ms-item:last-child::before { display: none; }
.timeline .ms-item::after { content: ""; position: absolute; left: 117px; top: 4px; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); border: 3px solid var(--ink); }
.ms-year { font: 800 1.35rem / 1.2 "AHMEK", var(--font); color: var(--accent); text-align: right; padding-right: 18px; }
.ms-text { font-size: 1.02rem; line-height: 1.65; margin: 0; }
/* 里程碑卡片：手繪風（粗黑框 + 黑色陰影），有圖時圖在左邊 */
.ms-card { margin-left: 22px; display: grid; gap: 16px; padding: 16px 18px; background: var(--card, #fff); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 5px 5px 0 var(--ink); }
.ms-card.has-img { grid-template-columns: 180px 1fr; align-items: start; }
.ms-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #F7F2EA; border-radius: 10px; border: 2px solid var(--ink); display: block; }
/* 里程碑多張照片：左右滑，下面有圓點 */
.ms-gallery { position: relative; aspect-ratio: auto; border: 0; border-radius: 0; overflow: visible; background: none; }
.ms-strip { display: block; overflow: hidden; touch-action: pan-y; overscroll-behavior-x: contain; border: 2px solid var(--ink); border-radius: 10px; aspect-ratio: 1 / 1; background: #F7F2EA; }
.ms-strip::-webkit-scrollbar { display: none; }
.ms-track { display: flex; height: 100%; will-change: transform; } /* 相簿：整排照片一起左右移 */
.ms-strip img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.ms-dots { display: flex; justify-content: center; gap: 7px; margin-top: 8px; }
.ms-dot { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; cursor: pointer; }
.ms-dot.on { background: var(--accent); }
/* 電腦版：滑鼠移到照片上才出現左右箭頭 */
.ms-arrow { display: none; position: absolute; top: calc(50% - 11px); translate: 0 -50%; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); color: rgba(31, 29, 26, .75); font: 700 1.3rem / 1 var(--font); cursor: pointer; opacity: 0; transition: opacity .2s, background .2s; } /* 淡淡的半透明箭頭 */
.ms-arrow:hover { background: rgba(255, 255, 255, .85); }
.ms-arrow.prev { left: 8px; } .ms-arrow.next { right: 8px; }
@media (hover: hover) and (pointer: fine) {
  .ms-arrow { display: grid; place-items: center; }
  .ms-gallery:hover .ms-arrow, .ms-arrow:focus-visible { opacity: .8; }
}
.ms-ph { display: grid; place-items: center; padding: 8px; text-align: center; font-size: .8rem; color: var(--muted); border-style: dashed; background: var(--cream, #FBF5EE); }
.ms-title { margin: 0 0 6px; font-size: 1.15rem; font-weight: 900; line-height: 1.35; }
html[lang="en"] .ms-title { font-weight: 800; }
/* 為什麼叫 AHMEK？ */
.ms-badge { display: none; }
#name .name-wrap { max-width: 680px; margin-left: auto; margin-right: auto; } /* 電腦版不要太寬 */
.name-card { margin-left: 0; box-shadow: none; } /* 為什麼叫 AHMEK 的框：不要陰影 */
/* 為什麼叫 AHMEK？讀者自己點母音 */
.name-hint { margin: 18px 0 6px; padding-top: 16px; border-top: 2px dashed var(--line, #E5DDD2); text-align: center; font-size: .92rem; font-weight: 700; color: var(--muted); }
.name-hint:empty { margin-bottom: 0; padding-top: 18px; } /* 沒有提示字時只留虛線 */
.name-word { display: flex; align-items: center; justify-content: center; gap: 0; margin: 0 0 14px; font: 800 clamp(2.6rem, 8vw, 3.6rem) / 1 "AHMEK", var(--font); letter-spacing: .04em; transition: color .3s; }
.slot-win { display: inline-grid; place-items: center; width: .86em; height: 1em; margin: 0 .02em; overflow: visible; border: 1px dashed rgba(31, 29, 26, .35); border-radius: 10px; background: rgba(240, 200, 192, .75); } /* 選名字的框：細、淡一點 */
.slot-ch { display: block; letter-spacing: 0; } /* 不加字距，字母在框裡才會置中 */
.slot-ch.is-roll { animation: slotRoll .25s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes slotRoll { from { transform: translateY(-70%) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.slot-tail { display: inline-block; }
.slot-tail.is-flip { animation: tailFlip .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tailFlip { 0% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-.35em) rotate(-12deg); } 100% { transform: none; } }
.name-word.is-done { color: var(--accent); }
.name-word.is-done .slot-win { border-style: solid; border-color: var(--accent); background: transparent; }
.vowel-btns { display: flex; justify-content: center; gap: 10px; margin: 0 0 14px; }
.vowel-btn { width: 46px; height: 46px; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--card, #fff); box-shadow: 3px 3px 0 var(--ink); font: 800 1.3rem / 1 "AHMEK", var(--font); color: var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s, background .15s; -webkit-tap-highlight-color: transparent; }
.vowel-btn:hover { transform: translateY(-2px); }
.vowel-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.vowel-btn.is-on { background: var(--accent); color: var(--on-accent, #fff); }
.name-say { position: relative; width: fit-content; max-width: 100%; margin: 0 auto 4px; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 16px; background: var(--accent-soft, #F6E1DC); font-weight: 700; text-align: center; }
.name-say::before { content: ""; position: absolute; left: 50%; top: -8px; width: 12px; height: 12px; background: inherit; border-left: 2px solid var(--ink); border-top: 2px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
.name-say.is-pop { animation: sayPop .3s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes sayPop { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.name-say[hidden] { display: none; }

/* 關於頁：聯絡表單 */
.contact-form { max-width: 720px; margin: 0 auto; display: grid; gap: 16px; padding: 28px; background: var(--card); border: var(--frame); border-radius: var(--hand); box-shadow: 6px 6px 0 var(--ink); }
.contact-intro { text-align: center; color: var(--muted); margin-bottom: 4px; }
.contact-form .f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: grid; gap: 6px; font-weight: 700; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; font-weight: 400; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink); width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* 防機器人：真人看不到 */
.contact-form .f-actions { text-align: center; }
.contact-form button[disabled] { opacity: .6; cursor: wait; }
.form-msg { text-align: center; font-weight: 700; padding: 10px; border-radius: 12px; }
.form-msg.is-ok { background: #E3EFD9; color: #2E6B2E; }
.form-msg.is-err { background: var(--accent-soft); color: var(--accent); }

@media (max-width: 760px) {
  .banner-ph { aspect-ratio: 3 / 2; margin: 12px 12px 0; }
  .page-banner + .page-top { padding-top: 36px; }
  .contact-form { padding: 20px; }
  .contact-form .f-row { grid-template-columns: 1fr; }
  /* 手機（方案 B）：時間線貼在最左邊，年份變成卡片左上角的紅色小標籤，卡片幾乎用滿寬度 */
  .timeline .ms-item { grid-template-columns: 1fr; gap: 0; padding: 0 0 22px 26px; }
  .timeline .ms-item::before { left: 7px; top: 10px; bottom: -10px; }
  .timeline .ms-item::after { left: 0; top: 4px; width: 14px; height: 14px; }
  .ms-year { display: none; }
  .ms-card { position: relative; margin-top: 14px; }
  .ms-badge { display: inline-block; position: absolute; top: -16px; left: 14px; border: 2.5px solid var(--ink); padding: 2px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent, #fff); font: 800 .95rem / 1.3 "AHMEK", var(--font); letter-spacing: .04em; }
  .ms-gallery { aspect-ratio: auto; } /* 里程碑照片：手機也用正方形，整張圖完整顯示 */
  .ms-text { font-size: 1rem; }
  .ms-card { margin-left: 0; padding: 26px 14px 14px; } /* 上面留位置給年份標籤，不擋到圖 */
  .ms-card.has-img { grid-template-columns: 1fr; }
}

/* 商店頁標題：跟其他頁的區塊標題同一個樣式（中文大字 + 紅色英文小字） */
.h-site main.page { padding-bottom: 96px; }
.h-site .page-head { text-align: center; padding-top: 32px; }
.h-site .page-head h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 900; }
html[lang="zh-Hant"] body[data-page="shop"] .page-head h1::after {
  content: "MERCH"; display: block; margin-top: .45em; padding-left: .3em;
  font: 800 clamp(.8rem, 1vw, .95rem) / 1 "AHMEK", var(--font); letter-spacing: .3em; color: var(--accent);
}
html[lang="en"] body[data-page="shop"] .page-head h1 { font-family: "AHMEK", var(--font); font-weight: 800; }
.h-site body[data-page="shop"] .chips, body.h-site[data-page="shop"] .chips { justify-content: center; }

/* 中文語錄結尾是「，」「。」，標點右邊有空白會讓字看起來偏左；往右挪一點，看起來才置中 */
html[lang="zh-Hant"] .bubble .quote-text { display: inline-block; transform: translateX(.3em); }


/* 頁首選單：中文字看起來比英文大寫大，分別調整讓切換語言時大小一致（所有頁面共用） */
html[lang="zh-Hant"] .h-site .nav > a, html[lang="zh-Hant"] .drop-btn { font-size: 1.05rem; letter-spacing: .1em; }
html[lang="en"] .h-site .nav > a, html[lang="en"] .drop-btn { font-size: .98rem; letter-spacing: .06em; }
html[lang="zh-Hant"] .drop-menu a { font-size: .98rem; }
html[lang="en"] .drop-menu a { font-size: 1.05rem; }


/* 關於頁：最下面（聯絡表單之後）多留一點空間 */
body[data-page="about"] main { padding-bottom: 140px; }
@media (max-width: 760px) { body[data-page="about"] main { padding-bottom: 96px; } }

/* 角色卡：滑到或點開中間那張時，左右兩張變模糊（突顯中間） */
.car-track:has(.ccard[data-pos="center"]:hover) .ccard:is([data-pos="left"], [data-pos="right"]),
.car-track:has(.ccard.is-open) .ccard:is([data-pos="left"], [data-pos="right"]) { filter: blur(3px); opacity: .7; }
@media (max-width: 760px) { .car-track .ccard:is([data-pos="left"], [data-pos="right"]) { filter: blur(3px); opacity: .7; } } /* 手機：左右兩張一直是模糊的，不用等點開 */

/* 角色卡名字：中文跟英文一樣大；介紹字比標籤粗 */
.ccard-name > span:not(.ccard-en) { font-size: 1.3rem; }
.ccard-role { font-weight: 700; }
.ccard-traits li { font-weight: 400; }

/* ===== 關於頁：電腦版排版（1025px 以上；手機、iPad 不變） ===== */
@media (min-width: 1025px) {
  /* 自我介紹：內文大一點，跟大對話框比較平衡 */
  #about .about { font-size: 1.1rem; line-height: 1.9; max-width: 560px; }

  /* 為什麼叫 AHMEK：加寬，左邊故事、右邊互動 */
  #name .name-wrap { max-width: 980px; }
  .name-play { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; align-items: center; position: relative; padding: 14px 10px; }
  .name-play::after { content: ""; position: absolute; left: 50%; top: 18px; bottom: 18px; border-left: 2px dashed var(--line, #E5DDD2); }
  .name-play { grid-template-rows: 1fr auto auto auto 1fr; } /* 右邊互動上下置中 */
  .name-play > .name-text { grid-column: 1; grid-row: 1 / -1; align-self: center; font-size: 1.05rem; line-height: 1.9; }
  .name-play > .name-hint { display: none; }
  .name-play > .name-word { grid-column: 2; grid-row: 2; justify-self: center; }
  .name-play > .vowel-btns { grid-column: 2; grid-row: 3; justify-self: center; }
  .name-play > .name-say { grid-column: 2; grid-row: 4; justify-self: center; margin-top: 14px; }

  /* 里程碑：一排 4 張卡片，頂部一條橫線串起每年的圓點 */
  .timeline { max-width: 1200px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 24px; }
  .timeline .ms-item { display: flex; flex-direction: column; grid-row: auto; padding: 54px 0 0; }
  .timeline .ms-item::before { display: block; left: 0; right: -24px; top: 9px; bottom: auto; width: auto; height: 3px; } /* 橫線：接到下一張 */
  .timeline .ms-item:nth-child(4n)::before, .timeline .ms-item:last-child::before { right: 0; }
  .timeline .ms-item::after { left: 0; top: 2px; }
  .timeline .ms-year { position: absolute; left: 0; top: 24px; padding: 0; text-align: left; font-size: 1.25rem; }
  .timeline .ms-card { flex: 1; margin-left: 0; padding: 14px; gap: 12px; }
  .timeline .ms-card.has-img { grid-template-columns: 1fr; align-content: start; }
  .timeline .ms-badge { display: none; }
  .timeline .ms-card > img.ms-img { margin-bottom: 21px; } /* 單張照片沒有小圓點：留同樣的空間，標題才會跟旁邊對齊 */
  .timeline .ms-title { font-size: 1.05rem; }
  .timeline .ms-text { font-size: .95rem; line-height: 1.7; }
}
