
html[data-site="main"][data-theme="light"] { --bg: #e2e2e2; --cream: #402e4d; --muted: #5a4866; --soft: #7a6a86; --gold: #5b3f86; }
.gm-pop { position: absolute; z-index: 2; left: -44%; top: -10%; width: 41%; height: auto; pointer-events: none;
  transition: transform .9s cubic-bezier(.55,-0.25,.35,1.25), opacity .7s ease; transform-origin: 70% 80%; }
html[data-theme="dark"] .gm-pop { opacity: 0; transform: translate(30%, 40%) rotate(-25deg) scale(.4); }
@media (prefers-reduced-motion: reduce) { .gm-pop { transition: none; } }
html[data-site="main"] body { background: var(--bg); }
.simple { max-width: 680px; margin: 10px auto 40px; text-align: center; }
.s-cat { display: grid; place-items: center; }
.s-cat { padding-left: 12%; }
.s-cat .sky-stage { width: min(290px, 58vw); }
.simple h1 { font-size: clamp(1.7rem, 4.6vw, 2.5rem); margin: 18px 0 8px; line-height: 1.2; }
.s-sub { font-size: 1.2rem; color: var(--muted); margin: 0 0 34px; }
.big-links { display: flex; justify-content: center; gap: 14px 34px; flex-wrap: wrap; margin: 10px 0 36px; }
.big-link { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--cream); font-size: 1.1rem; }
.big-link .bi svg { width: 56px; height: 56px; image-rendering: pixelated; transition: transform .15s ease; }
.big-link:hover .bi svg { transform: translateY(-3px); }
.s-mission { font-size: 1.2rem; font-weight: 700; color: var(--cream); max-width: 30ch; margin: 0 auto 22px; }
.s-gen a { font-weight: 700; font-size: 1.1rem; }
.s-about { color: var(--muted); max-width: 46ch; margin: 22px auto; }
.s-more { font-weight: 700; margin-bottom: 30px; }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin: 6px 0 18px; }
.soc { display: block; width: 40px; height: 40px; transition: transform .15s ease; }
.soc:hover { transform: translateY(-3px); }
.soc img { width: 40px; height: 40px; }
.soc .n, html[data-theme="dark"] .soc .d { display: none; }
html[data-theme="dark"] .soc .n { display: block; }
html[data-site="main"] .site-header .brand { visibility: hidden; }
html[data-site="main"] .site-header { justify-content: flex-end; }
.s-chain { margin: 30px auto 0; max-width: 620px; text-align: left; color: var(--muted); }
.s-chain summary { cursor: pointer; text-align: center; font-weight: 700; color: var(--cream); }
.m-hero h1 { max-width: 17ch; }
.mission { text-align: center; font-size: clamp(1.15rem, 2.4vw, 1.45rem); font-weight: 700; color: var(--cream); max-width: 34ch; margin: 8px auto 48px; }
.m-sec { margin: 48px 0; }
.xgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.xcard { display: flex; gap: 12px; align-items: flex-start; padding: 16px; text-decoration: none; color: inherit; transition: transform .15s ease, border-color .15s ease; }
.xcard:hover { transform: translateY(-2px); border-color: var(--gold); }
.xi { flex: 0 0 40px; height: 40px; display: grid; place-items: center; background: var(--panel2); border-radius: 10px; font-weight: 800; }
.xi svg { width: 28px; height: 28px; image-rendering: pixelated; }
.xt { display: flex; flex-direction: column; gap: 2px; }
.xt span { color: var(--muted); font-size: .93rem; line-height: 1.4; }
.more { margin-top: 14px; font-weight: 700; }
.culture { padding: 26px; }
.culture h2 { margin-top: 0; }
.culture > p { color: var(--muted); max-width: 64ch; }
.policy { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 18px 0 8px; }
.policy .pl { font-weight: 700; font-size: .9rem; }
.policy code { background: var(--panel2); padding: 10px 12px; border-radius: 10px; word-break: break-all; font-size: .88rem; flex: 1 1 280px; }
.chain, .small { color: var(--muted); font-size: .92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 10px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--cream); font-weight: 700; }
.chip:hover { border-color: var(--gold); }
.contact { color: var(--muted); margin-top: 14px; }
.origin { color: var(--soft); font-size: .88rem; max-width: 70ch; margin: 40px auto; text-align: center; }
.memes { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.meme { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--panel2); aspect-ratio: 1; }
.meme img { width: 100%; height: 100%; object-fit: cover; display: block; }
.meme .play { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(20, 14, 30, .72); color: #fff; font-size: .8rem; }
.meme.on .play { display: none; }
.imgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.imgs figure { margin: 0; padding: 14px; }
.imgs img { width: 100%; height: auto; border-radius: 10px; }
.imgs figcaption { display: flex; justify-content: space-between; margin-top: 10px; font-weight: 700; }
.mint .steps { font-size: 1.1rem; line-height: 1.8; }
.doc { max-width: 1060px; margin: 0 auto; }
.doc-head { margin: 28px 0 30px; max-width: 760px; }
.doc-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; align-items: start; }
.toc { position: sticky; top: 16px; font-size: .92rem; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.toc ul { list-style: none; padding: 0; margin: 8px 0 0; }
.toc li { margin: 6px 0; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--gold); }
.doc-body { max-width: 720px; font-size: 1.06rem; line-height: 1.7; }
.doc-body h2 { margin: 40px 0 10px; font-size: 1.5rem; scroll-margin-top: 16px; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body blockquote { margin: 20px 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--orange); font-size: 1.25rem; font-weight: 700; color: var(--cream); }
.doc-body .origin { text-align: left; margin: 24px 0; }
@media (max-width: 900px) { .xgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .doc-grid { grid-template-columns: 1fr; } .toc { position: static; } }
@media (max-width: 560px) { .xgrid, .imgs { grid-template-columns: 1fr; } .memes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Day / night (theme.py) ---------- */
html[data-site="main"][data-theme="dark"] { color-scheme: dark;
  --bg: #17131d; --panel: #221c2b; --panel2: #2a2235; --line: #372e44; --cream: #efeaf6; --muted: #aaa0bb; --soft: #8b819c;
  --orange: #f2a582; --accent-ink: #2a1626; --gold: #b8bff0; --shadow: #6f78bf;
  --ok: #72d49a; --warn: #f5c967; --info: #8fb6ef; --purple: #9d6bcc; --green: #72d49a; --pink: #ef8faa; --sky: #8fb6ef;
  --glow1: color-mix(in srgb, var(--shadow) 18%, var(--bg)); --glow2: color-mix(in srgb, var(--orange) 8%, var(--bg));
  --spot1: color-mix(in srgb, var(--shadow) 40%, var(--panel)); --spot2: color-mix(in srgb, var(--shadow) 14%, var(--panel2));
  --footer: color-mix(in srgb, black 30%, var(--bg));
   }
html.theme-anim body, html.theme-anim .card, html.theme-anim .faq, html.theme-anim .chip-btn, html.theme-anim .site-footer, html.theme-anim .policy,
html.theme-anim .btn, html.theme-anim .spot, html.theme-anim .tile, html.theme-anim .mood, html.theme-anim input, html.theme-anim select,
html.theme-anim .step, html.theme-anim .ill { transition: background-color .7s ease, color .7s ease, border-color .7s ease, background .7s ease; }

.site-header .theme-toggle { order: 3; }
.theme-toggle { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--cream); background: var(--panel); border: 1px solid var(--line); border-radius: 99px;
  padding: 5px 14px 5px 5px; cursor: pointer; box-shadow: 2px 2px 0 var(--shadow); }
.theme-toggle:hover { border-color: var(--orange); }
.theme-toggle:focus-visible, .sky-stage:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.tt-track { position: relative; width: 52px; height: 28px; border-radius: 99px; background: linear-gradient(180deg, #9fd6ff, #ffe7b0);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cream) 15%, transparent); transition: background .6s ease; }
html[data-theme="dark"] .tt-track { background: linear-gradient(180deg, #1b2350, #3b2a5c); }
.tt-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fffaf0;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .55s cubic-bezier(.6,-0.4,.35,1.4), background .5s ease; overflow: hidden; }
html[data-theme="dark"] .tt-knob { transform: translateX(24px) rotate(360deg); background: #2b2440; }
.tt-knob svg { position: absolute; inset: 3px; width: 16px; height: 16px; transition: opacity .35s ease, transform .5s ease; }
.tt-knob .mini-moon { opacity: 0; transform: scale(.4) rotate(-90deg); }
html[data-theme="dark"] .tt-knob .mini-sun { opacity: 0; transform: scale(.4) rotate(90deg); }
html[data-theme="dark"] .tt-knob .mini-moon { opacity: 1; transform: none; }

.sky-stage { position: relative; display: block; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; border-radius: 24px;
  -webkit-tap-highlight-color: transparent; }
.sky-stage .cat { position: relative; z-index: 1; display: block; }
.sky { position: absolute; z-index: 0; left: 52%; top: 17%; width: 66%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.sky .sun, .sky .moon { position: absolute; inset: 0; width: 100%; height: 100%;
  transition: transform .9s cubic-bezier(.55,-0.25,.35,1.25), opacity .7s ease, filter .9s ease; }
.sky .sun { filter: drop-shadow(0 0 18px rgba(255, 196, 64, .65)); animation: sun-spin 40s linear infinite; }
.sky .moon { opacity: 0; transform: translateY(55%) rotate(-50deg) scale(.6); filter: drop-shadow(0 0 16px rgba(240, 232, 200, .45)); }
html[data-theme="dark"] .sky .sun { opacity: 0; transform: translateY(60%) rotate(140deg) scale(.5); animation: none; }
html[data-theme="dark"] .sky .moon { opacity: 1; transform: translate(9%, -4%); }
.stars i { position: absolute; width: 5%; aspect-ratio: 1; background: #fff7d6; opacity: 0; transform: scale(.2);
  transition: opacity .5s ease calc(.45s + var(--d)), transform .5s ease calc(.45s + var(--d)); box-shadow: 0 0 6px #fff1b8; }
html[data-theme="dark"] .stars i { opacity: 1; transform: scale(1); animation: twinkle 2.6s ease-in-out infinite var(--d); }
.cat.boop { animation: boop .6s ease; }
.sky-pair .duo { position: relative; z-index: 1; display: grid; place-items: center; }   /* both cats share one cell, so both get the same size rule (no stretched night cat) */
.sky-pair .duo .cat { grid-area: 1 / 1; transition: opacity .6s ease; }
.sky-pair .duo .cat-night { opacity: 0; }
html[data-theme="dark"] .sky-pair .duo .cat-day { opacity: 0; }
html[data-theme="dark"] .sky-pair .duo .cat-night { opacity: 1; }
html[data-theme="dark"] .hero-art .sky-pair img { filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .45)); }   /* no pale halo around the night cat */
@keyframes boop { 0% { transform: translateY(0); } 30% { transform: translateY(-9px) rotate(-2deg); } 60% { transform: translateY(2px); } 100% { transform: none; } }
@keyframes sun-spin { to { rotate: 360deg; } }
@keyframes twinkle { 50% { opacity: .35; } }
@media (max-width: 760px) {
  .site-header .theme-toggle { order: 2; margin-left: auto; }
  .site-header .site-nav { order: 3; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sky .sun, .sky .moon, .stars i, .tt-knob, .tt-knob svg, .tt-track { transition: none !important; animation: none !important; }
  .cat.boop { animation: none; }
}
