/* Aitun 官網共用外框：字型、色彩、頁首、頁尾、按鈕、貼紙、波浪分隔。
   全部自架：沒有外部字型、CDN 或 JavaScript。動畫只用 CSS，prefers-reduced-motion 時全部關閉。 */
@font-face { font-family: "Huninn Display"; src: url('/fonts/Huninn-display.woff2') format('woff2'); font-display: swap; }
:root {
  --sx-purple: #6955d7;
  --sx-purple-d: #5440bf;
  --sx-purple-l: #7c6cf2;
  --sx-deep: #2d2463;
  --sx-ink: #34305f;
  --sx-muted: #5c5883;
  --sx-line: #e6e1f7;
  --sx-mint: #ddf5ea;
  --sx-mint-d: #0f6b4d;
  --sx-mint-s: #58d6a4;
  --sx-coral: #ffe6da;
  --sx-coral-d: #a3401b;
  --sx-coral-s: #ff8f6b;
  --sx-sky: #ddf3fb;
  --sx-sky-d: #0b6896;
  --sx-sky-s: #53c0ee;
  --sx-yellow: #fff3d0;
  --sx-yellow-d: #7a5200;
  --sx-yellow-s: #ffc83d;
  --sx-pink: #ffe3ec;
  --sx-lavender: #f6f3ff;
  --sx-body: system-ui, -apple-system, "Segoe UI", "PingFang TC", "Noto Sans TC", "Noto Sans SC", "Noto Sans JP", sans-serif;
  --sx-display: "Huninn Display", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  --sx-wave: clamp(28px, 4.4vw, 68px);
  --sx-radius: 28px;
}
:lang(zh-Hans) { --sx-display: "Yuanti SC", "PingFang SC", "Noto Sans SC", system-ui, sans-serif; }
:lang(ja) { --sx-display: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif; }
body { margin: 0; }
.sx-page, .sx-header, .sx-footer { font-family: var(--sx-body); color: var(--sx-ink); }
.sx-page { color-scheme: light; overflow-x: clip; overflow-wrap: break-word; line-height: 1.7; }
.sx-page *, .sx-page *::before, .sx-page *::after, .sx-header *, .sx-footer * { box-sizing: border-box; }
.sx-page img { max-width: 100%; height: auto; }
.sx-sec :where(h1, h2, h3, p, ul, ol) { margin-top: 0; }
.sx-sec :is(h1, h2, h3), .sx-footer .sx-foot-title { font-family: var(--sx-display); color: var(--sx-deep); font-weight: 700; letter-spacing: 0; text-wrap: balance; }
.sx-page a { color: inherit; }
.sx-page a:focus-visible, .sx-header a:focus-visible, .sx-footer a:focus-visible, .sx-page summary:focus-visible {
  outline: 3px solid #ffb703; outline-offset: 3px; border-radius: 8px;
}
.sx-skip { position: absolute; top: -120px; left: 12px; z-index: 100; padding: 12px 18px; background: #fff; color: var(--sx-deep); border-radius: 12px; font-weight: 700; }
.sx-skip:focus { top: 12px; }
.sx-wrap { width: min(1200px, calc(100% - 40px)); margin-inline: auto; }
.sx-narrow { width: min(820px, calc(100% - 40px)); }
.sx-center { text-align: center; }

/* ---------- 頁首 ---------- */
.sx-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--sx-line); }
.sx-header-in { width: min(1200px, calc(100% - 40px)); margin-inline: auto; min-height: 68px; display: flex; align-items: center; gap: 16px; }
.sx-brand { display: flex; align-items: center; min-height: 44px; order: 0; margin-right: auto; }
.sx-brand-img { display: block; width: 112px; height: auto; }
.sx-cta { order: 2; }
.sx-header .availability { order: 2; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: #ffe08a; color: #3b2900; font-size: 14px; font-weight: 800; white-space: nowrap; }
.sx-menu { order: 1; display: flex; align-items: center; gap: 22px; margin-left: auto; }
.sx-nav { display: flex; align-items: center; gap: 4px; }
.sx-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; font-weight: 700; font-size: 15px; color: var(--sx-deep); text-decoration: none; }
.sx-nav a:hover { background: var(--sx-lavender); color: var(--sx-purple-d); }
.sx-nav a[aria-current="page"] { background: var(--sx-lavender); color: var(--sx-purple-d); }
.sx-header .language-links { display: flex; flex-wrap: wrap; gap: 0 2px; margin: 0; padding: 3px; border-radius: 999px; background: var(--sx-lavender); font-size: 13px; line-height: 1.2; }
.sx-header .language-links a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 11px; border-radius: 999px; color: var(--sx-purple-d); text-decoration: none; font-weight: 600; }
.sx-header .language-links a[aria-current] { background: var(--sx-purple); color: #fff; text-decoration: none; }
.sx-menu-toggle, .sx-menu-label { display: none; }

/* ---------- 按鈕、標籤 ---------- */
.sx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 999px; background: var(--sx-purple-d); color: #fff !important; font-weight: 800; text-decoration: none; box-shadow: 0 6px 0 #3f2f96; transition: transform .15s ease, box-shadow .15s ease; }
.sx-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #3f2f96; }
.sx-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #3f2f96; }
.sx-btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; box-shadow: 0 4px 0 #3f2f96; }
.sx-btn-ghost { background: #fff; color: var(--sx-purple-d) !important; box-shadow: 0 6px 0 rgba(30, 20, 100, .35); }
.sx-btn-ghost:hover { box-shadow: 0 8px 0 rgba(30, 20, 100, .35); }
.sx-btn-yellow { background: var(--sx-yellow-s); color: #2b1d00 !important; box-shadow: 0 6px 0 #b88400; }
.sx-btn-yellow:hover { box-shadow: 0 8px 0 #b88400; }
.sx-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 8px 18px; border-radius: 999px; background: #fff; color: var(--sx-deep); font-weight: 800; font-size: 15px; line-height: 1.4; }
.sx-chip-yellow { background: #ffe08a; color: #3b2900; }
.sx-chip-mint { background: var(--sx-mint-s); color: #053d2a; }
.sx-chip-sm { padding: 3px 12px; font-size: 13px; }

/* ---------- 貼紙、手機、閃光 ---------- */
.sx-sticker { position: absolute; z-index: 2; height: auto; filter: drop-shadow(0 8px 10px rgba(30, 20, 100, .28)); transform: rotate(var(--r, 0deg)); animation: sx-float 6.5s ease-in-out infinite; animation-delay: var(--d, 0s); }
.sx-phone { border: 7px solid #1f1a4a; border-radius: 34px; overflow: hidden; background: #fff; box-shadow: 0 24px 40px rgba(25, 16, 80, .35); }
.sx-phone img { display: block; width: 100%; height: auto; }
.sx-spark { position: absolute; z-index: 1; width: var(--s, 28px); aspect-ratio: 1; background: var(--c, #ffd54f); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: sx-twinkle 3.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes sx-float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-9px) rotate(calc(var(--r, 0deg) + 3deg)); } }
@keyframes sx-twinkle { 0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; } 50% { transform: scale(.7) rotate(25deg); opacity: .75; } }
.sx-hl { padding: 0 .18em; border-radius: .32em; color: #17114a; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.sx-hl-mint { background: #7be3b9; }

/* ---------- 區塊與波浪分隔 ---------- */
.sx-sec { position: relative; padding-block: clamp(64px, 8vw, 110px); background: var(--sec-bg); }
.sx-sec + .sx-sec::before, .sx-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: calc(2px - var(--sx-wave)); height: var(--sx-wave); background: var(--sec-bg);
  -webkit-mask: url(/assets/site/wave.svg) center / 100% 100% no-repeat; mask: url(/assets/site/wave.svg) center / 100% 100% no-repeat;
}
.sx-sec-white { --sec-bg: #fff; }
.sx-sec-lavender { --sec-bg: var(--sx-lavender); }
.sx-sec-sky { --sec-bg: #e8f6fc; }
.sx-sec-cream { --sec-bg: #fff8e4; }
.sx-sec-purple { --sec-bg: #6450d4; color: #fff; }
.sx-sec h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.35; margin-bottom: 12px; }
.sx-sec :is(h1, h2, h3, p, li, summary) { word-break: auto-phrase; }
.sx-note { max-width: 40em; font-size: 1.05rem; color: var(--sx-muted); margin-bottom: 36px; }
.sx-eyebrow { display: inline-block; margin-bottom: 14px; padding: 5px 16px; border-radius: 999px; background: rgba(255, 255, 255, .18); color: #fff; font-weight: 700; font-size: 14px; }
.sx-lead { text-wrap: pretty; font-size: clamp(1.02rem, 1.6vw, 1.2rem); line-height: 1.85; }
.sx-textlink { color: var(--sx-purple-d); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 常見問題（純 HTML details） ---------- */
.faq { display: grid; gap: 12px; margin-top: 28px; }
.faq-item { border-radius: 20px; background: var(--sx-lavender); border: 2px solid transparent; }
.faq-item[open] { border-color: #cfc5fa; background: #fff; box-shadow: 0 10px 24px rgba(80, 60, 190, .1); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 22px; cursor: pointer; list-style: none; font-weight: 800; color: var(--sx-deep); font-size: 1.05rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sx-purple); color: #fff; font-size: 22px; line-height: 1; transition: transform .2s ease; }
.faq-item[open] summary::after { content: "–"; transform: rotate(180deg); }
.faq-item p { margin: 0; padding: 0 22px 20px; color: var(--sx-ink); }
.faq-links { margin-top: 24px; }

/* ---------- 頁尾 ---------- */
.sx-footer { --sec-bg: var(--sx-deep); position: relative; margin-top: 0; padding: 64px 20px 40px; background: var(--sec-bg); color: #e9e5ff; font-size: 15px; }
.sx-footer > * { width: min(1200px, 100%); margin-inline: auto; }
.sx-footer a, .sx-footer .public-info-links a, .sx-footer .language-links a { color: #fff; text-decoration: none; }
.sx-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sx-foot-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 36px; padding-bottom: 28px; }
.sx-foot-logo { display: block; width: 120px; height: auto; margin-bottom: 12px; }
.sx-foot-tag { max-width: 22em; margin: 0; color: #fff; font-family: var(--sx-display); font-size: 1.1rem; line-height: 1.6; }
.sx-foot-title { margin: 0 0 8px; font-size: 1rem; color: #ffd54f !important; }
.sx-foot-col { display: flex; flex-direction: column; align-items: flex-start; }
.sx-foot-col a { display: inline-flex; align-items: center; min-height: 40px; }
.sx-footer .public-info-links { display: flex; flex-direction: column; gap: 0; }
.sx-footer .public-info-links a { min-height: 40px; color: #fff; }
.sx-footer .language-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 4px auto 14px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: 14px; }
.sx-footer .language-links a { display: inline-flex; align-items: center; min-height: 40px; color: #e9e5ff; }
.sx-footer .language-links [aria-current] { color: #fff; font-weight: 800; }
.sx-foot-company { margin: 6px auto 8px; color: #cfc8f5; font-size: 13px; line-height: 1.8; }
.sx-foot-copy { margin: 0 auto; color: #cfc8f5; font-size: 13px; }

/* ---------- 舊版內容頁（部落格、功能說明）與法律頁：共用外框，內文不動 ---------- */
.sx-legacy { background: linear-gradient(120deg, #fff, #f5faff 75%, #faf8ff); }
.sx-legacy > main { min-height: 50vh; padding-bottom: calc(var(--sx-wave) + 24px); }
.sx-legacy .native-downloads { margin-top: 40px; }
html body:has(.public-info) { background: #fff; }
.public-info { color-scheme: light; --ink: #1f2340; --muted: #6b7085; --line: #e4e5ef; --info-surface: #f7f8fc; --info-accent: #6252ca; --info-card: #f2efff; background: #fff; color: #1f2340; }
.public-info .info-operator { border-color: #d8d0fb; }
.public-info .skip { position: absolute; top: -120px; }
.public-info .skip:focus { top: 12px; left: 12px; z-index: 100; padding: 12px 18px; background: #fff; color: #2d2463; border-radius: 12px; }
.public-info .info-main { padding-top: 44px; }
.public-info .info-footer { width: min(820px, calc(100% - 40px)); margin: 0 auto 72px; padding: 22px 0 0; border-top: 1px solid var(--line); font-size: 14px; }
.public-info .info-footer p { margin: 0; color: var(--muted); }

/* ---------- 響應式與動態偏好 ---------- */
@media (max-width: 980px) {
  .sx-header-in { gap: 10px; }
  .sx-cta, .sx-header .availability { order: 1; margin-left: auto; margin-right: 56px; }
  .sx-brand { margin-right: 0; }
  .sx-menu-toggle { display: block; position: absolute; z-index: 3; right: 12px; top: 12px; width: 44px; height: 44px; margin: 0; opacity: 0; cursor: pointer; }
  .sx-menu-label { display: grid; place-items: center; position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 14px; background: var(--sx-lavender); }
  .sx-menu-toggle:focus-visible + .sx-menu-label { outline: 3px solid #ffb703; outline-offset: 2px; }
  .sx-burger, .sx-burger::before, .sx-burger::after { display: block; width: 20px; height: 3px; border-radius: 3px; background: var(--sx-deep); transition: transform .2s ease, background .2s ease; }
  .sx-burger { position: relative; }
  .sx-burger::before, .sx-burger::after { content: ""; position: absolute; left: 0; }
  .sx-burger::before { top: -6px; }
  .sx-burger::after { top: 6px; }
  .sx-menu-toggle:checked + .sx-menu-label .sx-burger { background: transparent; }
  .sx-menu-toggle:checked + .sx-menu-label .sx-burger::before { top: 0; transform: rotate(45deg); }
  .sx-menu-toggle:checked + .sx-menu-label .sx-burger::after { top: 0; transform: rotate(-45deg); }
  .sx-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: 12px 20px 22px; flex-direction: column; align-items: stretch; gap: 14px; background: #fff; border-bottom: 1px solid var(--sx-line); box-shadow: 0 18px 30px rgba(45, 36, 99, .14); }
  .sx-menu-toggle:checked ~ .sx-menu { display: flex; }
  .sx-nav { flex-direction: column; align-items: stretch; gap: 0; }
  .sx-nav a { min-height: 50px; padding: 0 12px; font-size: 17px; border-radius: 14px; }
  .sx-header .language-links { align-self: flex-start; }
  .sx-foot-top { grid-template-columns: 1fr 1fr; }
  .sx-foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .sx-brand-img { width: 96px; }
  .sx-btn-sm { padding: 0 14px; font-size: 14px; }
  .sx-cta, .sx-header .availability { margin-right: 52px; }
  .sx-foot-top { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sx-sticker, .sx-spark, .fcard, .sx-btn, .faq-item summary::after, .sx-burger, .sx-burger::before, .sx-burger::after { animation: none !important; transition: none !important; }
  .sx-btn:hover, .sx-btn:active { transform: none; }
}
html:has(.sx-page) { scroll-behavior: smooth; scroll-padding-top: 84px; }
