/* 打小人 Da Siu Yan — dasiuyan.app 共用樣式 */
/* Dark, modern, ritual-mystic: near-black indigo base, ember-red + gold accents. */
:root {
  --bg: #0a0d1a;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --red: #e5484d;
  --red-dark: #b3363a;
  --gold: #f5d76e;
  --gold-soft: rgba(245, 215, 110, 0.55);
  --text: #eef0fa;
  --muted: #9aa3c7;
  --paper: #f7efdc;
  --paper-text: #3a2f1d;
  --hairline: rgba(255, 255, 255, 0.07);
  --gold-hairline: rgba(245, 215, 110, 0.25);
  --maxw: 780px;
  --radius: 16px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 520px at 50% -160px, rgba(229, 72, 77, 0.10), transparent 70%),
    radial-gradient(1600px 700px at 50% -260px, rgba(245, 215, 110, 0.06), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  line-height: 1.85;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--gold); color: #1a1405; }

a:focus-visible, .cta-button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Header（毛玻璃，與頁面底色無縫） ---------- */
.site-header {
  background: rgba(10, 13, 26, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  color: var(--text);
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(229, 72, 77, 0.35);
}
.brand .brand-en { color: var(--gold); font-size: 14px; font-weight: 500; }
.main-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.main-nav a {
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 15px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.main-nav a:hover { color: var(--text); background: var(--surface-hover); text-decoration: none; }
.main-nav a.nav-cta {
  color: #fff;
  background: var(--red);
  font-weight: 600;
}
.main-nav a.nav-cta:hover { background: #ef5a5f; }

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wide { max-width: 1080px; }

main { padding: 48px 0 72px; }

h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 18px;
  background: linear-gradient(115deg, #fff3c4 0%, var(--gold) 45%, #d4af37 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold); /* fallback when background-clip unsupported */
}
h2 {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--gold);
  margin: 64px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); margin: 30px 0 10px; }
p { margin: 0 0 16px; }
ul, ol { padding-left: 24px; margin: 0 0 16px; }
li { margin-bottom: 8px; }
strong { color: #fff; }

.lede { font-size: 19px; color: var(--muted); }
.kicker {
  display: inline-block;
  color: var(--red);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.updated { color: var(--muted); font-size: 14px; }

/* ---------- Hero（氛圍光，克制） ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 72px 20px 56px;
  overflow: hidden;
}
/* ember glow behind the icon + soft light starting right under the header */
/* Glow layers sit at z-index:0 with content above them — never negative z-index
   with isolation:isolate (Safari composites that behind the body background,
   which produced a flat mismatched band below the header). */
.hero > *, .cta-block > *, .play-launch > * { position: relative; z-index: 1; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(700px 190px at 50% -60px, rgba(229, 72, 77, 0.14), transparent 75%),
    radial-gradient(420px 300px at 50% 26%, rgba(229, 72, 77, 0.16), transparent 70%),
    radial-gradient(1100px 460px at 50% -18%, rgba(245, 215, 110, 0.09), transparent 68%);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 96px);
  mask-image: linear-gradient(to bottom, transparent, black 96px);
}
.hero img.hero-img {
  width: 210px;
  border-radius: 22%;
  border: 1px solid var(--gold-hairline);
  box-shadow:
    0 12px 44px rgba(229, 72, 77, 0.28),
    0 4px 16px rgba(0, 0, 0, 0.5);
  margin-bottom: 28px;
  animation: float 6s ease-in-out infinite;
}
.hero h1 { font-size: 46px; letter-spacing: -0.03em; margin-bottom: 14px; }
.hero .lede { max-width: 620px; margin: 0 auto 32px; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero img.hero-img { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Buttons ---------- */
.cta-button {
  display: inline-block;
  background: linear-gradient(180deg, #ee555a, var(--red));
  color: #fff !important;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 16px 44px;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(229, 72, 77, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-button:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(229, 72, 77, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.cta-button.secondary {
  background: transparent;
  border: 1px solid var(--gold-hairline);
  color: var(--gold) !important;
  box-shadow: none;
  font-size: 17px;
  padding: 13px 30px;
  margin-left: 12px;
}
.cta-button.secondary:hover { border-color: var(--gold); box-shadow: 0 0 20px rgba(245, 215, 110, 0.12); }
.cta-note { display: block; margin-top: 16px; color: var(--muted); font-size: 14px; }

.cta-block {
  position: relative;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  margin: 72px 0 0;
  overflow: hidden;
}
.cta-block::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(500px 220px at 50% 0%, rgba(229, 72, 77, 0.10), transparent 70%);
  pointer-events: none;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.card:hover {
  border-color: var(--gold-hairline);
  background: var(--surface-hover);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(245, 215, 110, 0.08);
  text-decoration: none;
  transform: translateY(-2px);
}
.card .card-title { color: var(--gold); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; margin-bottom: 6px; display: block; }
.card .card-desc { color: var(--muted); font-size: 14px; line-height: 1.7; }

/* ---------- Steps ---------- */
.steps { margin: 24px 0; }
.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.step:hover { border-color: var(--gold-hairline); transform: translateY(-2px); }
.step img {
  width: 88px;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
  transition: transform 0.25s ease;
}
.step:hover img { transform: scale(1.06) rotate(-2deg); }
.step .step-num {
  color: var(--red);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.step h3 { margin: 2px 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.faq-item h3 { margin: 0 0 8px; color: var(--gold); font-size: 17px; }
.faq-item p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Article ---------- */
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold); }

.callout {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 22px 0;
  color: var(--text);
}
.callout.red { border-left-color: var(--red); }

.chant {
  background: linear-gradient(180deg, #faf2df, var(--paper));
  color: var(--paper-text);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 2;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.chant small { display: block; font-weight: 400; font-size: 13px; color: #7a6a4d; margin-top: 6px; }

.chip {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--gold);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 14px;
  margin: 0 6px 8px 0;
}

table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 15px; }
th, td { border: 1px solid var(--hairline); padding: 10px 14px; text-align: left; }
th { background: rgba(255, 255, 255, 0.05); color: var(--gold); font-weight: 600; }
td { background: var(--surface); }

.feature-list { list-style: none; padding: 0; }
.feature-list li { padding-left: 30px; position: relative; margin-bottom: 12px; }
.feature-list li::before {
  content: "✦";
  position: absolute;
  left: 4px;
  color: var(--gold);
}

.related-title { color: var(--gold); font-weight: 700; margin: 56px 0 4px; font-size: 19px; }

/* ---------- Play page ---------- */
.play-launch {
  position: relative;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  margin: 32px 0;
  overflow: hidden;
}
.play-launch::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(420px 240px at 50% 0%, rgba(229, 72, 77, 0.14), transparent 70%),
    radial-gradient(600px 300px at 50% 110%, rgba(245, 215, 110, 0.06), transparent 70%);
  pointer-events: none;
}

/* ---------- Language menu (header dropdown) ---------- */
.lang-menu { position: relative; margin-left: 2px; }
.lang-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { color: var(--text); background: var(--surface-hover); }
.lang-menu summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.lang-menu[open] summary { color: var(--gold); background: var(--surface-hover); }
.lang-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 148px;
  background: rgba(16, 20, 38, 0.85);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  z-index: 200;
}
.lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
a.lang-item:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.lang-item.lang-current { color: var(--gold); font-weight: 600; }
.lang-check { color: var(--gold); font-size: 13px; }

/* ---------- Footer（與底色同系，僅髮絲線分隔） ---------- */
.site-footer {
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid var(--hairline);
  padding: 52px 20px 36px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}
.footer-col h4 { color: var(--gold); font-size: 15px; margin: 0 0 12px; letter-spacing: 0.02em; }
.footer-col a { display: block; color: var(--muted); font-size: 14px; margin-bottom: 8px; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--gold); text-decoration: none; }
.footer-bottom {
  max-width: 1080px;
  margin: 36px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 21px; }
  .hero { padding: 56px 20px 44px; }
  .hero h1 { font-size: 34px; }
  .hero img.hero-img { width: 160px; }
  .cta-button { font-size: 18px; padding: 14px 32px; display: block; margin: 0 auto; }
  .cta-button.secondary { margin: 12px auto 0; }
  .step { flex-direction: column; }
  .step img { width: 72px; }
  .header-inner { justify-content: center; }
  .main-nav { margin-left: 0; width: 100%; justify-content: center; }
}

