/* TypeCard 人格卡 — 柔和新粗野風：奶油底、粗描邊、硬陰影、糖果色 */
:root {
  --bg: #FFF4E6; --bg2: #FFE7CC; --paper: #FFFDF8; --ink: #1F1B2E; --ink2: #4A4458; --muted: #7A7287;
  --pink: #FF6B8B; --yellow: #FFD43B; --violet: #7C6CFF; --mint: #3DDC97; --sky: #5EC8FF;
  --bw: 2.5px; --sh: 4px 4px 0 var(--ink); --sh-lg: 7px 7px 0 var(--ink); --r: 22px;
  --f-zh: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --f-d: "Bricolage Grotesque", "Noto Sans TC", system-ui, sans-serif;
  --ease: cubic-bezier(.34, 1.56, .64, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 16px/1.75 var(--f-zh); letter-spacing: .01em;
  background: var(--bg) radial-gradient(rgba(31, 27, 46, .09) 1.2px, transparent 1.3px) 0 0 / 22px 22px;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.3; letter-spacing: .01em; }
h1 { font-weight: 900; }
h2 { font-weight: 900; }
h3 { font-weight: 700; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 99; }
.skip:focus { left: 8px; }
kbd { font: 700 11px/1 var(--f-d); border: 1.5px solid currentColor; border-radius: 5px; padding: 2px 5px; opacity: .55; }
::selection { background: var(--yellow); }

/* ------------------------------------------------ 按鈕、貼紙 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  font: 700 16px/1 var(--f-zh); color: var(--ink); text-decoration: none; padding: 14px 22px;
  border: var(--bw) solid var(--ink); border-radius: 999px; background: var(--paper); box-shadow: var(--sh);
  transition: transform .15s var(--ease), box-shadow .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-pop { background: var(--yellow); }
.btn-pink { background: var(--pink); color: #fff; }
.btn-ghost { background: var(--paper); }
.btn-sm { padding: 9px 16px; font-size: 14px; box-shadow: 3px 3px 0 var(--ink); }
.btn-lg { padding: 18px 30px; font-size: 18px; }
.sticker {
  display: inline-block; margin: 0 0 14px; padding: 6px 14px; font-size: 14px; font-weight: 700;
  background: var(--mint); border: var(--bw) solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-2deg);
}
.text-link { font-weight: 700; text-decoration: underline; text-decoration-color: var(--pink); text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* ------------------------------------------------ 頁首、頁尾 */
.site-head { position: sticky; top: 0; z-index: 40; background: rgba(255, 244, 230, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: var(--bw) solid var(--ink); }
.head-in { display: flex; align-items: center; gap: 18px; height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 21px/1 var(--f-d); }
.logo small { font: 700 12px/1 var(--f-zh); margin-left: 5px; padding: 3px 6px; border-radius: 6px; background: var(--ink); color: var(--yellow); vertical-align: 3px; }
.logo-card { position: relative; width: 26px; height: 32px; }
.logo-card i { position: absolute; inset: 0; border: var(--bw) solid var(--ink); border-radius: 6px; background: var(--pink); transition: transform .35s var(--ease); }
.logo-card i + i { background: var(--yellow); transform: rotate(12deg) translate(4px, -2px); }
.logo:hover .logo-card i:first-child { transform: rotate(-16deg) translate(-4px, 0); }
.logo:hover .logo-card i + i { transform: rotate(22deg) translate(8px, -4px); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; }
.nav a:hover, .nav a[aria-current] { background: var(--ink); color: var(--paper); }
@media (max-width: 760px) {
  .nav { display: none; }
  .head-cta { margin-left: auto; }
}
.site-foot { margin-top: 80px; border-top: var(--bw) solid var(--ink); background: var(--ink); color: #EDE9F5; padding: 48px 0 30px; }
.site-foot a { color: #EDE9F5; text-decoration: none; display: block; padding: 3px 0; font-size: 14px; }
.site-foot a:hover { color: var(--yellow); }
.site-foot .logo { color: #fff; display: inline-flex; font-size: 21px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 2fr 1fr; gap: 28px; }
.foot-brand p { font-size: 14px; opacity: .75; }
.foot-h { font-size: 13px; letter-spacing: .12em; color: var(--yellow); margin: 0 0 10px; }
.foot-type-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
.disclaimer, .copy { font-size: 12.5px; opacity: .6; margin: 28px 0 0; }
.copy { margin-top: 8px; }
.boba { display: inline-block; animation: wobble 2.4s ease-in-out infinite; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand, .foot-types { grid-column: 1 / -1; } }

/* ------------------------------------------------ 首頁 Hero */
.hero { padding: 30px 0 36px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1fr minmax(0, 480px); gap: 48px; align-items: start; }
.hero h1 { font-size: clamp(30px, 4.6vw, 54px); margin: 0 0 16px; }
.hl { display: inline; background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%); padding: 0 2px; }
.lead { font-size: 18px; color: var(--ink2); margin: 0 0 18px; }
.lead b { color: var(--ink); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.hero-meta li { padding: 6px 14px; border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--paper); font-size: 14px; font-weight: 500; }
.hero-meta b { font: 800 18px/1 var(--f-d); margin-right: 3px; }
.deck { position: relative; height: 300px; margin-top: 26px; }
.deck-card {
  position: absolute; left: 50%; top: 20px; width: 150px; height: 210px; margin-left: -75px; padding: 12px; cursor: pointer;
  border: var(--bw) solid var(--ink); border-radius: 18px; box-shadow: var(--sh);
  background: linear-gradient(160deg, var(--c2), #fff 70%); display: flex; flex-direction: column; align-items: center;
  transition: transform .45s var(--ease); animation: float 5s ease-in-out infinite;
}
.deck-card b { font: 800 26px/1 var(--f-d); margin-top: 6px; color: var(--c); -webkit-text-stroke: 1px var(--ink); }
.deck-card small { font-weight: 700; font-size: 13px; }
.deck-art { width: 110px; height: 110px; }
.deck-card.d0 { --r: -18deg; --x: -190px; z-index: 1; animation-delay: -1s; }
.deck-card.d1 { --r: -8deg; --x: -95px; z-index: 2; animation-delay: -2s; }
.deck-card.d2 { --r: 0deg; --x: 0px; z-index: 5; top: 6px; animation-delay: -3s; }
.deck-card.d3 { --r: 9deg; --x: 95px; z-index: 2; animation-delay: -4s; }
.deck-card.d4 { --r: 18deg; --x: 190px; z-index: 1; animation-delay: -.5s; }
.deck-card { transform: translateX(var(--x)) rotate(var(--r)); }
.deck:hover .deck-card { transform: translateX(calc(var(--x) * 1.18)) translateY(-8px) rotate(calc(var(--r) * 1.25)); }
.deck .deck-card:hover { transform: translateX(calc(var(--x) * 1.18)) translateY(-26px) rotate(0deg) scale(1.06); z-index: 9; }
.deck.shuffle .deck-card { animation: shuffle .7s var(--ease); }
@keyframes float { 50% { translate: 0 -10px; } }
@keyframes shuffle { 40% { transform: translateX(0) rotate(0) scale(.9); } }
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; gap: 18px; }
  .deck { display: none; }
  .hero { padding-top: 18px; }
  .hero h1 { margin-bottom: 10px; }
  .lead { font-size: 16px; margin-bottom: 12px; }
  .hero-meta { display: none; }
  .hero .sticker { margin-bottom: 10px; font-size: 13px; }
}

/* ------------------------------------------------ 測驗卡 */
.quiz-wrap { position: relative; scroll-margin-top: 80px; margin-top: 44px; }
.quiz {
  position: relative; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 28px; box-shadow: var(--sh-lg);
  padding: 22px 22px 16px;
}
.quiz::before, .quiz::after { content: ""; position: absolute; inset: 0; border: var(--bw) solid var(--ink); border-radius: 28px; background: var(--paper); z-index: -1; }
.quiz::before { transform: rotate(3deg) translate(6px, 4px); background: var(--pink); }
.quiz::after { transform: rotate(-2.5deg) translate(-4px, 8px); background: var(--sky); z-index: -2; }
.quiz-top { display: flex; align-items: center; gap: 12px; }
.q-count { font: 800 15px/1 var(--f-d); white-space: nowrap; }
.q-count b { font-size: 22px; }
.bar { position: relative; flex: 1; height: 14px; border: var(--bw) solid var(--ink); border-radius: 99px; background: #fff; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--pink), var(--yellow)); transition: width .4s var(--ease); }
.bar-runner { position: absolute; top: -17px; left: 0; font-size: 18px; transform: translateX(-50%) scaleX(-1); transition: left .4s var(--ease); }
.q-back { width: 36px; height: 36px; border: var(--bw) solid var(--ink); border-radius: 50%; background: var(--paper); font-weight: 900; cursor: pointer; }
.q-back:disabled { opacity: .3; cursor: default; }
.q-stage { min-height: 132px; display: flex; align-items: center; padding: 18px 2px 4px; overflow: hidden; }
.q-text { margin: 0; font-size: clamp(20px, 2.4vw, 24px); font-weight: 700; line-height: 1.55; }
.q-text.out { animation: qout .22s ease-in forwards; }
.q-text.in { animation: qin .38s var(--ease); }
.q-text.in-back { animation: qinback .38s var(--ease); }
@keyframes qout { to { opacity: 0; transform: translateX(-40px) rotate(-2deg); } }
@keyframes qin { from { opacity: 0; transform: translateX(50px) rotate(2deg); } }
@keyframes qinback { from { opacity: 0; transform: translateX(-50px); } }
.q-hint { margin: 2px 0 10px; font-size: 13px; color: var(--muted); font-weight: 500; }
.opts { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; cursor: pointer; text-align: left;
  font: 700 16px/1.2 var(--f-zh); color: var(--ink); background: #fff; border: var(--bw) solid var(--ink); border-radius: 16px;
  transition: transform .14s var(--ease), background .14s, box-shadow .14s; box-shadow: 0 0 0 var(--ink);
}
.opt kbd { margin-left: auto; }
@media (hover: none) { .opt kbd { display: none; } }
.opt-dot { margin-inline: calc((22px - var(--s)) / 2); }
.opt-dot { flex: none; border: var(--bw) solid var(--ink); border-radius: 50%; background: var(--dot); width: var(--s); height: var(--s); transition: transform .2s var(--ease); }
.o0 { --dot: #3DDC97; --s: 22px; } .o1 { --dot: #A6EFCB; --s: 18px; } .o2 { --dot: #E4E0EA; --s: 14px; } .o3 { --dot: #FFC2CF; --s: 18px; } .o4 { --dot: #FF6B8B; --s: 22px; }
.opt:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.opt:hover .opt-dot { transform: scale(1.25) rotate(20deg); }
.opt.picked { background: var(--dot); transform: scale(.97); }
.opt.picked .opt-dot { background: #fff; transform: scale(1.3); }
.opt.was { box-shadow: inset 0 0 0 3px var(--dot); }
.buddy { position: absolute; top: -58px; right: 26px; width: 74px; height: 74px; z-index: 3; transform-origin: 50% 100%; }
.buddy .mascot { width: 74px; height: 74px; }
.buddy.hop { animation: hop .45s var(--ease); }
.buddy.swap { animation: swap .6s var(--ease); }
.buddy-say { position: absolute; right: 80px; top: 6px; white-space: nowrap; padding: 5px 10px; font-size: 13px; font-weight: 700; background: #fff; border: 2px solid var(--ink); border-radius: 12px 12px 2px 12px; box-shadow: 2px 2px 0 var(--ink); opacity: 0; transform: translateY(6px) scale(.9); transition: .3s var(--ease); pointer-events: none; }
.buddy-say.on { opacity: 1; transform: none; }
@keyframes hop { 40% { transform: translateY(-16px) scaleY(1.06); } 70% { transform: translateY(0) scaleY(.92); } }
@keyframes swap { 0% { transform: scale(1); } 45% { transform: scale(0) rotate(-90deg); } 100% { transform: scale(1) rotate(0); } }
.q-foot { margin: 12px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.returning[hidden] { display: none; }
.returning { margin: -24px 0 70px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; background: var(--paper); border: var(--bw) dashed var(--ink); border-radius: 18px; font-size: 14px; }
.returning .mascot { width: 46px; height: 46px; flex: none; }
.returning a { font-weight: 700; }
.quiz.done .opts, .quiz.done .q-hint { visibility: hidden; }

/* 顯影中 */
.developing { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--paper); border-radius: 26px; text-align: center; padding: 20px; }
.developing p { margin: 0; font-weight: 700; min-height: 1.8em; }
.dev-card { width: 130px; height: 180px; border: var(--bw) solid var(--ink); border-radius: 16px; background: #fff; padding: 10px; box-shadow: var(--sh); animation: devshake 1.6s ease-in-out infinite; }
.dev-film { width: 100%; height: 72%; border-radius: 8px; background: linear-gradient(120deg, #3a3346, #8b7fa3, #f3d9e4, #3a3346); background-size: 300% 300%; animation: develop 2s ease-in-out infinite; }
@keyframes develop { 50% { background-position: 100% 50%; } }
@keyframes devshake { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }

/* ------------------------------------------------ 區塊 */
.sec { padding: 64px 0 0; }
.sec-tint { margin-top: 64px; padding: 56px 0; background: var(--bg2); border-block: var(--bw) solid var(--ink); }
.sec-tint + .sec { padding-top: 64px; }
.sec-h { font-size: clamp(25px, 3.2vw, 36px); margin: 0 0 12px; text-align: center; }
.sec-sub { max-width: 720px; margin: 0 auto 28px; text-align: center; color: var(--ink2); }
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { position: relative; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: var(--r); padding: 26px 22px 20px; box-shadow: var(--sh); }
.steps li:nth-child(2) { transform: rotate(1deg); } .steps li:nth-child(3) { transform: rotate(-1deg); }
.steps h3 { margin: 6px 0 8px; font-size: 19px; }
.steps p { margin: 0; color: var(--ink2); font-size: 15px; }
.step-n { position: absolute; top: -18px; left: 18px; width: 38px; height: 38px; display: grid; place-items: center; font: 800 20px/1 var(--f-d); border: var(--bw) solid var(--ink); border-radius: 50%; background: var(--yellow); }
.steps li:nth-child(2) .step-n { background: var(--pink); color: #fff; } .steps li:nth-child(3) .step-n { background: var(--mint); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

/* 迷你卡 */
.mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mini-grid.g2 { grid-template-columns: repeat(2, 1fr); max-width: 640px; margin-bottom: 8px; }
.mini-card {
  position: relative; display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto 1fr; column-gap: 12px; align-items: center;
  padding: 14px; text-decoration: none; background: linear-gradient(150deg, color-mix(in srgb, var(--c2) 60%, #fff), #fff 75%);
  border: var(--bw) solid var(--ink); border-radius: 18px; box-shadow: var(--sh); transition: transform .2s var(--ease), box-shadow .2s;
}
.mini-card:hover { transform: translate(-3px, -4px) rotate(-1deg); box-shadow: 7px 8px 0 var(--ink); }
.mini-card:hover .mascot { animation: wiggle .5s ease; }
.mini-art { grid-row: 1 / 4; width: 64px; height: 64px; }
.mini-code { font: 800 22px/1.1 var(--f-d); color: var(--c); -webkit-text-stroke: .8px var(--ink); }
.mini-name { font-weight: 900; font-size: 15px; }
.mini-short { grid-column: 1 / -1; margin-top: 8px; font-size: 13px; line-height: 1.55; color: var(--ink2); }
@media (max-width: 960px) { .mini-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .mini-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .mini-card { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 12px 10px; } .mini-art { grid-row: auto; width: 60px; height: 60px; } .mini-short { display: none; } .mini-grid.g2 { grid-template-columns: 1fr 1fr; } }

/* 四維度 */
.axes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.axis-card { background: var(--paper); border: var(--bw) solid var(--ink); border-radius: var(--r); padding: 18px; box-shadow: var(--sh); }
.axis-card h3 { margin: 12px 0 6px; font-size: 18px; }
.axis-card p { margin: 0; font-size: 14.5px; color: var(--ink2); }
.axis-pair { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13px; font-weight: 700; }
.axis-pair b { font: 800 22px/1 var(--f-d); width: 34px; height: 34px; display: grid; place-items: center; border: var(--bw) solid var(--ink); border-radius: 10px; background: var(--yellow); }
.axis-pair b + span + i + b { background: var(--sky); }
.axis-pair i { font-style: normal; color: var(--muted); margin: 0 4px; }
.axis-card:nth-child(2) .axis-pair b:first-child { background: var(--mint); } .axis-card:nth-child(2) .axis-pair b + span + i + b { background: var(--pink); }
.axis-card:nth-child(3) .axis-pair b:first-child { background: #C8BEFF; } .axis-card:nth-child(3) .axis-pair b + span + i + b { background: #FFB98A; }
.axis-card:nth-child(4) .axis-pair b:first-child { background: #9BE3FF; } .axis-card:nth-child(4) .axis-pair b + span + i + b { background: #FFE38A; }
@media (max-width: 960px) { .axes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .axes { grid-template-columns: 1fr; } }

/* 特色、FAQ、CTA */
.feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 26px; }
.feat { background: var(--paper); border: var(--bw) solid var(--ink); border-radius: var(--r); padding: 20px; box-shadow: var(--sh); transition: transform .2s var(--ease); }
.feat:hover { transform: rotate(-1.5deg) translateY(-4px); }
.feat h3 { margin: 10px 0 6px; font-size: 18px; }
.feat p { margin: 0; font-size: 14.5px; color: var(--ink2); }
.feat-ic { display: grid; place-items: center; width: 48px; height: 48px; font-size: 24px; border: var(--bw) solid var(--ink); border-radius: 14px; }
.f1 .feat-ic { background: var(--yellow); } .f2 .feat-ic { background: var(--sky); } .f3 .feat-ic { background: var(--pink); } .f4 .feat-ic { background: var(--mint); }
@media (max-width: 960px) { .feats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .feats { grid-template-columns: 1fr; } }
.faq { max-width: 820px; }
.faq-item { background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 18px; padding: 16px 20px; margin: 12px 0; }
.faq-item h3 { margin: 0 0 6px; font-size: 17px; }
.faq-item h3::before { content: "Q"; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; font: 800 14px/1 var(--f-d); background: var(--yellow); border: 2px solid var(--ink); border-radius: 7px; vertical-align: 1px; }
.faq-item p { margin: 0; color: var(--ink2); font-size: 15px; }
.cta-card {
  position: relative; text-align: center; padding: 42px 22px; border: var(--bw) solid var(--ink); border-radius: 30px; box-shadow: var(--sh-lg); overflow: hidden;
  background: linear-gradient(135deg, var(--c2, #FFD1DC), var(--paper) 55%, var(--c2, #C9F2E0));
}
.cta-card h2 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 32px); }
.cta-card p { margin: 0 0 22px; color: var(--ink2); }

/* ------------------------------------------------ 內頁共用 */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 20px; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--ink2); }
.page-hero { padding: 26px 0 10px; }
.page-hero > * { max-width: 860px; }
.page-hero h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 14px; }
.fam { margin-top: 44px; }
.fam-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.fam-head h2 { margin: 0; font-size: 26px; }
.fam-head h2 small { margin-left: 8px; font: 800 14px/1 var(--f-d); padding: 4px 8px; border: 2px solid var(--ink); border-radius: 8px; vertical-align: 4px; }
.fam-NT h2 small { background: #C8BEFF; } .fam-NF h2 small { background: #A6EFCB; } .fam-SJ h2 small { background: #9BE3FF; } .fam-SP h2 small { background: #FFE38A; }
.fam-head p { margin: 0; color: var(--ink2); }

/* 類型頁 */
.type-hero { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: center; padding: 24px 0 18px; }
.type-hero h1 { font-size: clamp(30px, 4.4vw, 50px); margin: 0 0 12px; }
.type-code { color: var(--c); -webkit-text-stroke: 1.5px var(--ink); font-family: var(--f-d); font-weight: 800; letter-spacing: .02em; }
.letters { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.letters li { background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 16px; padding: 10px; text-align: center; font-weight: 700; font-size: 14px; }
.letters b { display: block; font: 800 26px/1.1 var(--f-d); color: var(--c); -webkit-text-stroke: 1px var(--ink); }
.letters span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.type-hero-card { position: relative; }
.holo-tip { text-align: center; font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
@media (max-width: 860px) {
  .type-hero { grid-template-columns: 1fr; gap: 26px; }
  .type-hero-card { max-width: 270px; margin: 0 auto; }
  .holo-tip { display: none; }
}
@media (max-width: 480px) { .letters { grid-template-columns: repeat(2, 1fr); } }
.toc { position: sticky; top: 62px; z-index: 30; display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; margin-top: 16px; scrollbar-width: none; background: linear-gradient(var(--bg) 80%, transparent); }
.toc::-webkit-scrollbar { display: none; }
.toc a { flex: none; padding: 7px 14px; border: 2px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 700; text-decoration: none; background: var(--paper); }
.toc a:hover { background: var(--yellow); }
.article { max-width: 780px; }
.article h2 { font-size: clamp(23px, 2.8vw, 30px); margin: 52px 0 14px; scroll-margin-top: 130px; position: relative; padding-left: 18px; }
.article h2::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 7px; border-radius: 4px; background: var(--c, var(--pink)); border: 2px solid var(--ink); }
.article section { scroll-margin-top: 120px; }
.article h3 { font-size: 19px; margin: 26px 0 8px; }
.article p, .article li { font-size: 17px; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin: 6px 0; }
.prose h1 { font-size: clamp(28px, 4vw, 42px); margin: 26px 0 14px; }
.pull { margin: 26px 0; padding: 22px 24px; font-size: 21px !important; font-weight: 900; line-height: 1.55; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 22px; box-shadow: var(--sh); transform: rotate(-1deg); }
.pull span { display: block; margin-top: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two-col > div { background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 20px; padding: 6px 20px 12px; }
.two-col h3 { margin-top: 14px; }
.two-col li { font-size: 15.5px !important; }
.pros h3::before { content: "＋ "; color: #1F9D63; } .cons h3::before { content: "－ "; color: #E0405E; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }
.tip { padding: 16px 20px; background: color-mix(in srgb, var(--c2, #FFE38A) 45%, #fff); border: var(--bw) solid var(--ink); border-radius: 18px; }
.tip b { display: block; margin-bottom: 4px; }
.chips { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { margin: 0; padding: 6px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font-size: 15px !important; font-weight: 500; }
.scenes { list-style: none; padding: 0 !important; counter-reset: s; display: grid; gap: 10px; }
.scenes li { counter-increment: s; position: relative; margin: 0; padding: 14px 16px 14px 56px; background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; }
.scenes li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 28px; height: 28px; display: grid; place-items: center; font: 800 15px/1 var(--f-d); border: 2px solid var(--ink); border-radius: 50%; background: var(--c2, var(--yellow)); }
.scenes li:nth-child(odd) { transform: rotate(-.4deg); } .scenes li:nth-child(even) { transform: rotate(.4deg); }
.growth { list-style: none; padding: 0 !important; }
.growth li { padding-left: 30px; position: relative; }
.growth li::before { content: "🌱"; position: absolute; left: 0; }
.updated { margin-top: 40px; font-size: 13px !important; color: var(--muted); }
.pn { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; font-weight: 700; font-size: 15px; }
.pn a { text-decoration: none; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); }
.pn a:hover { background: var(--yellow); }
.lost { text-align: center; padding: 60px 0; }
.lost-art { width: 180px; margin: 0 auto; animation: float 3s ease-in-out infinite; }
.lost .hero-actions { justify-content: center; }

/* ------------------------------------------------ 吉祥物 */
.mascot { display: block; width: 100%; height: auto; overflow: visible; }
.mascot .m-eyes { transform-box: fill-box; transform-origin: center; animation: blink 5.5s infinite; }
.mascot .m-body { transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes wiggle { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes wobble { 50% { transform: rotate(-12deg) translateY(-2px); } }
@keyframes bob { 50% { transform: translateY(-6px) scaleY(1.03); } }

/* ------------------------------------------------ 全息人格卡 */
.holo { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; position: relative; perspective: 900px; width: 100%; max-width: 340px; margin: 0 auto; }
.holo-in {
  position: relative; aspect-ratio: 5 / 7.2; padding: 16px 18px; display: flex; flex-direction: column; align-items: center; text-align: center;
  border: 3px solid var(--ink); border-radius: 26px; box-shadow: 8px 10px 0 var(--ink); overflow: hidden;
  background: radial-gradient(circle at 50% 34%, #fff 0 26%, transparent 60%), linear-gradient(165deg, var(--c2), #fff 50%, var(--c2));
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s var(--ease);
}
.holo.live .holo-in { transition: none; }
.holo-shine {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: 0; transition: opacity .3s;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .85), transparent 38%),
    repeating-linear-gradient(115deg, #ff7eb3 0%, #ffd56b 6%, #7cf0c5 12%, #7aa8ff 18%, #d38bff 24%, #ff7eb3 30%);
  background-size: 100% 100%, 260% 260%; background-position: center, var(--mx) var(--my);
}
.holo.live .holo-shine { opacity: .9; }
.holo:not(.live) .holo-shine { opacity: .45; animation: sheen 7s ease-in-out infinite; }
@keyframes sheen { 50% { background-position: center, 100% 80%; } }
.holo-top { width: 100%; display: flex; justify-content: space-between; font: 800 13px/1 var(--f-d); }
.holo-fam { font-family: var(--f-zh); font-weight: 700; padding: 3px 8px; border: 2px solid var(--ink); border-radius: 99px; background: #fff; font-size: 12px; }
.holo-art { width: 56%; margin: 6px 0 0; animation: bob 3.2s ease-in-out infinite; }
.holo-code { font: 800 clamp(40px, 9vw, 58px)/1 var(--f-d); color: var(--c); -webkit-text-stroke: 2px var(--ink); letter-spacing: .03em; margin-top: 2px; }
.holo-name { font-weight: 900; font-size: 19px; margin: 2px 0 8px; }
.holo-kw { list-style: none; padding: 0; margin: 0 0 8px; display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.holo-kw li { font-size: 12px; font-weight: 700; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 99px; background: #fff; }
.holo-line { margin: 0; font-size: 13.5px; font-weight: 700; line-height: 1.5; color: var(--ink2); }
.holo-foot { margin-top: auto; width: 100%; display: flex; justify-content: space-between; font: 700 11.5px/1 var(--f-d); color: var(--ink2); padding-top: 8px; }

/* ------------------------------------------------ 結果頁 */
.result, .pair { padding-top: 26px; min-height: 60vh; }
.result-h { text-align: center; font-size: clamp(26px, 3.6vw, 38px); margin: 6px 0 22px; }
.result-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 0; font-weight: 700; }
.res-grid { display: grid; grid-template-columns: 360px 1fr; gap: 44px; align-items: start; }
.res-card { position: sticky; top: 86px; }
@media (max-width: 860px) { .res-grid { grid-template-columns: 1fr; gap: 28px; } .res-card { position: static; max-width: 330px; margin: 0 auto; width: 100%; } }
.res-panel { background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 24px; padding: 22px; box-shadow: var(--sh); margin-bottom: 20px; }
.res-panel h2 { margin: 0 0 14px; font-size: 21px; }
.res-panel p { margin: 0 0 10px; }
.meter { margin: 14px 0 16px; }
.meter-top { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; margin-bottom: 5px; }
.meter-top .on { color: var(--ink); } .meter-top .off { color: var(--muted); font-weight: 500; }
.meter-bar { position: relative; height: 18px; border: var(--bw) solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; }
.meter-bar i { position: absolute; top: 0; bottom: 0; width: 0; background: var(--c); transition: width 1.1s var(--ease); }
.meter-bar i.l { left: 0; } .meter-bar i.r { right: 0; }
.meter-bar b { position: absolute; top: 50%; transform: translate(-50%, -50%); font: 800 12px/1 var(--f-d); background: var(--ink); color: #fff; padding: 2px 6px; border-radius: 99px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions .btn { width: 100%; font-size: 15px; padding: 13px 10px; }
.actions .wide { grid-column: 1 / -1; }
.nick { display: flex; gap: 8px; align-items: center; margin: 12px 0 0; font-size: 14px; }
.nick input { flex: 1; min-width: 0; font: 500 15px var(--f-zh); padding: 10px 14px; border: var(--bw) solid var(--ink); border-radius: 12px; background: #fff; }
.small { font-size: 13px; color: var(--muted); }
.res-links { display: flex; flex-wrap: wrap; gap: 10px; }
.someone { text-align: center; margin: -8px 0 20px; font-weight: 700; }
.compat { text-align: center; }
.compat-duo { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 6px 0 14px; }
.compat-duo .who { width: 120px; text-align: center; font-weight: 700; font-size: 14px; }
.compat-duo .who .mascot { width: 96px; margin: 0 auto; animation: bob 3s ease-in-out infinite; }
.compat-duo .who:last-child .mascot { animation-delay: -1.5s; }
.compat-duo .who b { display: block; font: 800 24px/1.1 var(--f-d); color: var(--c); -webkit-text-stroke: 1px var(--ink); }
.compat-heart { font-size: 34px; animation: beat 1.1s ease-in-out infinite; }
@keyframes beat { 15%, 45% { transform: scale(1.25); } 30% { transform: scale(1); } }
.compat-total { font: 800 64px/1 var(--f-d); margin: 6px 0; }
.compat-total small { font-size: 26px; }
.compat-label { display: inline-block; padding: 4px 14px; border: 2px solid var(--ink); border-radius: 99px; background: var(--yellow); font-weight: 900; margin-bottom: 16px; }
.scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 18px; }
.scores div { border: var(--bw) solid var(--ink); border-radius: 16px; padding: 12px 6px; background: #fff; }
.scores b { display: block; font: 800 28px/1.1 var(--f-d); }
.scores span { font-size: 13px; font-weight: 700; }
.compat-notes { text-align: left; list-style: none; padding: 0; margin: 0; }
.compat-notes li { padding: 10px 0 10px 34px; position: relative; border-top: 2px dashed #E4DED0; }
.compat-notes li::before { content: attr(data-i); position: absolute; left: 0; top: 10px; }

/* ------------------------------------------------ 小互動：toast、彩帶、彩蛋 */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; max-width: calc(100% - 32px); padding: 12px 18px; font-weight: 700; font-size: 15px;
  background: var(--ink); color: #fff; border-radius: 16px; box-shadow: 4px 4px 0 var(--pink);
  transform: translate(-50%, 140%); transition: transform .45s var(--ease);
}
.toast.show { transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; }
.peek { position: fixed; right: 18px; bottom: -220px; z-index: 92; width: 170px; transition: bottom .6s var(--ease); pointer-events: none; }
.peek.show { bottom: -30px; }
.peek .bubble { position: absolute; bottom: 150px; right: 40px; width: 210px; padding: 10px 12px; font-size: 13.5px; font-weight: 700; background: #fff; border: var(--bw) solid var(--ink); border-radius: 16px; box-shadow: 3px 3px 0 var(--ink); }
.reveal .holo-in { animation: flipin 1.1s var(--ease) both; }
@keyframes flipin { 0% { transform: rotateY(180deg) scale(.6); filter: brightness(.2) blur(6px); } 55% { filter: brightness(.7) blur(1px); } 100% { transform: rotateY(0) scale(1); filter: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* 人格卡圖片彈窗 */
.card-modal { position: fixed; inset: 0; z-index: 98; display: grid; place-items: center; padding: 16px; background: rgba(31, 27, 46, .72); backdrop-filter: blur(6px); animation: fadein .25s ease; }
.card-modal-in { position: relative; width: min(420px, 100%); max-height: calc(100vh - 32px); overflow: auto; text-align: center; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 26px; padding: 18px; box-shadow: var(--sh-lg); animation: popin .45s var(--ease); }
.card-modal-in img { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: contain; border-radius: 16px; border: 2px solid var(--ink); }
.card-modal .res-links { justify-content: center; }
.card-x { position: absolute; top: 8px; right: 8px; z-index: 2; width: 38px; height: 38px; border: var(--bw) solid var(--ink); border-radius: 50%; background: var(--yellow); font-size: 22px; font-weight: 900; line-height: 1; cursor: pointer; }
@keyframes fadein { from { opacity: 0; } }
@keyframes popin { from { opacity: 0; transform: scale(.8) rotate(-3deg); } }
