/* MyBirthSign — Chinese Zodiac Animals (animals.html). Builds on fortune.css + profile.css; scoped to body.an-page. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- hero: text left, moon + ring of 12 animals right ---------- */
.an-hero.fx-hero { background-image: url("../images/fortune/hero-night.webp"); background-position: right top; background-size: cover; text-align: left; }
.an-hero.fx-hero::before { background: linear-gradient(90deg, rgba(11, 8, 32, .78) 0%, rgba(11, 8, 32, .35) 55%, rgba(11, 8, 32, .15) 100%), linear-gradient(180deg, rgba(11, 8, 32, 0) 60%, rgba(11, 8, 32, .9) 100%); }
.an-hero-in { max-width: 1240px; margin: 0 auto; padding: 36px 20px 44px; display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
.an-hero-text .fx-eyebrow { margin-bottom: 6px; }
.an-hero h1 { margin: 0 0 12px; }
.an-hero h1 strong { display: block; font-size: clamp(2.3rem, 5.6vw, 4rem); line-height: 1.12; font-weight: 700;
  background: linear-gradient(180deg, #fff3cc 0%, #f6dc9b 45%, #d4a43a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 14px rgba(240, 111, 178, .4)); }
.an-hero .fx-sub { margin: 0 0 20px; max-width: 520px; text-align: left; }
.an-hero .pf-cta-row { justify-content: flex-start; }
.an-hero-art { position: relative; width: 100%; aspect-ratio: 1; }
.an-moon { position: absolute; left: 24%; top: 24%; width: 52%; height: 52%; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fff6c8 0, #f7d77f 38%, #e0a83e 100%); box-shadow: 0 0 0 3px rgba(246, 220, 155, .55), 0 0 70px 20px rgba(246, 200, 110, .55), 0 0 160px 60px rgba(240, 111, 178, .25); }
.an-moon::after { content: ""; position: absolute; inset: 12% 14% 40% 20%; border-radius: 50%; background: radial-gradient(circle, rgba(190, 130, 40, .22), transparent 70%); }
.an-ring { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.an-ring li { position: absolute; left: 50%; top: 50%; width: 19%; aspect-ratio: 1; margin: -9.5% 0 0 -9.5%;
  transform: rotate(calc(var(--i) * 30deg)) translateY(-200%) rotate(calc(var(--i) * -30deg)); }
.an-ring a { display: block; border-radius: 50%; transition: transform .2s ease, box-shadow .2s ease; }
.an-ring a:hover, .an-ring a:focus-visible { transform: scale(1.1); box-shadow: 0 0 28px rgba(246, 220, 155, .8); }
.an-ring .an-medal { width: 100%; height: auto; }
.an-medal { display: block; border-radius: 50%; box-shadow: 0 0 0 1px rgba(246, 220, 155, .45), 0 4px 16px rgba(0, 0, 0, .5); }

/* ---------- intro ---------- */
.an-intro { margin-top: 34px; display: grid; grid-template-columns: 1.7fr 1fr; gap: 26px; align-items: center; }
.an-intro h2 { margin: 0 0 8px; font-size: clamp(1.4rem, 3vw, 2rem); color: var(--fx-gold-hi); }
.an-intro p { margin: 0 0 8px; color: #ece6ff; line-height: 1.7; }
.an-intro-note { padding: 14px 16px; border: 1px solid rgba(231, 194, 122, .4); border-radius: 14px; background: rgba(11, 8, 32, .55); text-align: center; }
.an-intro-note p { margin-bottom: 10px; font-weight: 600; }

/* ---------- 12-animal grid ---------- */
.an-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.an-card { --ac: #e7c27a; position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 14px 14px; border-radius: 16px;
  border: 1px solid rgba(231, 194, 122, .5); border: 1px solid color-mix(in srgb, var(--ac) 60%, transparent);
  background: linear-gradient(165deg, rgba(40, 28, 90, .85), rgba(11, 8, 32, .95)); background: linear-gradient(165deg, color-mix(in srgb, var(--ac) 22%, #1a1248), #0b0820 78%);
  box-shadow: 0 0 22px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .03) inset; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.an-card:hover, .an-card:focus-within { transform: translateY(-4px); border-color: var(--fx-gold-hi); box-shadow: 0 10px 34px rgba(0, 0, 0, .5), 0 0 30px color-mix(in srgb, var(--ac) 45%, transparent); }
.an-card:hover .an-medal-card { transform: scale(1.04); }
.an-card-link { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: #fff; position: relative; }
.an-han { position: absolute; top: -4px; right: 2px; font: 400 1.7rem/1 "Noto Serif TC", "Songti SC", "SimSun", serif; color: var(--fx-gold-hi); text-shadow: 0 0 12px rgba(255, 190, 80, .6); }
.an-medal-card { width: min(150px, 78%); height: auto; aspect-ratio: 1; transition: transform .2s ease; }
.an-card h3 { margin: 10px 0 0; font-size: 1.3rem; color: var(--fx-gold-hi); }
.an-yearof { margin: 0; font-size: .85rem; color: #cfc6ee; }
.an-card dl { margin: 0; display: grid; gap: 2px; font-size: .84rem; }
.an-card dt { margin-top: 6px; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ac); font-weight: 700; }
html[lang="km"] .an-card dt { letter-spacing: 0; text-transform: none; font-size: .82rem; }
.an-card dd { margin: 0; color: #fff; line-height: 1.45; }
.an-yrs { font-variant-numeric: tabular-nums; color: #e6def8 !important; font-size: .8rem; }
.an-card .fx-btn { margin-top: auto; width: 100%; }

/* ---------- CTA, cycle, elements ---------- */
.an-cta-meds { display: flex; justify-content: center; gap: 14px; margin-bottom: 10px; }
.an-cta-meds .an-medal { width: 84px; height: 84px; box-shadow: 0 0 0 2px rgba(246, 220, 155, .6), 0 0 26px rgba(246, 200, 110, .4); }
.an-duo { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; margin-top: 54px; align-items: stretch; }
.an-duo h2 { margin: 0 0 12px; font-size: clamp(1.2rem, 2.6vw, 1.6rem); color: var(--fx-gold-hi); }
.an-duo p { margin: 0 0 8px; color: #ece6ff; line-height: 1.65; font-size: .95rem; }
.an-cycle-body { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: center; }
.an-cycle-art { position: relative; width: 250px; aspect-ratio: 1; }
.an-cycle-art::before { content: ""; position: absolute; inset: 22%; border-radius: 50%; border: 1px solid rgba(231, 194, 122, .6); background: radial-gradient(circle, rgba(246, 210, 122, .35), rgba(11, 8, 32, .2)); }
.an-cycle-label { position: absolute; inset: 0; display: grid; place-items: center; font: 700 2rem Georgia, serif; color: var(--fx-gold-hi); text-shadow: 0 0 14px rgba(246, 200, 110, .7); }
.an-order { font-size: .8rem !important; color: var(--fx-gold) !important; line-height: 1.6 !important; }
.an-el-row { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; }
.an-el-row li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .85rem; min-width: 0; }
.an-el-row img { width: 100%; max-width: 72px; height: auto; border-radius: 50%; }
.an-el-row strong { color: #fff; overflow-wrap: anywhere; }

/* ---------- personality, groups, years, blog ---------- */
.an-pers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.an-pers h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 6px; font-size: 1.1rem; color: var(--fx-gold-hi); }
.an-pers h3 svg { width: 24px; height: 24px; color: var(--fx-gold); }
.an-pers p { margin: 0; color: #ece6ff; font-size: .92rem; line-height: 1.6; }
.an-groups { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.an-group-label { margin: 0 0 10px; text-align: center; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fx-gold); }
html[lang="km"] .an-group-label { letter-spacing: 0; text-transform: none; font-size: .86rem; }
.an-group-meds { display: flex; justify-content: center; gap: 8px; }
.an-group-meds a { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; text-decoration: none; font-size: .84rem; font-weight: 600; min-width: 0; }
.an-group-meds .an-medal { width: 64px; height: 64px; }
.an-comp-btns { margin-top: 6px; }
.an-years { max-width: 820px; margin: 0 auto; }
.an-years h2 { margin: 0 0 12px; text-align: center; font-size: clamp(1.3rem, 3vw, 1.8rem); color: var(--fx-gold-hi); }
.an-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.an-table th, .an-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid rgba(231, 194, 122, .2); font-size: .95rem; }
.an-table th { width: 26%; font-weight: 700; }
.an-table th a { color: var(--fx-gold-hi); text-decoration: none; }
.an-table th a:hover { text-decoration: underline; }
.an-table td { color: #fff; }
.an-yr-note { margin: 14px 0 8px; padding: 10px 12px; border-left: 3px solid var(--fx-gold); background: rgba(231, 194, 122, .1); border-radius: 0 8px 8px 0; font-size: .88rem; color: #e6def8; }
.an-yr-btn { margin: 0; text-align: center; }
.an-blog { text-align: center; }
.an-blog h2 { color: var(--fx-gold-hi); font-size: 1.3rem; }
.an-blog a { color: var(--fx-gold-hi); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .an-grid { grid-template-columns: repeat(3, 1fr); } .an-groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 960px) {
  .an-hero-in { grid-template-columns: 1fr; text-align: center; padding-top: 28px; }
  .an-hero .fx-sub { margin-inline: auto; text-align: center; }
  .an-hero .pf-cta-row { justify-content: center; }
  .an-hero-art { max-width: 440px; margin: 0 auto; }
  .an-hero.fx-hero { background-position: 70% top; }
  .an-intro, .an-duo, .an-cycle-body { grid-template-columns: 1fr; }
  .an-cycle-art { margin: 0 auto; }
  .an-pers { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) { .an-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .an-hero.fx-hero { background-size: auto 100%; }
  .an-hero-in { padding: 24px 16px 30px; }
  .an-grid { gap: 10px; }
  .an-card { padding: 12px 9px 10px; }
  .an-card h3 { font-size: 1.1rem; }
  .an-card dl { font-size: .76rem; }
  .an-yrs { font-size: .72rem; }
  .an-han { font-size: 1.3rem; }
  .an-pers { grid-template-columns: 1fr; }
  .an-groups { grid-template-columns: 1fr; }
  .an-table th { width: 32%; }
  .an-cta-meds .an-medal { width: 64px; height: 64px; }
}
@media (max-width: 359px) { .an-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .an-card, .an-ring a, .an-medal-card { transition: none; } }
html[lang="km"] .an-hero h1 strong {
  background: none; -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-fill-color: currentColor; filter: none;
  color: #ffcf5a; font-size: clamp(1.7rem, 4.6vw, 3rem); line-height: 2; padding: .12em 0 .18em;
  text-shadow: 0 1px 0 #f3a82a, 0 2px 0 #b9741a, 0 3px 0 #7a4a0e, 0 6px 14px rgba(0, 0, 0, .55), 0 0 28px rgba(255, 190, 80, .45), 0 0 46px rgba(240, 111, 178, .4);
}
html[lang="km"] .an-intro h2, html[lang="km"] .an-duo h2 { font-size: clamp(1.1rem, 2.6vw, 1.6rem); }
.an-moon { background:
  radial-gradient(circle at 30% 30%, rgba(190, 130, 40, .28) 0 7%, transparent 8%), radial-gradient(circle at 62% 24%, rgba(190, 130, 40, .22) 0 5%, transparent 6%),
  radial-gradient(circle at 54% 62%, rgba(190, 130, 40, .26) 0 9%, transparent 10%), radial-gradient(circle at 26% 66%, rgba(190, 130, 40, .2) 0 5%, transparent 6%), radial-gradient(circle at 74% 52%, rgba(190, 130, 40, .2) 0 4%, transparent 5%),
  radial-gradient(circle at 38% 34%, #fff6c8 0, #f7d77f 38%, #e0a83e 100%); }

.an-wheel{display:block;width:100%;height:auto;border-radius:50%}
/* Phones: smaller crop of the night-sky hero (same visible area, about half the download) */
@media (max-width: 600px) { .an-hero.fx-hero { background-image: url("../images/fortune/hero-night-m.webp"); } }
