:root {
  color-scheme: light;
  --bg-main: #f8f3ff;
  --bg-secondary: #fff7fb;
  --purple-soft: #e8d7ff;
  --pink-soft: #f4d7ea;
  --purple-main: #c7a7f2;
  --purple-deep: #8e6dcc;
  --text-main: #362d47;
  --glass-bg: rgba(255, 255, 255, .62);
  --glass-border: rgba(199, 167, 242, .34);
  --bg: var(--bg-main);
  --surface: var(--glass-bg);
  --surface-strong: rgba(255, 255, 255, .92);
  --ink: var(--text-main);
  --muted: #746a82;
  --purple: var(--purple-deep);
  --purple-dark: #684d8e;
  --blue: #8bc9eb;
  --pink: #e8a9ce;
  --gold: #b89558;
  --green: #69a987;
  --red: #c16b72;
  --line: var(--glass-border);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 20px 55px rgba(105, 76, 135, .1), inset 0 1px 0 rgba(255, 255, 255, .72);
  --shadow-hover: 0 26px 70px rgba(117, 82, 154, .17), 0 0 42px rgba(199, 167, 242, .18);
  --container: 1160px;
  --gutter: clamp(14px, 3vw, 32px);
  --section: clamp(16px, 2.5vw, 26px);
  --bottom-nav: 82px;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  padding-bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 8% 4%, rgba(232, 215, 255, .78), transparent 31rem),
    radial-gradient(circle at 93% 12%, rgba(244, 215, 234, .64), transparent 34rem),
    radial-gradient(circle at 65% 82%, rgba(210, 231, 255, .44), transparent 38rem),
    linear-gradient(145deg, var(--bg-main), #f4f7ff 52%, var(--bg-secondary));
  color: var(--ink);
  font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  line-height: 1.65;
}
body::before { position: fixed; inset: 0; z-index: -2; background-image: radial-gradient(rgba(132,98,165,.14) .65px, transparent .65px); background-size: 24px 24px; content: ""; opacity: .22; }
.site-aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.site-aurora span { position: absolute; width: min(42vw, 620px); aspect-ratio: 1; border-radius: 50%; filter: blur(72px); opacity: .2; animation: aurora-drift 18s ease-in-out infinite alternate; }
.site-aurora span:nth-child(1) { top: -18%; left: 8%; background: var(--purple-main); }
.site-aurora span:nth-child(2) { top: 18%; right: -15%; background: var(--pink-soft); animation-delay: -7s; }
.site-aurora span:nth-child(3) { bottom: -24%; left: 42%; background: #bfe4f7; animation-delay: -12s; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 7px; padding: 0; font-weight: 800; }
:focus-visible { outline: 3px solid rgba(118,185,223,.42); outline-offset: 3px; }
[hidden] { display: none; }

.site-main, .support-footer { width: min(var(--container), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.site-main { padding-block: clamp(76px, 9vw, 104px) 30px; }
.site-brand { position: absolute; top: 14px; left: var(--gutter); z-index: 30; display: inline-flex; height: 54px; align-items: center; gap: 9px; color: var(--purple-dark); font-size: 18px; font-weight: 900; text-decoration: none; }
.site-brand img { width: 52px; height: 52px; object-fit: contain; }

.app-nav { position: fixed; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); left: 8px; z-index: 1000; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 520px; min-height: 68px; margin: auto; padding: 6px; border: 1px solid rgba(255,255,255,.82); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(244,235,255,.65)); box-shadow: 0 16px 45px rgba(88,61,117,.16), inset 0 1px 0 white; backdrop-filter: blur(22px) saturate(135%); }
.nav-btn { position: relative; display: flex; min-width: 0; min-height: 54px; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 16px; color: var(--muted); font-size: 11px; font-weight: 800; text-decoration: none; }
.nav-btn img { width: 28px; height: 28px; object-fit: contain; }
.nav-btn:hover, .nav-btn.active { background: linear-gradient(135deg, rgba(244,215,234,.55), rgba(232,215,255,.58)); color: var(--purple-dark); transform: translateY(-1px); }
.nav-btn.active::after { position: absolute; right: 18px; bottom: 3px; left: 18px; height: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--pink), var(--blue)); content: ""; }

.home-page, .tool-page, .time-page, .data-page, .events-page, .shop-page, .duel-page, .family-page { display: grid; gap: var(--section); min-width: 0; }
.glass-card, .mystic-panel, .search-shell, .info-card, .speed-card, .event-card, .arena-card, .battle-controls, .battle-result, .round-log, .market-toolbar, .featured-strip, .product-card, .empty-state, .event-panel, .seo-copy, .notice-bar {
  border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(248,241,255,.46)); box-shadow: var(--shadow); backdrop-filter: blur(20px) saturate(125%);
}
.page-hero, .shop-hero, .home-hero { position: relative; isolation: isolate; overflow: hidden; border: 1px solid rgba(255,255,255,.9); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(242,230,255,.68) 48%, rgba(235,244,255,.66)); box-shadow: 0 28px 80px rgba(102,72,132,.13), inset 0 1px 0 rgba(255,255,255,.95); backdrop-filter: blur(22px) saturate(125%); }
.page-hero, .shop-hero { padding: clamp(24px, 5vw, 48px); }
.page-hero::after, .shop-hero::after { position: absolute; top: -95px; right: -65px; z-index: -1; width: 270px; height: 270px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.78), rgba(199,167,242,.38) 34%, rgba(244,215,234,.3) 58%, transparent 72%); content: ""; animation: breathe 9s ease-in-out infinite; }
.eyebrow { margin: 0 0 7px; color: var(--purple); font-size: 12px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.page-hero h1, .shop-hero h1 { margin: 0; font-size: clamp(34px, 6vw, 58px); line-height: 1.1; letter-spacing: -.03em; }
.page-hero > p:last-child, .shop-hero > p { max-width: 680px; margin: 12px 0 0; color: var(--muted); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-heading h2, .section-heading h3 { margin: 0; line-height: 1.25; }
.section-heading > span { color: var(--purple); font-size: 13px; font-weight: 800; }

.ad-zone { width: 100%; clear: both; margin: 20px 0; text-align: center; }
.ad-zone:empty { display: none; margin: 0; }
.ad-zone ins.adsbygoogle { display: block; width: 100%; }
.ad-protected { position: relative; }

/* 首頁 */
.notice-bar { overflow: hidden; }
.notice-track { display: flex; width: max-content; gap: 42px; padding: 10px 20px; color: var(--purple-dark); font-size: 13px; font-weight: 800; white-space: nowrap; animation: notice-scroll 28s linear infinite; }
.notice-track span::before { color: var(--gold); content: "◆ "; }
.home-hero { --hero-depth: 0px; --hero-scale: 1; --hero-opacity: 1; display: grid; min-height: 520px; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); align-items: center; gap: 28px; padding: clamp(28px, 5vw, 60px); background: linear-gradient(132deg, rgba(255,255,255,.86), rgba(245,233,255,.7) 43%, rgba(255,235,247,.64) 72%, rgba(232,244,255,.7)); }
.hero-webgl, .hero-mist { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-webgl { z-index: 0; opacity: .82; }
.hero-mist { z-index: 1; background: radial-gradient(circle at 72% 38%, rgba(255,255,255,.7), transparent 25%), linear-gradient(105deg, rgba(255,255,255,.52), transparent 44%, rgba(227,207,255,.2)); mix-blend-mode: screen; animation: mist-drift 12s ease-in-out infinite alternate; }
.hero-copy, .hero-visual { z-index: 2; opacity: var(--hero-opacity); transform: translate3d(0,var(--hero-depth),0) scale(var(--hero-scale)); transform-origin: center; transition: opacity .12s linear, transform .12s linear; }
.hero-copy { position: relative; }
.home-hero h1 { margin: 0; color: var(--ink); font-size: clamp(56px, 9vw, 92px); line-height: .98; letter-spacing: -.06em; text-shadow: 0 4px 20px rgba(255,255,255,.9), 0 16px 44px rgba(142,109,204,.15); }
.hero-desc { max-width: 570px; margin: 18px 0 0; color: var(--muted); font-size: clamp(16px, 2vw, 19px); }
.hero-actions, .support-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.primary-action, .secondary-action, .tool-card a, .back-link, .reset-link { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 18px; border-radius: var(--radius-sm); font-weight: 900; text-decoration: none; }
.primary-action, .back-link { background: linear-gradient(135deg, var(--purple), var(--blue)); color: white; box-shadow: 0 8px 20px rgba(111,84,137,.18); }
.secondary-action, .reset-link { border: 1px solid var(--line); background: rgba(255,255,255,.62); color: var(--purple-dark); }
.hero-visual { position: relative; display: grid; min-height: 390px; place-items: center; perspective: 900px; }
.crystal-stage { --crystal-x: 0deg; --crystal-y: 0deg; position: relative; display: grid; width: min(100%, 410px); aspect-ratio: 1; place-items: center; transform-style: preserve-3d; animation: crystal-float 7s ease-in-out infinite; }
.crystal-stage::before { position: absolute; inset: 10%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(199,167,242,.34), rgba(244,215,234,.2) 46%, transparent 72%); filter: blur(18px); content: ""; }
.crystal-core { position: relative; display: grid; width: 63%; aspect-ratio: 1; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.92); border-radius: 44% 56% 46% 54% / 55% 42% 58% 45%; background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(226,204,255,.3) 43%, rgba(255,211,237,.31) 72%, rgba(213,235,255,.48)); box-shadow: inset 18px 20px 40px rgba(255,255,255,.78), inset -20px -18px 50px rgba(142,109,204,.15), 0 34px 75px rgba(121,87,166,.22), 0 0 50px rgba(232,210,255,.56); backdrop-filter: blur(12px) saturate(135%); transform: rotateX(var(--crystal-x)) rotateY(var(--crystal-y)) translateZ(28px); transition: transform .28s ease-out; }
.crystal-core::before, .crystal-core::after { position: absolute; content: ""; pointer-events: none; }
.crystal-core::before { inset: 9% 48% 18% 13%; border-radius: 80% 24% 62% 36%; background: linear-gradient(150deg, rgba(255,255,255,.92), rgba(255,255,255,.08)); transform: rotate(18deg); }
.crystal-core::after { right: 6%; bottom: 7%; width: 55%; height: 46%; border: 1px solid rgba(255,255,255,.52); border-radius: 62% 35% 66% 32%; background: linear-gradient(145deg, transparent, rgba(194,164,235,.2)); transform: rotate(-18deg); }
.crystal-glyph { position: relative; z-index: 2; color: transparent; font-size: clamp(88px,12vw,142px); font-weight: 900; line-height: 1; background: linear-gradient(150deg, #fff 8%, #c8a8ed 45%, #fff0f8 72%, #9f7bd5); background-clip: text; -webkit-background-clip: text; filter: drop-shadow(0 8px 18px rgba(113,79,157,.2)); }
.crystal-core i { position: absolute; top: 14%; left: 18%; width: 30%; height: 12%; border-radius: 50%; background: rgba(255,255,255,.78); filter: blur(5px); transform: rotate(-35deg); }
.crystal-orbit { position: absolute; z-index: 1; width: 90%; height: 28%; border: 1px solid rgba(255,255,255,.72); border-radius: 50%; box-shadow: 0 0 22px rgba(199,167,242,.36), inset 0 0 18px rgba(244,215,234,.25); transform: rotateX(66deg); animation: orbit-turn 18s linear infinite; }
.orbit-two { width: 72%; height: 48%; border-color: rgba(199,167,242,.46); transform: rotateX(72deg) rotateZ(62deg); animation-duration: 24s; animation-direction: reverse; }
.cultivator-art.spirit-guide { position: absolute; right: -4%; bottom: -5%; z-index: 2; width: 63%; height: 72%; object-fit: contain; opacity: .54; filter: drop-shadow(0 22px 24px rgba(95,70,116,.16)); -webkit-mask-image: linear-gradient(to bottom,#000 72%,transparent); mask-image: linear-gradient(to bottom,#000 72%,transparent); }
.talisman { position: absolute; z-index: 3; display: grid; width: 32px; height: 42px; place-items: center; border: 1px solid rgba(197,150,66,.3); border-radius: 8px; background: rgba(255,250,235,.86); color: var(--gold); font-weight: 900; }
.talisman-one { top: 20%; right: 5%; }.talisman-two { bottom: 28%; left: 3%; }.talisman-three { right: 13%; bottom: 12%; }
.hero-badge { position: absolute; right: 0; bottom: 10%; z-index: 4; display: grid; min-width: 108px; padding: 12px; border: 1px solid rgba(255,255,255,.92); border-radius: 18px; background: rgba(255,255,255,.66); box-shadow: var(--shadow); text-align: center; backdrop-filter: blur(14px) saturate(135%); }
.hero-badge strong { color: var(--purple); font-size: 32px; line-height: 1; }.hero-badge span { color: var(--muted); font-size: 12px; font-weight: 800; }
.recent-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.recent-row > span { color: var(--muted); font-size: 13px; font-weight: 800; }.recent-row a { color: var(--purple-dark); text-decoration: none; }.recent-row a[hidden] + span { display: inline; }.recent-row a:not([hidden]) + span { display: none; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.tool-card { --tilt-x: 0deg; --tilt-y: 0deg; position: relative; isolation: isolate; display: flex; min-width: 0; min-height: 245px; overflow: hidden; flex-direction: column; padding: 20px; border: 1px solid rgba(255,255,255,.88); border-radius: var(--radius); background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(248,238,255,.56)); box-shadow: var(--shadow); transform: perspective(760px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease; }
.tool-card::before { position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, rgba(255,255,255,.72), transparent 30%, rgba(214,190,247,.16) 72%, rgba(255,220,239,.24)); content: ""; opacity: .62; }
.tool-card::after { position: absolute; right: -60px; bottom: -70px; z-index: -1; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(202,174,240,.32), transparent 68%); content: ""; transition: transform .4s ease; }
.tool-card:hover { border-color: rgba(199,167,242,.64); box-shadow: var(--shadow-hover); transform: perspective(760px) translateY(-6px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); }
.tool-card:hover::after { transform: scale(1.22); }
.card-icon { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid rgba(255,255,255,.82); border-radius: 16px; background: linear-gradient(135deg, rgba(244,215,234,.38), rgba(199,167,242,.3), rgba(214,237,255,.34)); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 24px rgba(127,94,166,.12); transition: transform .3s ease; }.card-icon img { width: 36px; height: 36px; object-fit: contain; }
.tool-card:hover .card-icon { transform: translateY(-2px) scale(1.04); }
.tool-card h2 { margin: 16px 0 6px; font-size: 21px; }.tool-card p { flex: 1; margin: 0 0 16px; color: var(--muted); font-size: 14px; }.tool-card a { width: 100%; background: linear-gradient(135deg, rgba(140,108,171,.12), rgba(118,185,223,.15)); color: var(--purple-dark); }
.seo-copy { padding: clamp(20px, 4vw, 32px); }.seo-copy h2 { margin: 0 0 8px; }.seo-copy p { margin: 0; color: var(--muted); }

/* 表單與工具頁 */
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); gap: var(--section); align-items: start; }
.main-stack, .side-stack { display: grid; gap: var(--section); min-width: 0; }.side-stack { position: sticky; top: 20px; }
.tool-form { display: grid; gap: 18px; padding: clamp(18px, 3vw, 28px); }
.form-grid, .element-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }.form-group { display: grid; min-width: 0; gap: 7px; }.form-group label { font-weight: 800; }.form-group small { color: var(--muted); }
input, select { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255,255,255,.68); color: var(--ink); padding: 0 13px; outline: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.9); backdrop-filter: blur(10px); transition: border-color .22s ease, box-shadow .22s ease, background .22s ease; }
input:focus, select:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(140,108,171,.12); }
.segmented { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }.element-grid .segmented { grid-template-columns: repeat(3,1fr); }.segmented input { position: absolute; width: 1px; height: 1px; min-height: 0; overflow: hidden; padding: 0; opacity: 0; pointer-events: none; clip-path: inset(50%); }.segmented label { display: grid; min-height: 44px; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255,255,255,.6); cursor: pointer; }.segmented input:checked + label { border-color: rgba(140,108,171,.45); background: linear-gradient(135deg, rgba(231,168,199,.28), rgba(118,185,223,.25)); color: var(--purple-dark); }
.mystic-btn, .attr-btn, .category-tab, .product-btn { min-height: 46px; border: 0; border-radius: var(--radius-sm); padding: 0 18px; background: linear-gradient(135deg, var(--purple), var(--blue)); color: white; font-weight: 900; cursor: pointer; box-shadow: 0 9px 22px rgba(119,86,156,.15); transition: transform .22s ease, box-shadow .22s ease, filter .22s ease; }
.mystic-btn:hover, .attr-btn:hover, .product-btn:hover, .primary-action:hover, .back-link:hover { filter: saturate(112%) brightness(1.04); box-shadow: 0 13px 30px rgba(119,86,156,.22); transform: translateY(-2px); }
.secondary-action:hover, .reset-link:hover { border-color: rgba(199,167,242,.7); background: rgba(255,255,255,.82); transform: translateY(-2px); }
.guide-card, .result-panel, .result-placeholder, .hint-panel { padding: clamp(18px, 3vw, 24px); }.guide-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }.guide-head h2, .result-panel h2, .hint-panel h2 { margin: 0; }.guide-head p, .hint-panel p { margin: 0; color: var(--muted); }
.rule-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }.element-cycle { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-top: 9px; }.rule-list div, .element-cycle span { padding: 10px; border-radius: var(--radius-sm); background: rgba(140,108,171,.08); }.rule-list span { display: block; color: var(--purple); font-size: 12px; font-weight: 900; }.rule-list strong { font-size: 14px; }
.result-focus { display: grid; gap: 5px; margin: 12px 0; padding: 18px; border: 1px solid rgba(197,150,66,.22); border-radius: var(--radius); background: linear-gradient(135deg, rgba(255,238,194,.55), rgba(226,242,251,.75)); }.result-focus span { color: var(--gold); font-size: 13px; font-weight: 900; }.result-focus strong { font-size: clamp(34px,6vw,48px); line-height: 1.05; }.result-focus small { color: var(--muted); font-weight: 800; }
.result-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }.result-grid div { min-width: 0; padding: 10px; border-radius: var(--radius-sm); background: rgba(140,108,171,.06); }.result-grid span, .result-line span { display: block; color: var(--muted); font-size: 12px; }.result-grid strong { display: block; overflow-wrap: anywhere; }.result-note { color: var(--muted); }.result-placeholder { display: grid; min-height: 240px; align-content: center; gap: 8px; }.result-placeholder > span { color: var(--purple); font-size: 13px; font-weight: 900; }.result-placeholder > strong { font-size: 22px; }.result-placeholder p { margin: 0; color: var(--muted); }
.result-line { display: grid; gap: 3px; padding: 12px 0; border-top: 1px solid var(--line); }.reset-link { margin-top: 14px; }

/* 資料與問答 */
.search-shell { display: grid; gap: 12px; padding: 14px; }.filter-row { display: flex; flex-wrap: wrap; gap: 7px; }.filter-chip { min-height: 38px; border: 1px solid var(--line); border-radius: 999px; padding: 0 13px; background: rgba(255,255,255,.65); color: var(--muted); font-weight: 800; cursor: pointer; }.filter-chip.active { border-color: rgba(140,108,171,.38); background: linear-gradient(135deg, rgba(231,168,199,.28), rgba(118,185,223,.22)); color: var(--purple-dark); }
.realm-nav { display: flex; gap: 7px; overflow-x: auto; padding: 3px 1px 8px; scrollbar-width: thin; }.realm-nav a { flex: 0 0 auto; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.65); color: var(--purple-dark); font-size: 13px; font-weight: 800; text-decoration: none; }
.data-block { display: grid; gap: 12px; }.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }.info-card { padding: 17px; scroll-margin-top: 18px; }.realm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }.realm-top span { color: var(--green); font-weight: 900; }.realm-top h3 { margin: 0; }.info-card dl { display: grid; gap: 5px; margin: 0; }.info-card dl div { display: flex; justify-content: space-between; gap: 10px; padding-top: 7px; border-top: 1px solid var(--line); }.info-card dt { color: var(--muted); }.info-card dd { margin: 0; font-weight: 800; }
.speed-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }.speed-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px; }.speed-card span { color: var(--muted); }.speed-card strong { color: var(--gold); }
.legend { display: flex; flex-wrap: wrap; gap: 7px; }.events-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }.event-card { display: grid; gap: 9px; padding: 15px; }.event-card h2 { margin: 0; font-size: 18px; }.camp-tag { width: fit-content; color: var(--purple); font-size: 12px; font-weight: 900; }.pair { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 10px; border-radius: var(--radius-sm); background: rgba(140,108,171,.06); }.opt { font-weight: 800; }.res { width: fit-content; max-width: 100%; padding: 3px 8px; border-radius: 999px; background: rgba(118,185,223,.16); color: #39789b; font-size: 12px; font-weight: 900; white-space: nowrap; }.res.gain { background: rgba(105,169,135,.16); color: #397653; }.res.loss { background: rgba(193,107,114,.14); color: #9c4d54; }.res.none { background: rgba(117,107,131,.11); color: var(--muted); }
.no-results { grid-column: 1/-1; padding: 24px; color: var(--muted); text-align: center; }

/* 買賣 */
.seller-cta { display: grid; gap: 7px; max-width: 760px; margin-top: 18px; padding: 15px; border: 1px solid rgba(197,150,66,.18); border-radius: var(--radius); background: rgba(255,245,218,.48); }.seller-cta strong { color: var(--gold); }.seller-cta div { display: flex; flex-wrap: wrap; gap: 8px; }.seller-cta a, .seller-cta div > span { padding: 5px 10px; border-radius: 10px; background: rgba(255,255,255,.65); text-decoration: none; }
.market-toolbar { display: grid; grid-template-columns: minmax(180px,1fr) 180px; gap: 10px; padding: 14px; }.category-tabs { display: flex; grid-column: 1/-1; flex-wrap: wrap; gap: 7px; }.category-tab { min-height: 38px; border: 1px solid var(--line); background: rgba(255,255,255,.6); color: var(--muted); }.category-tab.active { background: linear-gradient(135deg, var(--purple), var(--blue)); color: white; }
.featured-strip { display: grid; gap: 12px; padding: 18px; }.featured-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }.featured-card, .featured-empty { display: grid; gap: 9px; padding: 14px; border: 1px solid rgba(197,150,66,.18); border-radius: var(--radius); background: rgba(255,249,233,.55); }.featured-card { grid-template-columns: 100px minmax(0,1fr); align-items: center; }.featured-card img { width: 100px; height: 100px; border-radius: 14px; object-fit: contain; }.featured-card h3, .featured-card p, .featured-empty p { margin: 0; }.featured-card span { color: var(--muted); font-size: 12px; }.featured-card button { min-height: 34px; border: 0; border-radius: 10px; background: var(--purple); color: white; font-weight: 800; cursor: pointer; }
.product-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }.empty-state { grid-column: 1/-1; padding: 28px; color: var(--muted); text-align: center; }.product-card { display: flex; min-width: 0; overflow: hidden; flex-direction: column; }.product-image-wrap { display: grid; width: 100%; aspect-ratio: 1; place-items: center; overflow: hidden; padding: 0; border: 0; background: linear-gradient(145deg, rgba(231,168,199,.09), rgba(118,185,223,.12)); cursor: pointer; }.product-image { width: 100%; height: 100%; object-fit: contain; padding: 8px; }.product-content { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 15px; }.product-tag { width: fit-content; padding: 3px 8px; border-radius: 999px; background: rgba(118,185,223,.15); color: #39789b; font-size: 12px; font-weight: 900; }.product-tag.is-featured { background: rgba(197,150,66,.15); color: var(--gold); }.product-title, .product-price, .product-desc { margin: 0; }.product-title { font-size: 19px; }.product-price { color: var(--gold); font-size: 19px; font-weight: 900; }.product-desc, .product-seller { color: var(--muted); font-size: 13px; }.product-btn { width: 100%; margin-top: auto; }
.modal-overlay { position: fixed; inset: 0; z-index: 2000; display: none; place-items: center; padding: var(--gutter); background: rgba(52,45,67,.46); backdrop-filter: blur(9px); }.modal-overlay.show { display: grid; }.product-modal { position: relative; display: grid; grid-template-columns: minmax(320px,.9fr) minmax(340px,1.1fr); width: min(980px,100%); max-height: 90dvh; overflow: hidden; border: 1px solid white; border-radius: var(--radius-lg); background: white; box-shadow: 0 28px 80px rgba(52,45,67,.3); }.modal-close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(52,45,67,.08); color: var(--ink); font-size: 25px; cursor: pointer; }.modal-image-wrap { display: grid; min-height: 460px; place-items: center; background: linear-gradient(145deg,#faf3f8,#eef7fc); }.modal-image-wrap img { width: 100%; max-height: 85dvh; object-fit: contain; padding: 18px; }.modal-info { display: grid; gap: 11px; align-content: start; overflow: auto; padding: 34px; }.modal-info h2, .modal-price, .modal-desc, .trade-warning { margin: 0; }.modal-category { width: fit-content; padding: 3px 9px; border-radius: 999px; background: rgba(118,185,223,.15); color: #39789b; font-size: 12px; font-weight: 900; }.modal-price { color: var(--gold); font-size: 22px; font-weight: 900; }.contact-box, .trade-warning { padding: 13px; border-radius: var(--radius-sm); background: rgba(118,185,223,.1); }.contact-box h3 { margin: 0 0 6px; }.contact-link { display: block; overflow-wrap: anywhere; }.trade-warning { background: rgba(193,107,114,.1); color: #88464d; font-size: 13px; }

/* 決鬥 */
.duel-stage { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: var(--section); align-items: start; }.arena-card { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(8px,4vw,40px); min-height: 390px; overflow: hidden; padding: clamp(16px,4vw,34px); }.arena-card::after { position: absolute; right: 12%; bottom: 6%; left: 12%; height: 90px; border-radius: 50%; background: radial-gradient(ellipse, rgba(140,108,171,.2), transparent 68%); content: ""; }.fighter-side { position: relative; z-index: 2; display: grid; place-items: center; gap: 10px; }.fighter { width: clamp(108px,16vw,170px); aspect-ratio: 1; overflow: hidden; border: 3px solid rgba(255,255,255,.9); border-radius: 50%; background: #f5edf8; box-shadow: 0 10px 35px rgba(111,84,137,.18); transition: transform .32s ease; }.fighter img { width: 100%; height: 100%; object-fit: cover; }.enemy img { transform: scaleX(-1); }.info-wrap { text-align: center; transition: opacity .2s; }.name { font-size: 18px; font-weight: 900; }.level { color: var(--purple); font-weight: 800; }.power { color: var(--muted); }.arena-center { position: relative; z-index: 3; display: grid; min-width: 76px; min-height: 110px; place-items: center; }.versus { color: var(--gold); font-size: clamp(28px,5vw,46px); font-weight: 900; }.attribute { position: absolute; top: -8px; color: var(--blue); font-size: 38px; font-weight: 900; opacity: 0; }.flash { position: absolute; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle,#fff,rgba(118,185,223,.35),transparent 70%); opacity: 0; }.bonus { position: absolute; top: 30%; left: 20%; z-index: 4; color: var(--green); font-size: 20px; font-weight: 900; opacity: 0; }.enemy-bonus { right: 20%; left: auto; color: var(--red); }
.battle-sidebar { display: grid; gap: 12px; }.battle-controls { display: grid; gap: 12px; padding: 18px; }.battle-controls > .mystic-btn { width: 100%; }.elem-panel { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }.elem-panel p { grid-column: 1/-1; margin: 0; color: var(--muted); text-align: center; }.attr-water { background: var(--blue); }.attr-fire { background: var(--red); }.attr-wood { background: var(--green); }.battle-result { padding: 16px; text-align: center; font-weight: 900; }.round-log { min-height: 120px; max-height: 260px; overflow: auto; padding: 15px; color: var(--muted); }.duel-rule { padding: 16px; color: var(--muted); }.duel-rule h2 { margin: 0 0 5px; color: var(--ink); font-size: 17px; }.duel-rule p { margin: 0; }

/* 公告與 Footer */
.event-panel { display: grid; gap: 16px; padding: clamp(16px,3vw,24px); }.event-image { overflow: hidden; border-radius: var(--radius); }.event-image img { width: 100%; max-height: 520px; object-fit: cover; }.event-desc { color: var(--muted); }.event-desc p { margin: 0; }.back-link { width: fit-content; }
.support-footer { display: grid; gap: 20px; margin-bottom: 22px; padding: clamp(20px,4vw,34px); border: 1px solid rgba(197,150,66,.16); border-radius: var(--radius-lg); background: linear-gradient(135deg,rgba(255,255,255,.9),rgba(255,247,226,.72),rgba(235,246,252,.82)); box-shadow: var(--shadow); }.support-intro h2 { margin: 0; font-size: 26px; }.support-intro > p:last-of-type { max-width: 720px; margin: 8px 0 0; color: var(--muted); }.support-actions a, .support-actions button { display: inline-flex; min-height: 42px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 13px; background: rgba(255,255,255,.72); color: var(--purple-dark); font-weight: 900; text-decoration: none; cursor: pointer; }
.sponsor-board { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }.sponsor-list { display: grid; grid-template-columns: 1.25fr repeat(3,1fr); gap: 10px; }.sponsor-item { position: relative; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.68); }.sponsor-item .sponsor-rank { display: block; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .08em; }.sponsor-item strong, .sponsor-item b { display: block; }.sponsor-item strong { margin-top: 4px; font-size: 18px; }.sponsor-item b { color: var(--purple); font-size: 14px; }.sponsor-item p { margin: 5px 0 0; }.sponsor-rank-1 { border-color: rgba(197,150,66,.38); background: linear-gradient(145deg,rgba(255,248,218,.92),rgba(255,255,255,.8)); box-shadow: 0 14px 34px rgba(197,150,66,.16); }.sponsor-rank-1 .sponsor-rank, .sponsor-rank-1 b { color: #9b6c1a; }.sponsor-rank-1 strong { color: #795113; font-size: 23px; }.sponsor-rank-2 { border-color: rgba(140,108,171,.25); background: linear-gradient(145deg,rgba(244,237,249,.92),rgba(255,255,255,.78)); }.sponsor-rank-2 strong { font-size: 20px; }.sponsor-rank-3 { border-color: rgba(118,185,223,.22); background: linear-gradient(145deg,rgba(235,247,252,.92),rgba(255,255,255,.78)); }
.floating-actions { position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: calc(var(--bottom-nav) + 16px + env(safe-area-inset-bottom)); z-index: 900; display: flex; flex-direction: column; gap: 8px; }.floating-action { display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid white; border-radius: 18px; background: rgba(255,255,255,.9); box-shadow: 0 10px 28px rgba(70,50,90,.16); color: var(--purple-dark); text-decoration: none; backdrop-filter: blur(14px); }.floating-action > span { font-size: 22px; line-height: 1; }.floating-action img { width: 34px; height: 34px; object-fit: contain; }.floating-action b { position: absolute; margin-top: 49px; padding: 1px 6px; border-radius: 999px; background: var(--purple); color: white; font-size: 10px; }
.toast { position: fixed; right: 16px; bottom: calc(var(--bottom-nav) + 18px); z-index: 3000; max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: 12px; background: var(--ink); color: white; font-size: 13px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; }.toast.show { opacity: 1; transform: none; }

@keyframes aurora-drift { 0% { transform: translate3d(-3%,-2%,0) scale(.96); } 100% { transform: translate3d(6%,5%,0) scale(1.08); } }
@keyframes breathe { 50% { opacity: .68; transform: scale(1.06); } }
@keyframes mist-drift { 0% { opacity: .66; transform: translate3d(-1%,0,0); } 100% { opacity: .92; transform: translate3d(2%,-1%,0); } }
@keyframes crystal-float { 50% { transform: translate3d(0,-8px,0); } }
@keyframes orbit-turn { to { rotate: 1turn; } }
@keyframes notice-scroll { to { transform: translateX(-50%); } }

.motion-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity .58s ease, transform .58s cubic-bezier(.2,.72,.2,1); }
.motion-ready .reveal.is-visible { opacity: 1; transform: none; }
.motion-ready .tool-grid .reveal:nth-child(2), .motion-ready .card-grid .reveal:nth-child(2), .motion-ready .events-grid .reveal:nth-child(2) { transition-delay: .07s; }
.motion-ready .tool-grid .reveal:nth-child(3), .motion-ready .card-grid .reveal:nth-child(3), .motion-ready .events-grid .reveal:nth-child(3) { transition-delay: .14s; }
.motion-ready .tool-grid .reveal:nth-child(4), .motion-ready .card-grid .reveal:nth-child(4), .motion-ready .events-grid .reveal:nth-child(4) { transition-delay: .21s; }
.motion-ready .tool-grid .reveal:nth-child(n+5), .motion-ready .card-grid .reveal:nth-child(n+5), .motion-ready .events-grid .reveal:nth-child(n+5) { transition-delay: .28s; }
html[data-webgl="fallback"] .hero-webgl { display: none; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-card, .mystic-panel, .search-shell, .info-card, .speed-card, .event-card, .arena-card, .battle-controls, .battle-result, .round-log, .market-toolbar, .featured-strip, .product-card, .empty-state, .event-panel, .seo-copy, .notice-bar, .page-hero, .shop-hero, .home-hero, .app-nav { background-color: rgba(255,255,255,.94); }
}

@media (min-width: 900px) {
  body { padding: 0 0 0 92px; }
  .site-main { padding-block: 32px; }
  .site-brand { position: fixed; left: 13px; height: 52px; flex-direction: column; gap: 0; font-size: 11px; }.site-brand img { width: 44px; height: 40px; }
  .app-nav { top: 74px; right: auto; bottom: auto; left: 14px; width: 62px; min-height: 0; grid-template-columns: 1fr; gap: 6px; padding: 7px; }.nav-btn { min-height: 54px; }.nav-btn.active::after { top: 11px; right: auto; bottom: 11px; left: -7px; width: 3px; height: auto; }
  .floating-actions { right: 20px; bottom: 22px; }
  .support-footer { margin-bottom: 30px; }
}
@media (max-width: 1050px) {
  .tool-grid, .card-grid, .events-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .featured-grid { grid-template-columns: 1fr; }
  .duel-stage { grid-template-columns: 1fr; }.battle-sidebar { grid-template-columns: 1fr 1fr; }.duel-rule { grid-column: 1/-1; }
}
@media (max-width: 820px) {
  .home-hero { min-height: auto; grid-template-columns: 1fr; }.hero-webgl { display: none; }.hero-visual { min-height: 300px; }.crystal-stage { width: min(86%,330px); animation: none; }.crystal-core { transform: none; }.crystal-orbit { animation: none; }.hero-badge { right: 8%; }
  .tool-layout { grid-template-columns: 1fr; }.side-stack { position: static; }.form-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .product-modal { grid-template-columns: 1fr; overflow: auto; }.modal-image-wrap { min-height: 220px; max-height: 43dvh; }.modal-image-wrap img { max-height: 42dvh; }.modal-info { overflow: visible; padding: 20px; }
  .sponsor-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
  :root { --gutter: 10px; --section: 12px; }
  .site-main { padding-top: 72px; }.site-brand { top: 8px; }.site-brand img { width: 48px; height: 48px; }
  .page-hero, .shop-hero { padding: 22px 18px; }.page-hero h1, .shop-hero h1 { font-size: 38px; }
  .home-hero { padding: 24px 18px; }.home-hero h1 { font-size: 58px; }.hero-actions { display: grid; }.hero-visual { min-height: 260px; }
  .tool-grid, .card-grid, .events-grid, .speed-grid, .product-grid { grid-template-columns: 1fr; }.tool-card { min-height: 0; }
  .form-grid, .element-grid { grid-template-columns: 1fr; }.tool-form { padding: 16px; }.rule-list { grid-template-columns: 1fr; }.guide-head { display: grid; }.result-grid { grid-template-columns: 1fr 1fr; }
  .market-toolbar { grid-template-columns: 1fr; }.category-tabs { grid-column: auto; }.market-toolbar select { order: 2; }.category-tabs { order: 3; }
  .featured-card { grid-template-columns: 78px minmax(0,1fr); }.featured-card img { width: 78px; height: 78px; }
  .arena-card { grid-template-columns: 1fr 55px 1fr; min-height: 300px; padding: 16px 8px; }.arena-center { min-width: 55px; }.fighter { width: min(28vw,120px); }.level, .power { font-size: 12px; }.bonus { left: 10%; }.enemy-bonus { right: 10%; }.battle-sidebar { grid-template-columns: 1fr; }.duel-rule { grid-column: auto; }
  .sponsor-list { grid-template-columns: 1fr; }.support-footer { padding: 18px 14px; }.support-actions { display: grid; }.support-actions > * { justify-content: center; }
  .floating-actions { right: 10px; }
  .pair { grid-template-columns: 1fr; }.res { white-space: normal; }
  .site-aurora span { opacity: .13; filter: blur(42px); animation: none; }
  .glass-card, .mystic-panel, .search-shell, .info-card, .speed-card, .event-card, .arena-card, .battle-controls, .battle-result, .round-log, .market-toolbar, .featured-strip, .product-card, .empty-state, .event-panel, .seo-copy, .notice-bar, .page-hero, .shop-hero, .home-hero { backdrop-filter: blur(10px) saturate(112%); }
  .tool-card, .tool-card:hover { --tilt-x: 0deg; --tilt-y: 0deg; transform: none; }.tool-card:hover { box-shadow: var(--shadow); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }.hero-webgl { display: none; }.hero-copy, .hero-visual { opacity: 1; transform: none; }.motion-ready .reveal { opacity: 1; transform: none; }.tool-card, .tool-card:hover, .crystal-core { transform: none; } }
[hidden] { display: none; }
