/* Dream Fortune (Checker page) — navy, indigo and gold, matching the result cards above it */
.df { margin-top: 26px; margin-bottom: 8px; scroll-margin-top: 80px; }
.df[hidden] { display: none; }
.df-card {
  position: relative; overflow: hidden; text-align: center;
  padding: 28px 22px 26px; border-radius: 22px;
  background: radial-gradient(ellipse at 50% 0%, rgba(155, 127, 212, .22), transparent 60%), linear-gradient(180deg, #1c1546 0%, #120d33 100%);
  border: 1px solid rgba(212, 175, 55, .45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(246, 220, 155, .06);
}
.df-card::before { /* faint stars */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 78% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 46%, #f6dc9b 50%, transparent 51%), radial-gradient(1px 1px at 22% 64%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 52% 30%, #f6dc9b 50%, transparent 51%), radial-gradient(1px 1px at 64% 82%, #fff 50%, transparent 51%);
}
.df-card > * { position: relative; }
.df-h { margin: 0 0 6px; color: #f6dc9b; font-size: clamp(1.4rem, 4.5vw, 1.9rem); text-wrap: balance; }
.df-sub { margin: 0 auto 18px; max-width: 560px; color: var(--text-muted); font-size: .92rem; line-height: 1.55; }

.df-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.df-wheel { position: relative; width: min(280px, 76vw); aspect-ratio: 1; max-width: 100%; border-radius: 50%; filter: drop-shadow(0 8px 26px rgba(212, 175, 55, .25)); }
.df-wheel svg { display: block; width: 100%; height: 100%; }
.df-rot { transform-origin: 100px 100px; transform-box: view-box; }
.df-rim { fill: #0d0a26; stroke: #d4af37; stroke-width: 2; }
.df-slice { stroke: rgba(246, 220, 155, .55); stroke-width: .8; }
.df-s0 { fill: #2a1f66; }
.df-s1 { fill: #1a1446; }
.df-ico { font-size: 20px; text-anchor: middle; dominant-baseline: central; }
.df-hub { fill: #d4af37; stroke: #fff3d1; stroke-width: 1.5; }
.df-hub-t { fill: #1a1430; font-size: 20px; text-anchor: middle; dominant-baseline: central; }
.df-pointer { position: absolute; top: -6px; left: 50%; z-index: 2; width: 0; height: 0; transform: translateX(-50%);
  border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 24px solid #f6dc9b; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.df-glow { animation: df-glow 1.2s ease-out; }
@keyframes df-glow { 0% { filter: drop-shadow(0 0 0 rgba(246, 220, 155, 0)); } 40% { filter: drop-shadow(0 0 28px rgba(246, 220, 155, .9)); } 100% { filter: drop-shadow(0 8px 26px rgba(212, 175, 55, .25)); } }

.df-spin, .df-make {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 26px;
  border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700; font-size: 1.02rem;
  color: #1a1430; background: linear-gradient(180deg, #f8e3a6, #d4af37); box-shadow: 0 6px 18px rgba(212, 175, 55, .35);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
}
.df-spin:hover:not(:disabled), .df-make:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(212, 175, 55, .45); }
.df-spin:disabled, .df-make:disabled { opacity: .65; cursor: default; }
.df-live { min-height: 1.4em; margin: 0; color: #f6dc9b; font-weight: 600; font-size: .95rem; }

.df-pick { margin: 18px 0 10px; color: var(--text-muted); font-size: .9rem; }
.df-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.df-dream {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 14px; text-align: left;
  border-radius: 14px; border: 1px solid rgba(155, 127, 212, .45); background: rgba(26, 20, 64, .75); color: var(--text);
  font: inherit; font-size: .93rem; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, transform .15s;
}
.df-dream > span:first-child { font-size: 1.35rem; flex-shrink: 0; }
.df-dream:hover:not(:disabled) { border-color: #d4af37; background: rgba(42, 31, 102, .9); transform: translateY(-1px); }
.df-dream[aria-pressed="true"] { border-color: #d4af37; background: rgba(212, 175, 55, .14); }
.df-dream:disabled { opacity: .55; cursor: default; }
.df-spin:focus-visible, .df-make:focus-visible, .df-dream:focus-visible, .df-title:focus-visible { outline: 2px solid #f6dc9b; outline-offset: 3px; }

.df-out { margin-top: 20px; }
.df-out[hidden] { display: none; }
.df-result { padding: 22px 18px; border-radius: 18px; background: rgba(10, 7, 34, .55); border: 1px solid rgba(246, 220, 155, .35); }
.df-in .df-result { animation: df-reveal .55s cubic-bezier(.2, .8, .2, 1); }
@keyframes df-reveal { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.df-cat { margin: 0 0 4px; color: #e7c27a; font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
html[lang="km"] .df-cat { text-transform: none; letter-spacing: 0; }
.df-title { margin: 0 0 10px; color: #fff3d1; font-size: clamp(1.2rem, 4vw, 1.5rem); text-wrap: balance; outline: none; }
.df-desc { margin: 0 auto 14px; max-width: 600px; line-height: 1.65; color: var(--text); }
.df-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 14px; }
.df-chip { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 100%; padding: 10px 14px; border-radius: 12px; background: rgba(212, 175, 55, .1); border: 1px solid rgba(212, 175, 55, .4); }
.df-chip b { color: #e7c27a; font-size: .78rem; }
.df-chip span { color: #fff3d1; font-weight: 700; font-variant-numeric: tabular-nums; }
.df-chip small { color: var(--text-muted); font-size: .74rem; max-width: 260px; }
.df-tip { margin: 0 auto 6px; max-width: 600px; color: var(--text); font-size: .95rem; }
.df-tip b { color: #f6dc9b; }
.df-fun { margin: 0 0 16px; color: var(--text-muted); font-size: .78rem; }
.df-cardmsg { min-height: 1.3em; margin: 10px 0 0; color: #f6dc9b; font-size: .9rem; }
.df-cardbox[hidden] { display: none; }
.df-preview { max-width: 300px; margin: 12px auto; border-radius: 16px; overflow: hidden; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); aspect-ratio: 1080 / 1350; }
.df-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.df-cardbox .share-row { justify-content: center; }

@media (max-width: 480px) {
  .df-card { padding: 22px 14px; border-radius: 18px; }
  .df-result { padding: 18px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .df-glow, .df-in .df-result { animation: none; }
  .df-spin, .df-make, .df-dream { transition: none; }
}

/* ---- wheel polish: rim lights, ticking pointer, winner glow, sparkles, busy button ---- */
.df-wheel::after { /* soft halo ring */
  content: ""; position: absolute; inset: -8px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 2px rgba(246, 220, 155, .18), 0 0 30px rgba(212, 175, 55, .18);
}
.df-bulb { fill: #fff3d1; opacity: .35; animation: df-twinkle 1.6s ease-in-out infinite; }
.df-b2 { animation-delay: .8s; }
@keyframes df-twinkle { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.df-spinning .df-bulb { animation-duration: .32s; }
.df-spinning::after { animation: df-halo .9s ease-in-out infinite; }
@keyframes df-halo { 0%, 100% { box-shadow: 0 0 0 2px rgba(246, 220, 155, .25), 0 0 26px rgba(212, 175, 55, .25); } 50% { box-shadow: 0 0 0 3px rgba(246, 220, 155, .55), 0 0 46px rgba(246, 220, 155, .55); } }
.df-spinning .df-hub-t { animation: df-hub 1s linear infinite; transform-origin: 100px 100px; transform-box: view-box; }
@keyframes df-hub { to { transform: rotate(-360deg); } }
.df-pointer { transform-origin: 50% 0; }
.df-tick { animation: df-tick .14s ease-out; }
@keyframes df-tick { 0% { transform: translateX(-50%) rotate(0); } 40% { transform: translateX(-50%) rotate(-16deg); } 100% { transform: translateX(-50%) rotate(0); } }
.df-slice { transition: fill .4s ease, filter .4s ease; }
.df-slice.df-win { fill: #7a5a1a; filter: drop-shadow(0 0 6px rgba(246, 220, 155, .9)); stroke: #f6dc9b; stroke-width: 1.4; }
.df-sparks { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.df-sparks i { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; background: #fff3d1;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 4px #f6dc9b); animation: df-spark 1.1s ease-out forwards; }
@keyframes df-spark {
  0% { transform: rotate(var(--a)) translateY(0) scale(.4); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: rotate(var(--a)) translateY(calc(var(--d) * -1.6)) scale(1.1); opacity: 0; }
}
.df-spin[aria-busy="true"] { background: linear-gradient(90deg, #d4af37, #fff1c4, #d4af37); background-size: 200% 100%; animation: df-shine 1.1s linear infinite; opacity: 1; }
@keyframes df-shine { to { background-position: -200% 0; } }

/* balanced result: edge + watch-out, and the careful-year chip */
.df-balance { list-style: none; margin: 0 auto 14px; padding: 0; max-width: 600px; display: grid; gap: 6px; text-align: left; }
.df-balance li { display: flex; gap: 8px; align-items: baseline; padding: 9px 12px; border-radius: 10px; background: rgba(26, 20, 64, .6); font-size: .93rem; line-height: 1.5; }
.df-balance b { color: #f6dc9b; white-space: nowrap; }
.df-chip-care { background: rgba(255, 154, 168, .08); border-color: rgba(255, 154, 168, .45); }
.df-chip-care b { color: #ffb3bf; }

@media (prefers-reduced-motion: reduce) {
  .df-bulb, .df-spinning::after, .df-spinning .df-hub-t, .df-tick, .df-sparks i, .df-spin[aria-busy="true"] { animation: none; }
  .df-bulb { opacity: .7; }
}

/* bigger, more stylish info chips on the page (years, careful year, colors) */
.df-chips { gap: 12px; }
.df-chip { padding: 12px 18px; border-radius: 16px; background: linear-gradient(180deg, rgba(246, 220, 155, .16), rgba(246, 220, 155, .05)); border-width: 1.5px; text-align: center; }
.df-chip b { font-size: .86rem; letter-spacing: .02em; }
.df-chip span { font-size: 1.3rem; letter-spacing: .03em; font-family: Georgia, "Times New Roman", serif; }
html[lang="km"] .df-chip span { font-family: "Noto Sans Khmer", "Kantumruy Pro", sans-serif; font-size: 1.25rem; }
.df-chip small { font-size: .78rem; }
.df-chip-care { background: linear-gradient(180deg, rgba(255, 154, 168, .16), rgba(255, 154, 168, .05)); }
.df-balance li { font-size: 1rem; padding: 11px 14px; border-left: 3px solid rgba(246, 220, 155, .6); }
.df-balance li:nth-child(2) { border-left-color: rgba(255, 154, 168, .75); }
.df-tip { font-size: 1rem; }
