/* =========================================================
   Хороскопи — cartoon theme (shared look with waystodecide.com)
   ========================================================= */
:root {
  --ink: #2B2340;
  --bg: #FFF6E5;
  --card: #fff;
  --muted: #6b6280;
  --yellow: #FFC83D;
  --pink: #FF6B9D;
  --red: #FF4D6D;
  --green: #6BCB77;
  --blue: #4D96FF;
  --radius: 22px;
  --shadow: 5px 5px 0 var(--ink);
  --font: 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(43, 35, 64, .08) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }
a { color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2rem, 6vw, 3.3rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
p { margin: 0 0 1em; }
code { background: var(--bg); padding: .1em .35em; border-radius: 6px; font-size: .9em; }
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); font-weight: 500; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: #fff; padding: 8px 12px; border: 3px solid var(--ink); border-radius: 12px; }
:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.site-header { padding: 14px 0 6px; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.35rem; letter-spacing: -.01em; }
.logo-sun { position: relative; display: block; width: 42px; height: 42px; flex-shrink: 0; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.logo-sun svg { display: block; width: 100%; height: 100%; }
.logo:hover .logo-sun { transform: rotate(-25deg) scale(1.12); }
.logo b { color: var(--pink); margin: 0 .08em; }
.icon-btn {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid var(--ink); background: #fff; box-shadow: 3px 3px 0 var(--ink);
  font-size: 1.15rem; cursor: pointer; display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  font: inherit; font-weight: 800; font-size: 1.1rem; line-height: 1.1;
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .75em 1.5em; min-height: 52px;
  border: 3px solid var(--ink); border-radius: 999px;
  background: var(--accent, var(--yellow)); color: var(--ink);
  box-shadow: var(--shadow); cursor: pointer; text-decoration: none;
  transition: transform .08s, box-shadow .08s, background .2s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: var(--shadow); }
.btn--big { font-size: 1.3rem; padding: .8em 1.9em; }
.btn--ghost { background: #fff; }
.btn--sm { font-size: .95rem; padding: .45em .95em; min-height: 40px; box-shadow: 3px 3px 0 var(--ink); }
.btn--sm:active { box-shadow: 0 0 0 var(--ink); transform: translate(3px, 3px); }

/* ---------- Home hero ---------- */
.hero { display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; gap: 24px; padding-top: 28px; padding-bottom: 36px; }
.hero h1 .hl { background: var(--hl, var(--yellow)); color: var(--hl-ink, inherit); padding: 0 .18em; border-radius: .25em; -webkit-box-decoration-break: clone; box-decoration-break: clone; box-shadow: 3px 3px 0 var(--ink); border: 3px solid var(--ink); line-height: 1.35; }
.hero p { font-size: 1.2rem; color: var(--muted); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-mascot { display: flex; justify-content: center; align-items: flex-end; padding-top: 50px; }
.section-title { text-align: center; margin: 8px 0 24px; }

/* ---------- Tiles ---------- */
.tiles { list-style: none; padding: 0; margin: 0 0 48px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  min-height: 196px; height: 100%; padding: 20px 20px 18px;
  background: color-mix(in srgb, var(--tc) 28%, #fff);
  border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  text-decoration: none; overflow: hidden; isolation: isolate;
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.tile::before { content: ""; position: absolute; width: 170px; height: 170px; right: -50px; bottom: -60px; border-radius: 50%; background: var(--tc); border: 3px solid var(--ink); z-index: -1; }
.tile:hover, .tile:focus-visible { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 8px 8px 0 var(--ink); }
.tile:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.tile-emoji { font-size: 2.3rem; line-height: 1; display: inline-block; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.tile:hover .tile-emoji { transform: rotate(-15deg) scale(1.2); }
.tile-title { font-size: 1.4rem; margin: 0; }
.tile p { margin: 0; font-size: .98rem; max-width: 62%; color: color-mix(in srgb, var(--ink) 80%, transparent); }
.tile .mascot { position: absolute; right: 2px; bottom: -10px; --msize: 92px; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.tile .mascot .m-body, .tile .mascot .m-hand { fill: color-mix(in srgb, var(--mc) 55%, #fff); }
.tile:hover .mascot { transform: translateY(-10px) rotate(-6deg); }
.tiles--small .tile { min-height: 160px; }

/* ---------- Tool page ---------- */
.crumbs { font-size: .92rem; color: var(--muted); margin: 6px 0 10px; }
.crumbs a { text-decoration: none; font-weight: 600; color: var(--ink); }
.crumbs a:hover { text-decoration: underline; }
.tool-head { text-align: center; margin-bottom: 18px; }
.tool-head h1 { margin-bottom: .2em; }
.lede { color: var(--muted); font-size: 1.15rem; margin: 0 auto; max-width: 44ch; }

.stage {
  position: relative; overflow: hidden;
  background: #fff; border: 3px solid var(--ink); border-radius: 28px;
  box-shadow: 8px 8px 0 var(--ink);
  padding: 34px 22px 30px; margin-bottom: 44px;
}
.stage::before { content: ""; position: absolute; inset: 0 0 auto; height: 12px; background: var(--accent); border-bottom: 3px solid var(--ink); }
.stage-grid { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; align-items: center; gap: 24px; min-height: 340px; }
.stage-grid--top { align-items: start; }
.stage-mascot { display: flex; justify-content: center; padding-top: 56px; }
.stage-play { display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0; }

.result { margin: 0; min-height: 1.4em; text-align: center; font-weight: 800; font-size: clamp(1.5rem, 5vw, 2.2rem); line-height: 1.2; }
.result--hint { font-size: 1.15rem; color: var(--muted); font-weight: 600; }
.result.pop { animation: pop-in .5s cubic-bezier(.3, 1.8, .5, 1); }
.stats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { background: var(--bg); border: 2px solid var(--ink); border-radius: 999px; padding: .2em .85em; font-weight: 600; font-size: .95rem; }
.row-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: center; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; min-width: 0; }
.field--wide { width: 100%; max-width: 460px; }
.input {
  font: inherit; font-size: 1.05rem; font-weight: 500; color: var(--ink);
  width: 100%; min-height: 50px; padding: .6em .85em;
  background: #fff; border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: inset 3px 3px 0 rgba(43, 35, 64, .08);
}
textarea.input { resize: vertical; line-height: 1.45; }
.input:focus { outline: none; border-color: var(--accent, var(--blue)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent, var(--blue)) 35%, transparent); }
.check { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; user-select: none; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); }

/* segmented control */
.seg { display: inline-flex; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; box-shadow: 3px 3px 0 var(--ink); background: #fff; }
.seg-btn { font: inherit; font-weight: 600; border: 0; background: transparent; padding: .55em 1em; cursor: pointer; min-height: 44px; color: var(--ink); }
.seg-btn + .seg-btn { border-left: 3px solid var(--ink); }
.seg-btn[aria-checked="true"] { background: var(--accent); }

/* ---------- Content cards ---------- */
.content { max-width: 780px; margin: 0 auto 30px; }
.card { background: #fff; border: 3px solid var(--ink); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.prose p:last-child { margin-bottom: 0; }
.prose a { font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 6px 0 6px 48px; margin-bottom: 8px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); display: grid; place-items: center; font-weight: 800; }
.faq details { border-top: 2px dashed rgba(43, 35, 64, .25); padding: 12px 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { font-weight: 800; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; transition: transform .2s; flex-shrink: 0; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 8px 0 0; color: #463d5c; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #fff; padding: 36px 0 30px; margin-top: 24px; }
.foot-title { font-weight: 800; font-size: 1.2rem; margin-bottom: 10px; }
.foot-links { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot-links a { color: #fff; text-decoration: none; opacity: .85; }
.foot-links a:hover { opacity: 1; text-decoration: underline; }
.site-footer small { opacity: .6; display: block; }

.notfound-wrap { text-align: center; padding-top: 70px; }
.notfound-wrap .lede { margin-bottom: 30px; }

/* =========================================================
   MASCOT
   ========================================================= */
.mascot { --ink: #2B2340; --lx: 0px; --ly: 0px; --ps: 1; position: relative; display: inline-block; width: var(--msize, 150px); flex-shrink: 0; -webkit-tap-highlight-color: transparent; }
.mascot--sm { --msize: 80px; }
.mascot--md { --msize: 130px; }
.mascot--lg { --msize: 200px; }
.mascot--xl { --msize: 260px; }
.mascot[data-poke] { cursor: pointer; }
.m-svg { display: block; width: 100%; height: auto; overflow: visible; }
.m-svg * { transform-box: fill-box; transform-origin: center; }

.m-wrap { transform-origin: 50% 100%; }
.m-shadow { fill: #000; opacity: .13; }
.m-body { fill: var(--mc); stroke: var(--ink); stroke-width: 5; }
.m-shine { fill: #fff; opacity: .55; }
.m-limb-o { fill: none; stroke: var(--ink); stroke-width: 16; stroke-linecap: round; }
.m-limb { fill: none; stroke: var(--mc); stroke-width: 7; stroke-linecap: round; }
.m-hand { fill: var(--mc); stroke: var(--ink); stroke-width: 4; }
.m-cheek { fill: #FF7A9A; opacity: .45; }
.m-brow { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.m-sclera { fill: #fff; stroke: var(--ink); stroke-width: 4; }
.m-iris { fill: var(--ink); }
.m-glint { fill: #fff; }
.m-pupil { transform: translate(var(--lx), var(--ly)) scale(var(--ps)); transition: transform .25s ease; }
.m-line, .m-strokes path { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.m-line.thin { stroke-width: 2.5; }
.m-mouth { fill: var(--ink); }
.m-tongue { fill: #FF6B8B; stroke: var(--ink); stroke-width: 3; }
.mouth-grin .m-tongue { stroke: none; }
.m-teeth { fill: #fff; stroke: var(--ink); stroke-width: 4; }
.m-sweat { fill: #8FDBFF; stroke: var(--ink); stroke-width: 3; }
.m-star { fill: #FFE14D; stroke: var(--ink); stroke-width: 2.5; }
.m-arm { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.m-svg .m-arm-l { transform-box: view-box; transform-origin: 44px 116px; }
.m-svg .m-arm-r { transform-box: view-box; transform-origin: 156px 116px; }
.m-svg .m-stars { transform-box: view-box; transform-origin: 100px 40px; }
.m-eye { animation: m-blink 4.6s infinite; }
.m-eye-r { transition: opacity .1s; }
.o { opacity: 0; transition: opacity .12s; }

/* --- which face parts are visible per mood --- */
.mascot[data-mood="idle"] :is(.eyes-normal, .mouth-smile),
.mascot[data-mood="wave"] :is(.eyes-normal, .mouth-smile),
.mascot[data-mood="nervous"] :is(.eyes-normal, .mouth-grimace, .m-sweat),
.mascot[data-mood="excited"] :is(.eyes-normal, .mouth-o),
.mascot[data-mood="happy"] :is(.eyes-happy, .mouth-grin, .m-stars),
.mascot[data-mood="shocked"] :is(.eyes-normal, .mouth-o, .m-sweat),
.mascot[data-mood="sad"] :is(.eyes-normal, .mouth-frown),
.mascot[data-mood="dizzy"] :is(.eyes-x, .mouth-wavy, .m-stars),
.mascot[data-mood="silly"] :is(.eyes-normal, .mouth-tongue, .wink-r),
.mascot[data-mood="thinking"] :is(.eyes-normal, .mouth-flat),
.mascot[data-mood="nod"] :is(.eyes-happy, .mouth-grin),
.mascot[data-mood="nope"] :is(.eyes-normal, .mouth-frown) { opacity: 1; }
.mascot[data-mood="silly"] .m-eye-r { opacity: 0; }

/* idle / wave */
.mascot[data-mood="idle"] .m-wrap,
.mascot[data-mood="wave"] .m-wrap { animation: m-breathe 3.2s ease-in-out infinite; }
.mascot[data-mood="wave"] .m-arm-r { animation: m-wave .9s ease-in-out infinite; }

/* nervous */
.mascot[data-mood="nervous"] .m-wrap { animation: m-shiver .14s linear infinite; }
.mascot[data-mood="nervous"] .m-brow-l { transform: translateY(-4px) rotate(-14deg); }
.mascot[data-mood="nervous"] .m-brow-r { transform: translateY(-4px) rotate(14deg); }
.mascot[data-mood="nervous"] .m-pupil { animation: m-dart .7s steps(1) infinite; }
.mascot[data-mood="nervous"] .m-arm-l { transform: rotate(45deg); }
.mascot[data-mood="nervous"] .m-arm-r { transform: rotate(-45deg); }

/* excited */
.mascot[data-mood="excited"] { --ly: -6px; }
.mascot[data-mood="excited"] .m-wrap { animation: m-bounce .45s ease-in-out infinite; }
.mascot[data-mood="excited"] .m-brow { transform: translateY(-7px); }
.mascot[data-mood="excited"] .m-arm-l { animation: m-arms-l .25s ease-in-out infinite alternate; }
.mascot[data-mood="excited"] .m-arm-r { animation: m-arms-r .25s ease-in-out infinite alternate; }

/* happy */
.mascot[data-mood="happy"] .m-wrap { animation: m-jump .55s ease-out 3, m-breathe 3.2s 1.65s ease-in-out infinite; }
.mascot[data-mood="happy"] .m-shadow { animation: m-shadow .55s ease-out 3; }
.mascot[data-mood="happy"] .m-brow { transform: translateY(-8px); }
.mascot[data-mood="happy"] .m-arm-l { transform: rotate(115deg); }
.mascot[data-mood="happy"] .m-arm-r { transform: rotate(-115deg); }
.mascot[data-mood="happy"] .m-star { animation: m-twinkle .5s ease-in-out infinite alternate; }

/* shocked */
.mascot[data-mood="shocked"] { --ps: .62; }
.mascot[data-mood="shocked"] .m-wrap { animation: m-pop .45s cubic-bezier(.3, 1.8, .5, 1); }
.mascot[data-mood="shocked"] .eyes-normal { transform: scale(1.14); }
.mascot[data-mood="shocked"] .mouth-o { transform: scale(1.6); }
.mascot[data-mood="shocked"] .m-brow { transform: translateY(-13px); }
.mascot[data-mood="shocked"] .m-arm-l { transform: rotate(140deg); }
.mascot[data-mood="shocked"] .m-arm-r { transform: rotate(-140deg); }

/* sad */
.mascot[data-mood="sad"] { --ly: 5px; }
.mascot[data-mood="sad"] .m-wrap { animation: m-droop 2.4s ease-in-out infinite; }
.mascot[data-mood="sad"] .m-brow-l { transform: rotate(-16deg); }
.mascot[data-mood="sad"] .m-brow-r { transform: rotate(16deg); }
.mascot[data-mood="sad"] .m-arm-l { transform: rotate(-12deg); }
.mascot[data-mood="sad"] .m-arm-r { transform: rotate(12deg); }

/* dizzy */
.mascot[data-mood="dizzy"] .m-wrap { animation: m-wobble .7s ease-in-out infinite; }
.mascot[data-mood="dizzy"] .m-stars { animation: m-orbit 1.1s linear infinite; }
.mascot[data-mood="dizzy"] .m-arm-l { animation: m-flail-l .35s ease-in-out infinite alternate; }
.mascot[data-mood="dizzy"] .m-arm-r { animation: m-flail-r .35s ease-in-out infinite alternate; }

/* silly */
.mascot[data-mood="silly"] .m-wrap { animation: m-tilt .4s ease-in-out infinite alternate; }
.mascot[data-mood="silly"] .m-brow-r { transform: translateY(5px) rotate(-8deg); }
.mascot[data-mood="silly"] .m-brow-l { transform: translateY(-6px); }
.mascot[data-mood="silly"] .m-arm-l { transform: rotate(120deg); }

/* thinking */
.mascot[data-mood="thinking"] { --lx: 6px; --ly: -6px; }
.mascot[data-mood="thinking"] .m-wrap { animation: m-sway 1.8s ease-in-out infinite; }
.mascot[data-mood="thinking"] .m-brow-r { transform: translateY(-9px) rotate(8deg); }
.mascot[data-mood="thinking"] .m-arm-r { transform: rotate(60deg); }

/* nod (yes) / nope (no) */
.mascot[data-mood="nod"] .m-wrap { animation: m-nod .32s ease-in-out 5, m-breathe 3.2s 1.6s ease-in-out infinite; }
.mascot[data-mood="nod"] .m-brow { transform: translateY(-8px); }
.mascot[data-mood="nod"] .m-arm-l { transform: rotate(110deg); }
.mascot[data-mood="nod"] .m-arm-r { transform: rotate(-110deg); }
.mascot[data-mood="nope"] .m-wrap { animation: m-nope .42s ease-in-out 4; }
.mascot[data-mood="nope"] .m-brow-l { transform: translateY(3px) rotate(16deg); }
.mascot[data-mood="nope"] .m-brow-r { transform: translateY(3px) rotate(-16deg); }
.mascot[data-mood="nope"] .m-arm-l { transform: rotate(70deg); }
.mascot[data-mood="nope"] .m-arm-r { transform: rotate(-70deg); }

/* speech bubble */
.bubble {
  position: absolute; bottom: calc(100% - 6px); left: 50%; z-index: 3;
  width: max-content; max-width: min(240px, 80vw);
  background: #fff; border: 3px solid var(--ink); border-radius: 18px;
  padding: .35em .8em; font-weight: 800; font-size: 1rem; line-height: 1.25; text-align: center;
  box-shadow: 3px 3px 0 var(--ink);
  opacity: 0; transform: translate(-50%, 10px) scale(.5); transform-origin: 50% 100%;
  transition: opacity .15s, transform .25s cubic-bezier(.3, 1.7, .5, 1); pointer-events: none;
}
.bubble::after { content: ""; position: absolute; left: 50%; top: 100%; width: 14px; height: 14px; background: #fff; border: 3px solid var(--ink); border-top: 0; border-left: 0; transform: translate(-50%, -7px) rotate(45deg); }
.bubble.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* mascot keyframes */
@keyframes m-blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes m-breathe { 0%, 100% { transform: none; } 50% { transform: scale(1.03, .97); } }
@keyframes m-wave { 0%, 100% { transform: rotate(-75deg); } 50% { transform: rotate(-118deg); } }
@keyframes m-shiver { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-2px) rotate(-1deg); } 75% { transform: translateX(2px) rotate(1deg); } }
@keyframes m-dart { 0% { transform: translate(-4px, 1px) scale(.9); } 50% { transform: translate(4px, 1px) scale(.9); } }
@keyframes m-bounce { 0%, 100% { transform: translateY(0) scale(1.04, .96); } 50% { transform: translateY(-14px) scale(.97, 1.03); } }
@keyframes m-arms-l { from { transform: rotate(90deg); } to { transform: rotate(125deg); } }
@keyframes m-arms-r { from { transform: rotate(-90deg); } to { transform: rotate(-125deg); } }
@keyframes m-jump { 0% { transform: scale(1.1, .9); } 40% { transform: translateY(-34px) scale(.94, 1.06); } 75% { transform: translateY(0) scale(1.08, .92); } 100% { transform: none; } }
@keyframes m-shadow { 40% { transform: scale(.65); opacity: .06; } }
@keyframes m-twinkle { from { transform: scale(.6) rotate(0); } to { transform: scale(1.25) rotate(45deg); } }
@keyframes m-pop { 0% { transform: scale(.85); } 55% { transform: translateY(-14px) scale(1.12, 1.1); } 100% { transform: none; } }
@keyframes m-droop { 0%, 100% { transform: translateY(5px) scale(1.03, .94); } 50% { transform: translateY(7px) scale(1.05, .92) rotate(-2deg); } }
@keyframes m-wobble { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes m-orbit { to { transform: rotate(360deg); } }
@keyframes m-flail-l { from { transform: rotate(40deg); } to { transform: rotate(140deg); } }
@keyframes m-flail-r { from { transform: rotate(-140deg); } to { transform: rotate(-40deg); } }
@keyframes m-tilt { from { transform: rotate(-7deg); } to { transform: rotate(7deg) translateY(-5px); } }
@keyframes m-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(4deg); } }
@keyframes m-nod { 50% { transform: translateY(9px) scale(1.04, .93); } }
@keyframes m-nope { 0%, 100% { transform: none; } 25% { transform: translateX(-12px) rotate(-5deg); } 75% { transform: translateX(12px) rotate(5deg); } }
@keyframes pop-in { 0% { transform: scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* =========================================================
   WHEEL
   ========================================================= */
.wheel-wrap { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin-top: 14px; }
.wheel-wrap canvas { display: block; width: 100%; height: 100%; filter: drop-shadow(5px 5px 0 var(--ink)); touch-action: manipulation; cursor: pointer; }
.wheel-pointer { position: absolute; top: -20px; left: 50%; width: 46px; height: 56px; margin-left: -23px; z-index: 2; transform-origin: 50% 30%; filter: drop-shadow(2px 2px 0 var(--ink)); }
.wheel-pointer.flick { animation: flick .14s ease-out; }
@keyframes flick { 40% { transform: rotate(-22deg); } }
.wheel-hub {
  position: absolute; inset: 0; margin: auto; width: 23%; height: 23%; border-radius: 50%; z-index: 2;
  font: inherit; font-weight: 800; font-size: clamp(.95rem, 3.6vw, 1.3rem); letter-spacing: .03em; color: var(--ink);
  background: #fff; border: 4px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); cursor: pointer;
  transition: transform .1s; -webkit-tap-highlight-color: transparent;
}
.wheel-hub:hover { transform: scale(1.06); }
.wheel-hub:active { transform: scale(.95); }
.wheel-hub:disabled { cursor: default; transform: none; }
.wheel-mascot { position: absolute; left: -34px; bottom: -26px; z-index: 3; }
.wheel-mascot .bubble { left: 80%; }
.wheel-layout { display: grid; grid-template-columns: 1fr minmax(260px, 360px); gap: 28px; align-items: center; }
.wheel-col { display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: 0; }
.wheel-hub { font-size: clamp(.8rem, 3vw, 1.1rem); }

/* =========================================================
   HOROSCOPE ADDITIONS
   ========================================================= */
.foot-seo { font-size: .95rem; opacity: .85; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 2px dashed rgba(255, 255, 255, .2); }
.foot-seo p { margin: 0; }
.site-footer .foot-links { margin-bottom: 22px; }

/* home */
.season-chip { display: inline-flex; align-items: center; gap: .35em; margin: 0 0 14px; padding: .3em .9em; background: #fff; border: 3px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); font-weight: 700; font-size: .95rem; }
.season-chip a { text-decoration: none; color: var(--pink); }
.season-chip a:hover { text-decoration: underline; }
.tiles--signs { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tile--sign { min-height: 178px; }
.sign-glyph { font-size: 2.1rem; width: 52px; height: 52px; display: grid; place-items: center; background: #fff; border: 3px solid var(--ink); border-radius: 50%; box-shadow: 2px 2px 0 var(--ink); font-weight: 400; color: var(--ink); }
.tile-dates { font-size: .85rem; font-weight: 700; color: color-mix(in srgb, var(--ink) 70%, transparent); }

/* sign picker chips */
.sign-picker { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 auto 26px; max-width: 900px; }
.sign-chip {
  display: inline-flex; align-items: center; gap: .35em; padding: .3em .8em .3em .35em; min-height: 40px;
  background: #fff; border: 3px solid var(--ink); border-radius: 999px; box-shadow: 2px 2px 0 var(--ink);
  text-decoration: none; font-weight: 700; font-size: .95rem; transition: transform .15s cubic-bezier(.3, 1.6, .5, 1), background .2s;
  -webkit-tap-highlight-color: transparent;
}
.sign-chip-sym { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--tc); border: 2px solid var(--ink); font-size: 1rem; font-weight: 400; }
.sign-chip:hover { transform: translateY(-2px) rotate(-2deg); }
.sign-chip:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.sign-chip.active { background: var(--tc); box-shadow: 4px 4px 0 var(--ink); }
.sign-chip.active .sign-chip-sym { background: #fff; }

/* sign page */
.sign-page .stage-grid { grid-template-columns: minmax(200px, 270px) 1fr; }
.sign-side { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.sign-badge { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sign-badge h2 { margin: 0; font-size: 1.9rem; }
.sign-badge p { margin: 0 0 6px; }
.sign-badge-sym { width: 64px; height: 64px; display: grid; place-items: center; font-size: 2.2rem; background: var(--accent); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 3px 3px 0 var(--ink); transition: background .3s; }
.reading-col { display: flex; flex-direction: column; align-items: stretch; gap: 18px; min-width: 0; }
.reading-col .seg { align-self: center; }
.reading { background: var(--bg); border: 3px solid var(--ink); border-radius: 20px; padding: 18px 20px; font-size: 1.08rem; line-height: 1.65; position: relative; }
.reading::before { content: "“"; position: absolute; top: -26px; left: 14px; font-size: 4rem; line-height: 1; color: var(--accent); -webkit-text-stroke: 2px var(--ink); font-weight: 900; }
.reading p:last-child { margin-bottom: 0; }
.reading.pop { animation: pop-in .4s cubic-bezier(.3, 1.6, .5, 1); }
.meters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.meter { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 14px; background: color-mix(in srgb, var(--mc2) 22%, #fff); border: 3px solid var(--ink); border-radius: 16px; }
.meter-ico { grid-row: 1 / 3; font-size: 1.7rem; line-height: 1; }
.meter-label { font-weight: 800; font-size: .95rem; }
.meter-stars { font-size: 1.25rem; letter-spacing: .06em; line-height: 1.1; color: var(--ink); }
.lucky-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lucky { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; text-align: center; background: #fff; border: 3px dashed var(--ink); border-radius: 16px; min-width: 0; }
.lucky-ico { font-size: 1.6rem; line-height: 1.1; }
.lucky-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lucky b { font-size: 1.15rem; font-weight: 900; overflow-wrap: anywhere; }

/* compatibility */
.compat { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px 20px; max-width: 760px; margin: 0 auto; }
.compat-side { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.compat-side .field { width: 100%; }
.compat-side .stage-mascot { padding-top: 50px; }
.compat-heart { font-size: 2.6rem; align-self: center; animation: heartbeat 1.3s ease-in-out infinite; }
.compat-go { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 14px; }
select.input { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.4em; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%232B2340' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7em center; background-size: 18px; font-weight: 700; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }
.compat-result { max-width: 780px; margin: 0 auto 30px; scroll-margin-top: 16px; }
.compat-pair { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 4vw, 30px); flex-wrap: wrap; margin-bottom: 22px; }
.sign-bubble { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 800; font-size: 1.1rem; }
.sign-bubble b { width: 70px; height: 70px; display: grid; place-items: center; font-size: 2.3rem; font-weight: 400; background: var(--tc); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 3px 3px 0 var(--ink); }
.score-ring { --c: #FFC83D; width: 140px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; align-content: center; background: radial-gradient(closest-side, #fff 72%, transparent 73%), conic-gradient(var(--c) calc(var(--p) * 1%), #eee3f5 0); border: 4px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); animation: pop-in .6s cubic-bezier(.3, 1.8, .5, 1); }
.score-ring b { font-size: 2.3rem; font-weight: 900; line-height: 1; }
.score-ring small { font-weight: 700; color: var(--muted); }
.score-ring--great { --c: #6BCB77; }
.score-ring--good { --c: #4D96FF; }
.score-ring--ok { --c: #FFC83D; }
.score-ring--low { --c: #FF4D6D; }
.bars { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px; }
.bars li { display: grid; grid-template-columns: 140px 1fr 52px; align-items: center; gap: 10px; font-weight: 700; }
.bars b { text-align: right; }
.bar { height: 22px; background: var(--bg); border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); background: var(--bc); border-right: 3px solid var(--ink); animation: bar-grow 1s cubic-bezier(.2, .8, .3, 1); }
@keyframes bar-grow { from { width: 0; } }
.compat-result .prose h3 { margin-top: 6px; }

/* wheel fortune */
.fortune { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fortune-head { display: flex; align-items: center; gap: 14px; }
.fortune-head h2 { margin: 0 0 6px; font-size: 1.45rem; }
.fortune-head .stats { justify-content: flex-start; }
.fortune-ico { flex-shrink: 0; width: 64px; height: 64px; display: grid; place-items: center; font-size: 2rem; background: var(--bg); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 3px 3px 0 var(--ink); }
.fortune-msg { margin: 0; padding: 14px 16px; background: color-mix(in srgb, var(--fc, var(--yellow)) 25%, #fff); border: 3px solid var(--ink); border-radius: 16px; font-size: 1.05rem; }
.fortune .lucky-grid { gap: 8px; }
.fortune .row-btns { justify-content: flex-start; }
.fortune--intro h2 { margin-bottom: 4px; }
.fortune--intro p { margin: 0; }
.countdown { margin: 0; font-weight: 700; }
.countdown b { font-variant-numeric: tabular-nums; background: var(--ink); color: #fff; padding: .1em .5em; border-radius: 8px; }

/* daily overview */
.podium-title { margin-top: 0; }
.podium { list-style: none; padding: 0; margin: 0 auto 30px; display: flex; justify-content: center; align-items: flex-end; gap: clamp(8px, 3vw, 20px); max-width: 560px; }
.podium-step { flex: 1; min-width: 0; }
.podium-link { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; }
.podium-name { font-weight: 800; text-align: center; font-size: .98rem; }
.podium-block { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--tc); border: 3px solid var(--ink); border-bottom-width: 0; border-radius: 16px 16px 0 0; box-shadow: 4px 0 0 var(--ink); }
.podium-block b { font-size: 1.6rem; font-weight: 900; line-height: 1.1; }
.podium-block small { font-weight: 800; }
.podium-1 .podium-block { height: 130px; }
.podium-2 .podium-block { height: 95px; }
.podium-3 .podium-block { height: 70px; }
.podium-link:hover .mascot { transform: translateY(-6px) rotate(-4deg); }
.podium .mascot { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.podium-1 .mascot { padding-top: 40px; }
.podium { border-bottom: 4px solid var(--ink); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 20px; }
.cat-card { background: color-mix(in srgb, var(--tc) 22%, #fff); border: 3px solid var(--ink); border-radius: 20px; padding: 14px 16px; box-shadow: 4px 4px 0 var(--ink); }
.cat-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.rank-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rank-list a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #fff; border: 2px solid var(--ink); border-radius: 12px; text-decoration: none; font-weight: 700; transition: transform .12s; }
.rank-list a:hover { transform: translateX(4px); }
.rank { font-weight: 900; width: 2em; }
.rank-sym { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--sc); border: 2px solid var(--ink); font-weight: 400; }
.rank-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-score { font-size: .9rem; letter-spacing: .02em; white-space: nowrap; }
.rank-score .dim { opacity: .2; }

/* tarot */
.tarot { all: unset; display: block; width: min(230px, 62vw); aspect-ratio: 2 / 3.2; perspective: 1000px; cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 22px; }
.tarot:focus-visible { outline: 3px dashed var(--ink); outline-offset: 6px; }
.tarot-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3, 1.3, .5, 1); }
.tarot:not(.flipped):hover .tarot-inner { transform: rotate(-3deg) translateY(-6px); }
.tarot.flipped .tarot-inner { transform: rotateY(180deg); }
.tarot.instant .tarot-inner { transition: none; }
.tarot-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; border: 4px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tarot-back { background: repeating-linear-gradient(45deg, #9B5DE5 0 14px, #8A4FD6 14px 28px); }
.tarot-back-art { display: grid; place-items: center; width: 70%; height: 80%; border: 3px solid #FFC83D; border-radius: 14px; color: #FFC83D; font-size: 2.2rem; line-height: 1.3; background: rgba(43, 35, 64, .35); }
.tarot-front { transform: rotateY(180deg); background: linear-gradient(#FFF6E5, #FFE8B8); }
.tarot-front::before { content: ""; position: absolute; inset: 10px; border: 2px dashed rgba(43, 35, 64, .35); border-radius: 14px; }
.tarot-num { font-weight: 800; font-size: .85rem; color: var(--muted); }
.tarot-emoji { font-size: 4.2rem; line-height: 1; }
.tarot-name { font-weight: 900; font-size: 1.45rem; line-height: 1.1; }
.tarot-theme { font-weight: 700; background: var(--accent); border: 2px solid var(--ink); border-radius: 999px; padding: .1em .8em; font-size: .9rem; }
.tarot-reading { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; animation: pop-in .5s cubic-bezier(.3, 1.6, .5, 1); }
.tarot-reading .row-btns { grid-column: 1 / -1; }
.note { border: 3px solid var(--ink); border-radius: 20px; padding: 16px 18px; box-shadow: 4px 4px 0 var(--ink); }
.note h2 { font-size: 1.2rem; }
.note p { margin: 0; }
.note--meaning { background: color-mix(in srgb, #9B5DE5 18%, #fff); }
.note--advice { background: color-mix(in srgb, #FFC83D 28%, #fff); }

.notfound-wrap .sign-picker { margin-bottom: 36px; }

/* zodiac finder */
.finder-form { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; width: 100%; max-width: 420px; }
.finder-form .btn { grid-column: 1 / -1; justify-self: center; }
.finder-result { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; width: 100%; max-width: 520px; padding-top: 16px; border-top: 3px dashed rgba(43, 35, 64, .2); }
.finder-result.pop { animation: pop-in .5s cubic-bezier(.3, 1.8, .5, 1); }
.finder-result h2 { margin: 0; font-size: clamp(2rem, 7vw, 2.8rem); }
.finder-result p { margin: 0; }
.finder-result .sign-badge-sym { width: 84px; height: 84px; font-size: 3rem; }
.finder-result .row-btns { margin-top: 10px; }
.finder-you { margin: 0; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: var(--muted); }
.finder-cusp { background: #FFE89A; border: 2px solid var(--ink); border-radius: 12px; padding: .35em .8em; font-weight: 700; font-size: .95rem; margin-top: 6px !important; }
.sign-table { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.sign-table a { display: grid; grid-template-columns: 28px 6.5em 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 12px; text-decoration: none; background: color-mix(in srgb, var(--tc) 14%, #fff); transition: transform .12s; }
.sign-table a:hover { transform: translateX(4px); }
.sign-table-dates { font-size: .9rem; color: var(--muted); font-weight: 600; }
.sign-table-el { font-size: .85rem; font-weight: 700; white-space: nowrap; }

/* lunar calendar */
.moon-wrap { position: relative; width: min(100%, 250px); margin: 10px auto 30px; }
.moon-svg { display: block; width: 100%; height: auto; filter: drop-shadow(6px 6px 0 var(--ink)); }
.moon-mascot { position: absolute; left: -36px; bottom: -36px; }
.moon-mascot .bubble { left: 70%; }
.moon-info { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.moon-info h2 { margin: 0; font-size: clamp(1.7rem, 5vw, 2.3rem); }
.moon-info .stats { justify-content: flex-start; }
.moon-sign { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: color-mix(in srgb, var(--tc) 22%, #fff); border: 3px solid var(--ink); border-radius: 16px; }
.moon-sign .rank-sym { width: 40px; height: 40px; font-size: 1.4rem; }
.moon-sign small { display: block; color: var(--muted); font-weight: 700; }
.lucky small { font-weight: 700; color: var(--muted); }
.moon-tips-title { margin: 0 0 6px; font-weight: 800; }
.moon-tips { justify-content: flex-start; }
.moon-cal { margin-bottom: 30px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.cal-head h2 { margin: 0; text-align: center; }
.cal-head .btn { font-size: 1.4rem; width: 46px; padding: 0; }
.cal-today { text-align: center; margin: 0 0 10px; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 10px 0 14px; }
.cal-wd { text-align: center; font-weight: 800; font-size: .85rem; color: var(--muted); padding-bottom: 2px; }
.cal-day {
  font: inherit; color: var(--ink); cursor: pointer; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 92px; padding: 6px 2px;
  background: #fff; border: 2px solid var(--ink); border-radius: 12px; transition: transform .12s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.cal-day:hover { transform: translateY(-2px); }
.cal-num { font-weight: 800; font-size: .95rem; align-self: flex-start; padding-left: 6px; line-height: 1; }
.cal-moon { font-size: 1.6rem; line-height: 1.15; }
.cal-sign { font-size: .9rem; white-space: nowrap; }
.cal-event { font-size: .72rem; font-weight: 800; background: var(--ink); color: #fff; border-radius: 999px; padding: 0 .45em; }
.cal-day--full { background: #FFF0B8; }
.cal-day--new { background: #E2DCF2; }
.cal-day--first, .cal-day--last { background: #EAF2FF; }
.cal-day--today { box-shadow: 0 0 0 3px var(--pink); border-color: var(--ink); }
.cal-day--today::after { content: "днес"; position: absolute; top: -9px; right: 4px; font-size: .65rem; font-weight: 800; background: var(--pink); color: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 0 .4em; line-height: 1.3; }
.cal-day--selected { background: var(--accent, #8FA8FF); transform: translateY(-2px); box-shadow: 3px 3px 0 var(--ink); }
.cal-detail { text-align: center; font-weight: 700; min-height: 3em; margin: 0 0 18px; padding: 10px 14px; background: var(--bg); border: 2px dashed var(--ink); border-radius: 14px; }
.cal-detail.pop { animation: pop-in .35s cubic-bezier(.3, 1.6, .5, 1); }
.phase-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.phase-list li { padding: 8px 12px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; }
.phase-list .phase-full { background: #FFF0B8; }
.phase-list .phase-new { background: #E2DCF2; }
.cal-note { font-size: .88rem; margin: 0; }
.moon-cal .cal-sign, .moon-sign .rank-sym { font-variant-emoji: text; }

@media (max-width: 760px) {
  .moon-wrap { width: 190px; margin-bottom: 40px; }
  .moon-mascot { left: -54px; bottom: -40px; }
  .moon-mascot .mascot { --msize: 92px; }
  .moon-info { text-align: left; }
}
@media (max-width: 520px) {
  .finder-form { grid-template-columns: 1fr 1fr; }
  .sign-table { grid-template-columns: 1fr; }
  .sign-table a { grid-template-columns: 28px 1fr auto; }
  .sign-table-el { display: none; }
  .cal-grid { gap: 3px; }
  .cal-day { min-height: 66px; padding: 4px 0; border-radius: 9px; }
  .cal-num { font-size: .8rem; padding-left: 4px; }
  .cal-moon { font-size: 1.15rem; }
  .cal-sign { font-size: .72rem; }
  .cal-event { font-size: .6rem; padding: 0 .3em; }
  .cal-day--today::after { display: none; }
  .moon-cal { padding: 16px 10px; }
}

/* home tools grid: 3 across so 9 tools make a tidy 3×3 */
.tiles--tools { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* chinese zodiac */
.finder-form--3 { grid-template-columns: 1fr 1.4fr 1.2fr; max-width: 480px; }
.animal-badge { width: 84px; height: 84px; display: grid; place-items: center; font-size: 3rem; background: var(--accent); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 3px 3px 0 var(--ink); }
.stage-play > .season-chip { text-decoration: none; margin: 0; }
.cny-table { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; max-height: 420px; overflow-y: auto; }
.cny-table li { display: grid; grid-template-columns: 3.2em 1fr auto; gap: 8px; align-items: center; padding: 6px 4px; border-bottom: 2px dashed rgba(43, 35, 64, .15); font-size: .95rem; }
.cny-table a { text-decoration: none; font-weight: 700; white-space: nowrap; }
.cny-table a:hover { text-decoration: underline; }
.year-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.year-list li { display: flex; flex-direction: column; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; }
.year-list li b { font-size: 1.3rem; font-weight: 900; }
.year-list li small { color: var(--muted); font-weight: 600; }
.year-list li.now { background: #FFE89A; box-shadow: 3px 3px 0 var(--ink); }
.meter--text { grid-template-rows: auto auto; align-items: start; }
.meter--text > span:last-child { grid-column: 2; font-size: .95rem; line-height: 1.45; }
.meters:has(.meter--text) { grid-template-columns: 1fr; }
.match-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 3px dashed var(--ink); border-radius: 16px; }
.match div { display: flex; flex-wrap: wrap; gap: 6px; }
.match--best { background: #E4F7E6; }
.match--clash { background: #FFE3EA; }

/* yes/no answer (mercury) */
.answer-sign {
  display: grid; place-items: center; min-width: 200px; min-height: 130px; padding: 10px 30px;
  background: var(--bg); border: 4px solid var(--ink); border-radius: 30px; box-shadow: 6px 6px 0 var(--ink);
  font-size: clamp(3rem, 13vw, 5rem); font-weight: 900; line-height: 1; letter-spacing: -.02em; text-align: center;
}
.answer-sign.yes { background: #FFC2D1; }
.answer-sign.no { background: #B8F2BF; }
.answer-sign.maybe { background: #FFE89A; font-size: clamp(2.2rem, 9vw, 3.6rem); }
.answer-sign.pop { animation: sign-pop .55s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes sign-pop { 0% { transform: scale(.5) rotate(-8deg); } 100% { transform: none; } }
.merc-sub { text-align: center; color: var(--ink); font-weight: 600; }
.retro-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.retro { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 3px 3px 0 var(--ink); }
.retro-dates { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.retro-dates b { font-size: 1.1rem; }
.retro-sign { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.retro-tag { font-size: .78rem; font-weight: 800; background: var(--pink); color: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 0 .5em; }
.retro-tag--past { background: #fff; color: var(--muted); }
.retro--now { background: #FFE3EA; }
details.retro-year summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
details.retro-year summary::-webkit-details-marker { display: none; }
details.retro-year summary h2 { margin: 0; }
details.retro-year summary::after { content: "+"; margin-left: auto; font-size: 1.6rem; line-height: 1; font-weight: 800; transition: transform .2s; }
details.retro-year[open] summary { margin-bottom: 14px; }
details.retro-year[open] summary::after { transform: rotate(45deg); }
.retro--past { opacity: .6; box-shadow: none; }
.content > .tarot-reading { margin: 0 0 24px; }
.content > .cal-note { margin: -12px 0 24px; }

/* ascendant */
.asc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 460px; }
.asc-form .field--wide { grid-column: 1 / -1; max-width: none; }
.asc-form .btn { grid-column: 1 / -1; justify-self: center; }
.asc-form .result { grid-column: 1 / -1; }
.asc-result { max-width: 860px; margin: 0 auto 30px; scroll-margin-top: 16px; }
.asc-result .section-title { margin-bottom: 4px; }
.asc-for { text-align: center; margin-bottom: 18px; }
.big3 { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.big3-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; text-align: center; background: color-mix(in srgb, var(--tc) 22%, #fff); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 4px 4px 0 var(--ink); animation: pop-in .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.big3-item--moon { animation-delay: .12s; }
.big3-item--asc { animation-delay: .24s; }
.big3-label { font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.big3-sym { width: 58px; height: 58px; display: grid; place-items: center; font-size: 2rem; background: var(--tc); border: 3px solid var(--ink); border-radius: 50%; font-variant-emoji: text; }
.big3-item b { font-size: 1.3rem; font-weight: 900; }
.big3-item small { color: var(--muted); font-weight: 700; }
.big3-item a { font-weight: 800; font-size: .9rem; }
input.input[type="date"], input.input[type="time"] { font-weight: 700; }

@media (max-width: 520px) {
  .finder-form--3 { grid-template-columns: 1fr 1fr; }
  .finder-form--3 label:nth-child(3) { grid-column: 1 / -1; }
  .match-row { grid-template-columns: 1fr; }
  .big3 { gap: 6px; }
  .big3-item { padding: 10px 4px; border-radius: 14px; }
  .big3-sym { width: 44px; height: 44px; font-size: 1.5rem; }
  .big3-item b { font-size: 1.02rem; }
  .big3-item small { font-size: .72rem; }
  .big3-label { font-size: .7rem; }
  .asc-form { grid-template-columns: 1fr; }
  .answer-sign { min-width: 0; width: 100%; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .wheel-layout { grid-template-columns: 1fr; }
  .fortune { width: 100%; max-width: 520px; margin: 0 auto; }
  .sign-page .stage-grid { grid-template-columns: 1fr; }
  .sign-side { flex-direction: row; justify-content: center; text-align: left; gap: 8px; }
  .sign-badge { align-items: flex-start; }
  .sign-badge .stats { justify-content: flex-start; }
  .sign-side .sign-badge-sym { display: none; }
  .sign-side:has(.animal-badge) { flex-direction: column; text-align: center; }
  .sign-side:has(.animal-badge) .sign-badge { align-items: center; }
  .sign-side:has(.animal-badge) .stats { justify-content: center; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 6px; gap: 6px; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-mascot { order: -1; padding-top: 44px; }
  .hero-mascot .mascot { --msize: 170px; }
  .stage { padding: 26px 14px 24px; border-radius: 24px; box-shadow: 5px 5px 0 var(--ink); }
  .stage-grid { grid-template-columns: 1fr; gap: 6px; min-height: 0; }
  .stage-mascot { padding-top: 44px; }
  .stage-mascot .mascot { --msize: 112px; }
  .sign-side .stage-mascot { padding-top: 40px; }
  .sign-side .mascot { --msize: 104px; }
  .wheel-mascot { left: -12px; bottom: -22px; }
  .wheel-mascot .mascot { --msize: 96px; }
  .compat { grid-template-columns: 1fr auto 1fr; gap: 8px; }
  .compat-side .mascot { --msize: 86px; }
  .compat-heart { font-size: 1.8rem; }
  .tarot-reading { grid-template-columns: 1fr; }
  .card { padding: 18px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 14px; }
  .tile { min-height: 168px; padding: 14px 12px; gap: 4px; }
  .tile p { display: none; }
  .tile-title { font-size: 1.08rem; }
  .tile-emoji { font-size: 1.9rem; }
  .sign-glyph { width: 44px; height: 44px; font-size: 1.7rem; }
  .tile .mascot { --msize: 74px; bottom: -8px; }
  .tile::before { width: 120px; height: 120px; right: -36px; bottom: -44px; }
  .tile-dates { font-size: .75rem; max-width: 60%; }
  .btn--big { font-size: 1.15rem; padding: .75em 1.4em; }
  .hero-cta .btn { flex: 1 1 100%; }
  .seg-btn { padding: .55em .7em; font-size: .92rem; }
  .meters { grid-template-columns: 1fr 1fr; gap: 8px; }
  .meter { padding: 8px 10px; column-gap: 6px; }
  .meter-ico { font-size: 1.3rem; }
  .meter-stars { font-size: 1.02rem; }
  .lucky { padding: 10px 4px; }
  .lucky b { font-size: 1rem; }
  .lucky-label { font-size: .68rem; letter-spacing: 0; overflow-wrap: anywhere; }
  .reading { padding: 16px; font-size: 1.02rem; }
  .bars li { grid-template-columns: 1fr 44px; }
  .bars li .bar { grid-column: 1 / -1; grid-row: 2; }
  .bars li span { grid-row: 1; }
  .podium-name { font-size: .85rem; }
  .podium-1 .mascot { --msize: 100px; }
  .podium .mascot--sm { --msize: 64px; }
  .sign-chip { font-size: .85rem; padding-right: .6em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .m-arm, .m-brow, .m-pupil, .tarot-inner { transition: none; }
}

/* show zodiac glyphs as ink text, not purple emoji squares */
.sign-glyph, .sign-chip-sym, .sign-badge-sym, .sign-bubble b, .rank-sym, .podium-name, .foot-links { font-variant-emoji: text; }
.tile-dates { max-width: 62%; }

/* ---------- Ads (manual AdSense units, see data/ads.js) ---------- */
.ad { max-width: 780px; margin: 0 auto 44px; text-align: center; }
.ad-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ad .adsbygoogle { min-height: 100px; }
/* collapse the whole spot when Google has nothing to show */
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }
.ad-placeholder { min-height: 120px; display: grid; place-items: center; border: 3px dashed color-mix(in srgb, var(--ink) 35%, transparent); border-radius: var(--radius); color: var(--muted); font-size: .9rem; background: rgba(255, 255, 255, .5); }

/* =========================================================
   HOLIDAY THEMES (data/holidays.js, data/mascot-accessories.js)
   ========================================================= */
.holiday .hero-cta .btn:not(.btn--ghost) { background: var(--hl); color: var(--hl-ink); }

/* hat on the header sun */
.site-header:has(.logo-hat) { padding-top: 26px; }
.logo .logo-hat { position: absolute; left: -6px; top: -25px; width: 50px; height: 36px; overflow: visible; }

/* name-day banner under the header */
.holiday-banner {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 10px 0 0;
  background: var(--hl, var(--yellow)); color: var(--hl-ink, var(--ink));
  border: 3px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink);
  padding: 6px 14px; font-weight: 800; line-height: 1.4;
}
.holiday-banner small { font-weight: 700; opacity: .85; }

/* mascot accessories: plain SVG transforms, and headroom for hats */
.m-svg .acc, .m-svg .acc * { transform-box: view-box; transform-origin: 0 0; }
.mascot--hat { margin-top: calc(var(--msize, 150px) * .26); }
.mascot--hat .bubble { bottom: calc(100% + var(--msize, 150px) * .24); }

/* held items turn back against the arm so they stay upright (mirrors the arm rules in the MASCOT section) */
.m-svg .acc.held-l, .m-svg .acc.held-r { transform-box: view-box; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.m-svg .acc.held-l { transform-origin: 14px 155px; }
.m-svg .acc.held-r { transform-origin: 186px 155px; }
.mascot[data-mood="wave"] .held-r { animation: cw-wave .9s ease-in-out infinite; }
.mascot[data-mood="nervous"] .held-l { transform: rotate(-45deg); }
.mascot[data-mood="nervous"] .held-r { transform: rotate(45deg); }
.mascot[data-mood="excited"] .held-l { animation: cw-arms-l .25s ease-in-out infinite alternate; }
.mascot[data-mood="excited"] .held-r { animation: cw-arms-r .25s ease-in-out infinite alternate; }
.mascot[data-mood="happy"] .held-l { transform: rotate(-115deg); }
.mascot[data-mood="happy"] .held-r { transform: rotate(115deg); }
.mascot[data-mood="shocked"] .held-l { transform: rotate(-140deg); }
.mascot[data-mood="shocked"] .held-r { transform: rotate(140deg); }
.mascot[data-mood="sad"] .held-l { transform: rotate(12deg); }
.mascot[data-mood="sad"] .held-r { transform: rotate(-12deg); }
.mascot[data-mood="dizzy"] .held-l { animation: cw-flail-l .35s ease-in-out infinite alternate; }
.mascot[data-mood="dizzy"] .held-r { animation: cw-flail-r .35s ease-in-out infinite alternate; }
.mascot[data-mood="silly"] .held-l { transform: rotate(-120deg); }
.mascot[data-mood="thinking"] .held-r { transform: rotate(-60deg); }
.mascot[data-mood="nod"] .held-l { transform: rotate(-110deg); }
.mascot[data-mood="nod"] .held-r { transform: rotate(110deg); }
.mascot[data-mood="nope"] .held-l { transform: rotate(-70deg); }
.mascot[data-mood="nope"] .held-r { transform: rotate(70deg); }
@keyframes cw-wave { 0%, 100% { transform: rotate(75deg); } 50% { transform: rotate(118deg); } }
@keyframes cw-arms-l { from { transform: rotate(-90deg); } to { transform: rotate(-125deg); } }
@keyframes cw-arms-r { from { transform: rotate(90deg); } to { transform: rotate(125deg); } }
@keyframes cw-flail-l { from { transform: rotate(-40deg); } to { transform: rotate(-140deg); } }
@keyframes cw-flail-r { from { transform: rotate(140deg); } to { transform: rotate(40deg); } }

/* lamb / pumpkin next to the home hero mascot */
.hero-side { width: 110px; flex-shrink: 0; margin: 0 -26px 4px 0; position: relative; z-index: 1; }
.hero-side svg { display: block; width: 100%; height: auto; }
@media (max-width: 720px) { .hero-side { width: 80px; margin-right: -18px; } }

/* background effect layer (public/js/holiday-fx.js): fixed, behind all content, never clickable */
.holiday-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.holiday-fx > * { position: absolute; display: block; }
.holiday-fx .fall { top: -8%; animation: fx-fall var(--d) linear var(--dl) infinite; }
.holiday-fx .fall > * { display: block; animation: fx-sway calc(var(--d) / 3) ease-in-out var(--dl) infinite alternate; }
.holiday-fx .rise { bottom: -10%; animation: fx-rise var(--d) linear var(--dl) infinite; }
.holiday-fx .fly { left: -12%; animation: fx-fly var(--d) linear var(--dl) infinite; }
.holiday-fx .fly svg { display: block; width: 100%; height: 100%; animation: fx-flap .28s ease-in-out infinite alternate; }
.holiday-fx .ltr { font-weight: 900; color: #B197FC; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; opacity: .75; }
@keyframes fx-fall { to { top: 106%; } }
@keyframes fx-rise { 0% { bottom: -10%; opacity: 0; } 15% { opacity: .75; } 85% { opacity: .75; } 100% { bottom: 105%; opacity: 0; } }
@keyframes fx-fly { to { left: 112%; } }
@keyframes fx-sway { from { transform: translateX(calc(var(--sw) * -1)) rotate(calc(var(--r) * -1)); } to { transform: translateX(var(--sw)) rotate(var(--r)); } }
@keyframes fx-flap { from { transform: scaleY(1); } to { transform: scaleY(.45); } }
@media (prefers-reduced-motion: reduce) { .holiday-fx { display: none; } .m-svg .acc.held-l, .m-svg .acc.held-r { animation: none !important; } }
