/* =========================================================
   CozyRings theme layer — loaded after style.css on every page.
   Palette and shapes come from the CozyRings logo: warm peach → rose (Cozy)
   flowing into lavender → periwinkle (Rings), a golden ring, a night-plum sky.
   ========================================================= */

:root {
  --bg: #140A26;
  --bg-2: #1D1135;
  --surface: #24163F;
  --surface-2: #2D1D4D;
  --peach: #FFB38A;
  --rose: #F48FB1;
  --lavender: #C4A1FF;
  --periwinkle: #8FB4FF;
  --ring: #F6C454;
  --plum: #2A1238;
  --text: #FFF5EC;
  --muted: #D6C8EA;
  --dim: #BBADD3;
  --line: rgba(196, 161, 255, .18);
  --line-strong: rgba(196, 161, 255, .42);
  --radius: 24px;
  --pixel: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --arcade: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --grad-brand: linear-gradient(90deg, #FFB38A 0%, #F48FB1 34%, #C4A1FF 66%, #8FB4FF 100%);
  --grad-warm: linear-gradient(135deg, #FFC49E 0%, #F7A0B8 100%);
  --grad-btn: linear-gradient(135deg, #B94E5E 0%, #8A3F9E 100%);   /* deep enough for white text (WCAG AA) */
  --purple-text: #D3B8FF;
  --magenta-text: #FF9EC0;
  --shadow-soft: 0 18px 40px rgba(8, 3, 20, .45);
}

::selection { background: var(--rose); color: var(--plum); }

/* ---------- Type: soft, rounded, grown-up ---------- */
h1, h2, h3 { font-family: var(--body); font-weight: 900; letter-spacing: -.015em; line-height: 1.1; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.9rem); }
h3 { font-size: 1.3rem; letter-spacing: -.005em; }
.brand span { font-family: var(--body); font-weight: 900; }

/* ---------- Atmosphere: a warm night sky with golden rings ---------- */
.scanlines { display: none; }
.sky {
  background:
    radial-gradient(900px 620px at 88% -8%, rgba(196, 161, 255, .26), transparent 60%),
    radial-gradient(760px 560px at -6% 30%, rgba(255, 179, 138, .16), transparent 62%),
    radial-gradient(820px 620px at 104% 82%, rgba(143, 180, 255, .13), transparent 62%),
    radial-gradient(600px 420px at 30% 108%, rgba(244, 143, 177, .12), transparent 65%),
    linear-gradient(180deg, #1D1135 0%, #140A26 52%, #1A0F31 100%);
}
.sky::before, .sky::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  border: 1.5px solid rgba(246, 196, 84, .16);
  box-shadow: 0 0 40px rgba(246, 196, 84, .06), inset 0 0 40px rgba(246, 196, 84, .04);
}
.sky::before { width: 1100px; height: 300px; right: -420px; top: 90px; transform: rotate(-14deg); }
.sky::after { width: 900px; height: 240px; left: -460px; bottom: 60px; transform: rotate(12deg); border-color: rgba(196, 161, 255, .14); }
.starfield span { border-radius: 50%; }

/* ---------- Buttons: soft pills ---------- */
.btn {
  clip-path: none; border-radius: 999px; padding: 16px 26px;
  text-transform: none; letter-spacing: .01em;
}
.btn-primary {
  background: var(--grad-warm); color: var(--plum);
  box-shadow: 0 10px 28px rgba(247, 160, 184, .28), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -3px 0 rgba(140, 60, 90, .18);
}
.btn-primary:hover { filter: brightness(1.05) drop-shadow(0 0 16px rgba(255, 179, 138, .45)); }
.btn-primary .sprite svg { filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .5)); }
.btn-ghost {
  background: rgba(196, 161, 255, .08); color: var(--text);
  box-shadow: inset 0 0 0 1.5px rgba(196, 161, 255, .5);
}
.btn-ghost:hover { background: rgba(196, 161, 255, .18); }
.btn-sm { padding: 11px 18px; font-size: .86rem; }
.nav .btn-primary { box-shadow: 0 6px 18px rgba(247, 160, 184, .25), inset 0 1px 0 rgba(255, 255, 255, .55); }

/* ---------- Labels and chips: pills ---------- */
.tag-label {
  clip-path: none; border-radius: 999px; padding: 8px 16px;
  color: #FFD9C2; background: rgba(255, 179, 138, .09); border: 1px solid rgba(255, 179, 138, .32);
  text-transform: uppercase;
}
.tag-label::before {
  content: ""; width: 18px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ring);
  transform: rotate(-16deg); flex: none; opacity: .9;
}
.tag-label .sprite { display: none; }

/* ---------- Pixel corners become soft rounded corners ---------- */
.ico, .level .node, .node-icon, .disc-icon, .how .num { clip-path: none; border-radius: 16px; }
.how .num { border-radius: 50%; }
.tile, .ap-card, .jl-rule, .eng-tip, .eng-cta { border-radius: var(--radius); }
.tile { background: linear-gradient(180deg, rgba(45, 29, 77, .72), rgba(30, 18, 54, .72)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.tile:hover { box-shadow: var(--shadow-soft), 0 0 0 1px rgba(255, 179, 138, .18); }

/* ---------- Navbar: the CozyRings wordmark ---------- */
.brand img.brand-word { width: auto; height: 42px; filter: drop-shadow(0 4px 10px rgba(8, 3, 20, .5)); }
.brand:hover img.brand-word { transform: rotate(-2deg) scale(1.03); }
.nav.scrolled { background: rgba(20, 10, 38, .84); }
.nav-links a:not(.btn)::after { height: 2px; border-radius: 2px; }
@media (max-width: 560px) { .brand img.brand-word { height: 34px; } }
.nav-toggle { border-radius: 14px; border: 1.5px solid rgba(196, 161, 255, .55); background: rgba(196, 161, 255, .1); }

/* ---------- Hero: wordmark inside a golden ring ---------- */
.hero-logo-wrap { width: min(780px, 92vw); aspect-ratio: 1136 / 268; margin: 56px auto 40px; }
@media (max-width: 700px) { .hero-logo-wrap { margin: 30px auto 28px; } .hero-logo-wrap .float-sprite { display: none; } }
.hero-logo-wrap .halo {
  inset: -60% -10%;
  background: radial-gradient(closest-side, rgba(255, 179, 138, .26), rgba(196, 161, 255, .16) 55%, transparent 78%);
}
.orbit { top: 50%; border: 2px solid rgba(246, 196, 84, .34); box-shadow: 0 0 22px rgba(246, 196, 84, .12); }
.orbit.o1 { width: 112%; }
.orbit.o2 { width: 128%; border: 1.5px dashed rgba(196, 161, 255, .3); box-shadow: none; }
.hero-logo { filter: drop-shadow(0 18px 30px rgba(8, 3, 20, .55)) drop-shadow(0 0 34px rgba(255, 179, 138, .18)); }

/* ---------- Ring dividers between big sections ---------- */
main > section + section::before {
  content: ""; display: block; width: 74px; height: 22px; margin: 0 auto 56px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 74 22'%3E%3Cellipse cx='37' cy='11' rx='34' ry='8' fill='none' stroke='%23F6C454' stroke-opacity='.55' stroke-width='2' transform='rotate(-8 37 11)'/%3E%3Ccircle cx='37' cy='11' r='7' fill='%23C4A1FF'/%3E%3Ccircle cx='35' cy='9' r='2.2' fill='%23fff' fill-opacity='.6'/%3E%3C/svg%3E");
  opacity: .85;
}

/* ---------- Footer ---------- */
.footer-logo { width: 220px; }
body > footer { background: rgba(16, 8, 30, .78); }

/* ---------- Generated: the old arcade-font labels, resized for the rounded body font ---------- */
.tag-label { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
.btn { letter-spacing: .04em; font-weight: 800; font-size: 0.92rem; }
.leader li .pos { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
.level .lv { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.footer-grid h4 { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
.status { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.faq summary::after { letter-spacing: .04em; font-weight: 800; font-size: 0.99rem; }
.node-meta { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.discipline h4 { letter-spacing: .04em; font-weight: 800; font-size: 0.84rem; }
.path .lvl { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.res-type { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.hs-label { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.forge-top { letter-spacing: .04em; font-weight: 800; font-size: 1.06rem; }
.reel-box small { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tarot-back b { letter-spacing: .04em; font-weight: 800; font-size: 0.82rem; }
.tarot-front small { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.pal-scene .hang { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.wish-result small { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.note small { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.party-title { letter-spacing: .04em; font-weight: 800; font-size: 0.82rem; }
.member.empty .q { letter-spacing: .04em; font-weight: 800; font-size: 1.54rem; }
.how .num { letter-spacing: .04em; font-weight: 800; font-size: 0.92rem; }
.ribbon { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.q-roles small { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.type-pick legend { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
.on-air { letter-spacing: .04em; font-weight: 800; font-size: 0.99rem; }
.live-badge { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.chat-title { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.side li::before { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
.sc-wants small { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
@media (max-width: 960px) {
  .has-menu .menu-trigger { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
}
.hud-chip { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.lib-label { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.anim-dot { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.ad-move small { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.deck-brand { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.lcd { letter-spacing: .04em; font-weight: 800; }
.album-bpm { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tl-info small { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.pb-loop { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.rg-hud small { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
kbd { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
.sfx-name { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.eng-rung-lbl b { letter-spacing: .04em; font-weight: 800; font-size: 0.82rem; }
.eng-box h4 { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
.qz-load { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.qz-key { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
.qz-complete { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
.qz-why h4, .qz-alt-h { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
.cf-sit.talk::before { letter-spacing: .04em; font-weight: 800; font-size: 1.06rem; }
.cf-next { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.cf-dv-label { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.cf-card-top { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.cf-quote span { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.cf-now-topic { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.dd-head { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tt-sub, .tt-step { letter-spacing: .04em; font-weight: 800; font-size: 0.82rem; }
.tt-start { letter-spacing: .04em; font-weight: 800; font-size: 0.99rem; }
.tt-hint { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tt-key { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.th-q { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tb-name { letter-spacing: .04em; font-weight: 800; font-size: 0.77rem; }
.tb-next { letter-spacing: .04em; font-weight: 800; font-size: 0.82rem; }
.tm-label { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tm-island span { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tm-region { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tm-count { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.td-ach { letter-spacing: .04em; font-weight: 800; font-size: 1.06rem; }
.area-banner small { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tour-help b { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.qs-label { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.qs-n { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.mf-label { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.hub-path-label { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.hub-step-n { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tr-hud { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tr-defeated { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
.tr-boss.dead .tr-boss-front::after { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tr-fight, .tr-flip, .tr-kill { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tr-weak { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tr-res-label { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tr-hp-label { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tr-type { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tr-pc h4 { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tr-fee.head { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tr-check-bar { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.tr-qn { letter-spacing: .04em; font-weight: 800; font-size: 0.92rem; }
.ap-side-h { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.ap-feat-txt small { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.ap-buy b { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.ap-mission-k { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
.ap-meter span { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.ap-meter b { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
.ap-want { letter-spacing: .04em; font-weight: 800; font-size: 0.92rem; }
.ap-swipe span { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.ap-play { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }
.ap-shop-head b { letter-spacing: .04em; font-weight: 800; font-size: 0.92rem; }
.ap-step-k { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.jl-picker button small { letter-spacing: .04em; font-weight: 800; font-size: 0.74rem; }
.jl-n { letter-spacing: .04em; font-weight: 800; font-size: 0.79rem; }

/* modifiers that shrink arcade text */
.btn-sm { font-size: .86rem; }

/* ---------- The cozy comet (index) ---------- */
.comet-sec { padding: 40px 0 90px; }
.comet-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; }
.comet-copy .lead { margin: 16px 0 28px; }
.comet-wish {
  min-height: 1.6em; margin-top: 18px; font-weight: 800; font-size: 1.1rem; color: #FFD9C2;
  opacity: 0; transform: translateY(6px);
}
.comet-wish.show { animation: wish-in .6s ease forwards; }
@keyframes wish-in { to { opacity: 1; transform: none; } }
.comet-stage {
  position: relative; aspect-ratio: 4 / 3; border-radius: 32px; overflow: hidden;
  background:
    radial-gradient(60% 55% at 50% 50%, rgba(196, 161, 255, .16), transparent 70%),
    radial-gradient(40% 40% at 20% 85%, rgba(255, 179, 138, .12), transparent 70%),
    linear-gradient(180deg, #1F1239, #120822);
  border: 1px solid var(--line); box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.comet-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.comet-stage canvas:active { cursor: grabbing; }
.comet-stage canvas:focus-visible { outline: 3px solid var(--ring); outline-offset: -3px; border-radius: 32px; }
.comet-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); pointer-events: none;
  font-size: .82rem; font-weight: 800; color: var(--dim); padding: 6px 14px; border-radius: 999px;
  background: rgba(20, 10, 38, .6); border: 1px solid var(--line);
}
@media (max-width: 860px) { .comet-grid { grid-template-columns: 1fr; text-align: center; } .comet-copy .lead { margin-inline: auto; } }
@media (prefers-reduced-motion: reduce) { .comet-wish.show { animation: none; opacity: 1; transform: none; } }
html.a11y-still .comet-wish.show { animation: none; opacity: 1; transform: none; }

/* ---------- Privacy-friendly video previews ---------- */
.ext-ph {
  display: block; width: 100%; height: 100%; min-height: 60px; aspect-ratio: 16 / 9;
  background:
    radial-gradient(60% 70% at 30% 30%, rgba(255, 179, 138, .22), transparent 70%),
    radial-gradient(60% 70% at 75% 70%, rgba(196, 161, 255, .25), transparent 70%),
    linear-gradient(160deg, #2D1D4D, #1A0F31);
}
.ext-notice {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px;
  margin: 0 0 18px; padding: 14px 18px; border-radius: 18px;
  background: rgba(196, 161, 255, .08); border: 1px solid var(--line);
}
.ext-notice p { margin: 0; color: var(--muted); font-size: .92rem; max-width: 640px; }
.ext-notice a { color: var(--purple-text); text-decoration: underline; }

/* ---------- Legal pages ---------- */
.legal-page h1 { font-family: var(--body); font-weight: 900; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 6px; }
.legal-toc a { font-size: .86rem; font-weight: 800; color: var(--text); padding: 7px 14px; border-radius: 999px; background: rgba(196, 161, 255, .08); border: 1px solid var(--line); }
.legal-toc a:hover { background: rgba(196, 161, 255, .18); }
.legal-page a:not(.btn) { color: var(--purple-text); text-decoration: underline; text-underline-offset: 3px; }
.legal-page ul { padding-left: 20px; display: grid; gap: 8px; }
.legal-table { overflow-x: auto; margin: 14px 0; border-radius: 16px; border: 1px solid var(--line); }
.legal-table table { width: 100%; border-collapse: collapse; min-width: 620px; font-size: .92rem; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.legal-table th { color: var(--text); font-weight: 800; background: rgba(196, 161, 255, .08); }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* ---------- Creator Spotlight page ---------- */
.sp-page section { padding: 40px 0; }
.sp-hero { padding-top: 100px !important; text-align: center; }
.sp-hero h1 { max-width: 860px; margin: 16px auto 14px; }
.sp-hero .lead { margin: 0 auto 28px; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.sp-wall, .sp-how, .sp-rules { text-align: center; }
.sp-wall .lead, .sp-how .lead { margin: 10px auto 26px; }
.sp-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 22px; }
.sp-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; text-align: left; margin-top: 18px; }
.sp-card {
  display: flex; gap: 16px; padding: 22px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(45, 29, 77, .75), rgba(30, 18, 54, .75)); border: 1px solid var(--line);
  transition: transform .25s ease, border-color .25s ease;
}
.sp-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--pc, #C4A1FF) 60%, transparent); }
.sp-avatar {
  flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 900; font-size: 1.15rem; color: var(--plum);
  background: radial-gradient(circle at 35% 30%, #fff 0 8%, var(--pc, #C4A1FF) 60%);
  box-shadow: 0 0 0 3px rgba(246, 196, 84, .55), 0 6px 18px rgba(8, 3, 20, .4);
}
.sp-info h3 { font-size: 1.15rem; margin-bottom: 4px; }
.sp-meta { color: var(--dim); font-size: .88rem; font-weight: 700; margin-bottom: 6px; }
.sp-plat { color: var(--pc, #C4A1FF); }
.sp-note { color: var(--muted); font-size: .95rem; margin-bottom: 10px; }
.sp-link { font-weight: 800; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.sp-empty { border-style: dashed; border-color: rgba(246, 196, 84, .35); }
.sp-empty .sp-avatar { background: rgba(196, 161, 255, .12); color: var(--ring); box-shadow: 0 0 0 2px dashed rgba(246, 196, 84, .5); }
.sp-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 26px 0; text-align: left; }
.sp-steps li { padding: 24px; border-radius: var(--radius); background: rgba(36, 22, 63, .7); border: 1px solid var(--line); }
.sp-steps h3 { margin: 12px 0 6px; }
.sp-steps p { color: var(--muted); }
.sp-steps a { color: var(--purple-text); text-decoration: underline; word-break: break-word; }
.sp-num { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-weight: 900; color: var(--plum); background: var(--grad-warm); }
.sp-template { text-align: left; max-width: 720px; margin: 10px auto 0; padding: 22px; border-radius: var(--radius); background: rgba(20, 10, 38, .6); border: 1px solid var(--line); }
.sp-template h3 { margin-bottom: 10px; }
.sp-template pre { white-space: pre-wrap; font: 600 .92rem/1.6 var(--body); color: var(--muted); background: rgba(196, 161, 255, .06); padding: 16px; border-radius: 14px; margin-bottom: 14px; }
.sp-copied { margin-left: 12px; color: #FFD9C2; font-weight: 800; }
.sp-rule-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 900px; margin: 22px auto; text-align: left; }
.sp-rule-list li { padding: 18px 20px; border-radius: 18px; background: rgba(36, 22, 63, .6); border: 1px solid var(--line); color: var(--muted); }
.sp-rule-list b { color: var(--text); }
.sp-legal { color: var(--dim); }
.sp-legal a { color: var(--purple-text); text-decoration: underline; }
@media (max-width: 760px) { .sp-steps, .sp-rule-list { grid-template-columns: 1fr; } }

/* Creator Hub: tighter top so the tools start right away */
.hub-hero { padding: 96px 0 10px; }
.hub-spot { padding: 10px 0 30px; }
.hub-spot-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; padding: 20px 26px; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(255, 179, 138, .12), rgba(196, 161, 255, .12)); border: 1px solid rgba(246, 196, 84, .3);
}
.hub-spot-card > span:nth-child(2) { flex: 1 1 320px; color: var(--muted); }
.hub-spot-card b { color: var(--text); }
.hub-spot-ring { width: 46px; height: 20px; border-radius: 50%; border: 2px solid var(--ring); transform: rotate(-14deg); flex: none; }

/* =========================================================
   The tour with Bit — cozy version
   ========================================================= */
.bit { display: block; width: 100%; height: 100%; overflow: visible; }
.bit .bit-float { animation: bitBob 2.6s ease-in-out infinite; transform-origin: 60px 64px; }
.bit .bit-eyes { animation: bitBlink 4.5s infinite; transform-origin: 60px 60px; }
.bit .bit-antenna { animation: bitWiggle 3s ease-in-out infinite; transform-origin: 60px 26px; }
.bit-wave .bit-float { animation: bitHello 1.6s ease-in-out infinite; }
.bit-happy .bit-float { animation: bitJump 1s ease-in-out infinite; }
@keyframes bitBob { 50% { transform: translateY(-4px); } }
@keyframes bitBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes bitWiggle { 50% { transform: rotate(8deg); } }
@keyframes bitHello { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg) translateY(-3px); } 75% { transform: rotate(6deg) translateY(-3px); } }
@keyframes bitJump { 50% { transform: translateY(-8px) scale(1.03); } }

/* title + question screens */
.tour-title {
  background:
    radial-gradient(700px 480px at 50% 40%, rgba(196, 161, 255, .22), transparent 70%),
    radial-gradient(600px 400px at 15% 90%, rgba(255, 179, 138, .16), transparent 70%),
    linear-gradient(180deg, #1D1135, #140A26 60%, #24123A) !important;
}
.tour-title::after { display: none; }
.tt-stars i { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: #FFE8C8; box-shadow: 0 0 10px rgba(255, 232, 200, .8); opacity: .2; animation: ttTwinkle 3s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes ttTwinkle { to { opacity: .9; } }
.tt-logo { width: min(460px, 80vw); filter: drop-shadow(0 12px 30px rgba(8, 3, 20, .6)); }
.tt-hello { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.tt-hello .bit { width: 92px; height: 92px; }
.tt-bubble {
  position: relative; margin: 0; padding: 14px 18px; border-radius: 20px; max-width: 300px; text-align: left;
  background: #FFF5EC; color: var(--plum); font-weight: 800; box-shadow: 0 10px 24px rgba(8, 3, 20, .4);
}
.tt-bubble::before { content: ""; position: absolute; left: -8px; top: 50%; width: 16px; height: 16px; background: #FFF5EC; transform: translateY(-50%) rotate(45deg); border-radius: 3px; }
.tt-sub, .tt-step { font: 800 .9rem var(--body); letter-spacing: .06em; text-transform: uppercase; color: #FFD9C2; }
.tt-h { font-family: var(--body); font-weight: 900; }
.tt-start {
  font: 800 1.05rem var(--body); color: var(--plum); padding: 16px 30px; border: 0; border-radius: 999px;
  background: var(--grad-warm); box-shadow: 0 12px 30px rgba(247, 160, 184, .35), inset 0 1px 0 rgba(255, 255, 255, .6);
  animation: none;
}
.tt-start:hover, .tt-start:focus-visible { transform: translateY(-2px); outline: 3px solid var(--ring); outline-offset: 4px; }
.tt-skip { color: var(--muted); }
.tt-hint { font: 700 .85rem var(--body); color: var(--dim); }
.tt-class { border-radius: 24px; background: linear-gradient(180deg, rgba(45, 29, 77, .9), rgba(30, 18, 54, .9)); border: 1.5px solid var(--line-strong); box-shadow: none; }
.tt-class b { font-family: var(--body); font-weight: 900; font-size: 1.3rem; }
.tt-key { font: 800 .75rem var(--body); border-radius: 999px; padding: 2px 8px; }

/* spotlight around the highlighted part */
.tour-spot { border-radius: 24px; box-shadow: 0 0 0 9999px rgba(12, 5, 24, .66), 0 0 0 3px rgba(246, 196, 84, .9), 0 0 30px rgba(246, 196, 84, .45) !important; }
.tour-spot i { display: none; }

/* top progress */
.tour-hud { border-radius: 999px; background: rgba(29, 17, 53, .92); border: 1px solid var(--line-strong); box-shadow: 0 8px 24px rgba(8, 3, 20, .4); }
.th-q { font: 800 .82rem var(--body); color: #FFD9C2; }
.th-q b { font-weight: 800; }
.th-xp { border: 0; border-radius: 999px; background: rgba(196, 161, 255, .18); height: 8px; }
.th-xp i { background: var(--grad-brand); border-radius: 999px; }

/* Bit's dialog card */
.tour-box {
  border-radius: 28px !important; border: 1px solid rgba(255, 179, 138, .35) !important;
  background: linear-gradient(180deg, #2D1D4D, #21143D) !important; color: var(--text) !important;
  box-shadow: 0 24px 60px rgba(8, 3, 20, .6), inset 0 1px 0 rgba(255, 255, 255, .06) !important;
}
.tour-box::before { display: none; }
.tb-portrait {
  width: 96px; height: 96px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 50% 45%, rgba(255, 179, 138, .3), rgba(196, 161, 255, .12) 70%);
  box-shadow: inset 0 0 0 2px rgba(246, 196, 84, .4);
}
.tb-portrait .bit { width: 88px; height: 88px; }
.tb-name { font: 900 1rem var(--body); color: #FFD9C2; letter-spacing: 0; }
.tb-name span { color: var(--dim); font-weight: 700; }
.tb-text { color: var(--text); font-weight: 700; }
.tb-dots i { border-radius: 50%; background: rgba(196, 161, 255, .28); }
.tb-dots i.done { background: var(--lavender); }
.tb-dots i.on { background: var(--peach); }
.tb-skip { color: var(--dim); }
.tb-back { border-radius: 50%; border: 1.5px solid var(--line-strong); background: rgba(196, 161, 255, .1); color: var(--text); }
.tb-next {
  font: 800 .98rem var(--body); color: var(--plum); padding: 12px 20px; border: 0; border-radius: 999px;
  background: var(--grad-warm); box-shadow: 0 8px 20px rgba(247, 160, 184, .3), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.tb-next:active { transform: translateY(2px); box-shadow: 0 4px 10px rgba(247, 160, 184, .3); }
.tb-next:focus-visible, .tb-back:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }

/* world map: controls always stay on screen */
.tour-map {
  display: flex !important; flex-direction: column; justify-content: flex-start; gap: 14px;
  padding: 70px 20px 0 !important; overflow-y: auto;
  background: linear-gradient(180deg, #1D1135, #140A26) !important;
}
.tour-map[hidden] { display: none !important; }
.tm-head, .tm-body { flex: none; }
.tm-body { margin-top: auto !important; }
.tm-label { font: 800 .82rem var(--body); text-transform: uppercase; letter-spacing: .06em; color: #FFD9C2; }
.tm-head h2 { font-family: var(--body); font-weight: 900; }
.tm-world { border: 1px solid var(--line-strong); border-radius: 26px; }
.tm-sea { background: radial-gradient(circle at 30% 20%, rgba(143, 180, 255, .35), transparent 55%), linear-gradient(160deg, #24305E, #1A1440) !important; }
.tm-island:nth-of-type(2) { background: radial-gradient(circle at 40% 35%, #FFE8C8, #FFB38A 55%, #C9725E 85%) !important; }
.tm-island span { font: 900 .72rem var(--body); letter-spacing: .08em; border-radius: 999px; }
.tm-node { border-radius: 50%; }
.tm-node.on { background: #FFE8C8; box-shadow: 0 0 0 6px rgba(246, 196, 84, .35), 0 0 26px rgba(246, 196, 84, .5); }
.tm-node.seen { border-color: var(--lavender); }
.tm-bot { width: 54px; height: 54px; }
.tm-card { border-radius: 24px; border: 0; background: #FFF5EC; box-shadow: 0 16px 40px rgba(8, 3, 20, .45); }
.tm-region { font: 800 .78rem var(--body); text-transform: uppercase; letter-spacing: .05em; color: #8A4E6A; }
.tm-title h3 { font-family: var(--body); font-weight: 900; }
.tm-title .sprite { border-radius: 50%; }
.tm-card li::before { content: "✦"; color: #C8577F; }
.tm-warp { color: #6A3FA0; text-decoration: underline; }
.tm-ctrl {
  position: sticky; bottom: 0; z-index: 2; flex: none; margin: 0 -20px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(20, 10, 38, 0), rgba(20, 10, 38, .95) 30%);
}
.tm-body + .tm-ctrl { margin-top: auto; }
@media (max-width: 900px) {
  .tour-map { padding-top: 64px !important; }
  .tm-head p { font-size: .92rem; }
  .tm-node { width: 40px; height: 40px; }
  .tm-bot { width: 42px; height: 42px; }
}

/* finale */
.td-badge { width: 120px; height: 120px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(255, 179, 138, .3), transparent 70%); border: 0; box-shadow: none; }
.td-badge .bit { width: 110px; height: 110px; }
.td-ach { font: 900 1.2rem var(--body); color: #FFD9C2; }
.td-xp { font: 800 1rem var(--body); color: var(--muted); }
.td-confetti i { border-radius: 50%; }

/* replay button in the corner */
.tour-help { width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 4px; background: radial-gradient(circle at 50% 40%, #3A2560, #1D1135); box-shadow: 0 0 0 1.5px rgba(246, 196, 84, .5), 0 10px 24px rgba(8, 3, 20, .45); }
.tour-help b { font: 900 .8rem var(--body); background: var(--grad-warm); color: var(--plum); border: 2px solid #1D1135; }
.tour-help:hover { box-shadow: 0 0 0 2px var(--ring), 0 0 24px rgba(246, 196, 84, .45); }

/* new-area banner */
.area-banner { border-radius: 24px !important; background: rgba(29, 17, 53, .95) !important; border: 1px solid rgba(255, 179, 138, .35) !important; }
.area-banner small { font: 800 .8rem var(--body) !important; text-transform: uppercase; letter-spacing: .06em; color: #FFD9C2 !important; }
.area-banner .ab-line { display: none; }

@media (prefers-reduced-motion: reduce) { .bit .bit-float, .bit .bit-eyes, .bit .bit-antenna, .tt-stars i { animation: none !important; } }
html.a11y-still .bit .bit-float, html.a11y-still .bit .bit-eyes, html.a11y-still .bit .bit-antenna, html.a11y-still .tt-stars i { animation: none !important; }
@media (max-width: 900px) {
  .tb-portrait { width: 58px; height: 58px; }
  .tb-portrait .bit { width: 54px; height: 54px; }
  .tt-hello .bit { width: 76px; height: 76px; }
}

/* ---------- Creators menu: third column ---------- */
.dd-feature .dd-card {
  display: block; margin: 0 0 6px; padding: 14px 14px 14px 16px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 179, 138, .16), rgba(196, 161, 255, .16)); border: 1px solid rgba(246, 196, 84, .3);
}
.dd-feature .dd-card b { margin-bottom: 3px; }
.dd-ring { display: block; width: 34px; height: 14px; margin-bottom: 8px; border-radius: 50%; border: 2px solid var(--ring); transform: rotate(-14deg); }
.dd-feature .dd-card:hover, .dd-feature .dd-card:focus-visible { background: linear-gradient(135deg, rgba(255, 179, 138, .26), rgba(196, 161, 255, .26)); }
.dd-bit { width: 32px; height: 32px; display: block; }
.dd-bit .bit { width: 32px; height: 32px; }

/* =========================================================
   Bit chat
   ========================================================= */
.bitc {
  position: fixed; left: 18px; bottom: 88px; z-index: 950;
  width: min(390px, calc(100vw - 24px)); height: min(580px, calc(100vh - 120px)); height: min(580px, calc(100dvh - 120px));
  display: flex; flex-direction: column; border-radius: 26px; overflow: hidden;
  background: linear-gradient(180deg, #2D1D4D, #1D1135); border: 1px solid rgba(255, 179, 138, .35);
  box-shadow: 0 24px 60px rgba(8, 3, 20, .6);
  animation: bitcIn .25s ease;
}
.bitc[hidden] { display: none; }
@keyframes bitcIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.bitc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(120deg, rgba(255, 179, 138, .16), rgba(196, 161, 255, .16)); border-bottom: 1px solid var(--line); }
.bitc-head-av { width: 44px; height: 44px; flex: none; }
.bitc-head-av .bit, .bitc-av .bit { width: 100%; height: 100%; }
.bitc-head b { display: block; font-weight: 900; font-size: 1.05rem; color: #FFD9C2; }
.bitc-head small { display: block; color: var(--muted); font-weight: 700; font-size: .82rem; }
.bitc-head > div { flex: 1; }
.bitc-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(196, 161, 255, .1); color: var(--text); cursor: pointer; font-size: .95rem; }
.bitc-x:hover { background: rgba(196, 161, 255, .22); }
.bitc-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.bitc-msg { display: flex; gap: 8px; align-items: flex-end; }
.bitc-msg.user { justify-content: flex-end; }
.bitc-av { width: 32px; height: 32px; flex: none; }
.bitc-bubble { max-width: 85%; padding: 10px 14px; border-radius: 18px; font-size: .94rem; line-height: 1.5; }
.bitc-msg.bot .bitc-bubble { background: #FFF5EC; color: var(--plum); border-bottom-left-radius: 6px; }
.bitc-msg.user .bitc-bubble { background: var(--grad-warm); color: var(--plum); font-weight: 700; border-bottom-right-radius: 6px; }
.bitc-bubble p { margin: 0; }
.bitc-bubble p + p, .bitc-bubble ul + p, .bitc-bubble p + ul { margin-top: 6px; }
.bitc-bubble ul[dir="rtl"] { padding-left: 0; padding-right: 18px; }
.bitc-bubble ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.bitc-bubble a { color: #6A3FA0; font-weight: 800; text-decoration: underline; }
.bitc-topic { display: inline-block; margin-bottom: 4px; font-size: .7rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: #8A4E6A; }
.bitc-small { font-size: .84rem; color: #5A3D68; }
.bitc-note { font-size: .8rem; color: #5A3D68; background: rgba(196, 161, 255, .18); border-radius: 10px; padding: 4px 8px; margin-bottom: 6px !important; }
.bitc-bubble code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; background: rgba(106, 63, 160, .1); padding: 1px 5px; border-radius: 6px; overflow-wrap: anywhere; }
.bitc-table-wrap { margin-top: 8px; overflow-x: auto; border-radius: 12px; border: 1px solid rgba(106, 63, 160, .2); }
.bitc-table-wrap:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }
.bitc-table { border-collapse: collapse; width: 100%; min-width: 320px; font-size: .8rem; line-height: 1.35; }
.bitc-table th, .bitc-table td { padding: 6px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(106, 63, 160, .14); }
.bitc-table thead th { background: rgba(196, 161, 255, .25); font-weight: 900; }
.bitc-table tbody th { font-weight: 900; white-space: nowrap; color: #6A3FA0; }
.bitc-table tr:last-child th, .bitc-table tr:last-child td { border-bottom: 0; }
.bitc-chips-label { flex: none; align-self: center; font-size: .74rem; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.bitc-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bitc-links a { font-size: .82rem; text-decoration: none; padding: 5px 10px; border-radius: 999px; background: rgba(196, 161, 255, .25); color: #3D2366; }
.bitc-links a:hover { background: rgba(196, 161, 255, .45); }
.bitc-typing { display: flex; gap: 4px; padding: 4px 0; }
.bitc-typing i { width: 7px; height: 7px; border-radius: 50%; background: #B48CF5; animation: bitcDot 1s infinite; }
.bitc-typing i:nth-child(2) { animation-delay: .15s; } .bitc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bitcDot { 50% { transform: translateY(-4px); opacity: .5; } }
.bitc-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px 10px; scrollbar-width: thin; }
.bitc-chip { flex: none; font: 800 .82rem var(--body); color: var(--text); padding: 7px 12px; border-radius: 999px; cursor: pointer; background: rgba(196, 161, 255, .12); border: 1px solid var(--line-strong); white-space: nowrap; }
.bitc-chip:hover { background: rgba(196, 161, 255, .25); }
.bitc-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.bitc-form input { flex: 1; min-width: 0; font: 700 .95rem var(--body); color: var(--text); padding: 11px 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: rgba(20, 10, 38, .6); }
.bitc-form input::placeholder { color: var(--dim); }
.bitc-form input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(244, 143, 177, .25); }
.bitc-form button { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; cursor: pointer; background: var(--grad-warm); color: var(--plum); font-size: 1rem; }
.bitc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 14px 10px; font-size: .74rem; color: var(--dim); font-weight: 700; }
.bitc-tour { background: none; border: 0; padding: 0; color: #FFD9C2; font: 800 .78rem var(--body); text-decoration: underline; cursor: pointer; }
.bitc :focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
@media (max-width: 560px) {
  .bitc { left: 8px; right: 8px; bottom: 82px; width: auto; height: calc(100dvh - 150px); }
}
@media (prefers-reduced-motion: reduce) { .bitc { animation: none; } .bitc-typing i { animation: none; } }
html.a11y-still .bitc { animation: none; }

/* =========================================================
   Bit's Cozy Corner (bit.html)
   ========================================================= */
.bit-page section { padding: 40px 0; }
.bp-hero { padding-top: 96px !important; }
.bp-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.bp-hero h1 { margin: 16px 0 14px; }
.bp-hero .lead { margin-bottom: 22px; }
.bp-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.bp-stats span { padding: 8px 14px; border-radius: 999px; background: rgba(196, 161, 255, .1); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: .92rem; }
.bp-stats b { color: #FFD9C2; font-weight: 900; }
.bp-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Bit's room */
.bp-room {
  position: relative; aspect-ratio: 1 / .9; border-radius: 40px; overflow: hidden;
  background:
    radial-gradient(60% 50% at 70% 30%, rgba(255, 196, 140, .22), transparent 70%),
    linear-gradient(180deg, #3A2560 0%, #2D1D4D 62%, #4A2E5E 62%, #3B2350 100%);
  border: 1px solid rgba(255, 179, 138, .3); box-shadow: var(--shadow-soft), inset 0 0 80px rgba(20, 10, 38, .5);
}
.bp-window {
  position: absolute; left: 9%; top: 10%; width: 34%; aspect-ratio: 1 / 1.1; border-radius: 50% 50% 18px 18px;
  background: radial-gradient(circle at 70% 30%, #33407A, #1A1440 70%); border: 8px solid #6B4B7E; box-shadow: inset 0 0 20px rgba(0, 0, 0, .4), 0 8px 20px rgba(0, 0, 0, .3);
  overflow: hidden;
}
.bp-window::before, .bp-window::after { content: ""; position: absolute; background: #6B4B7E; }
.bp-window::before { left: 50%; top: 0; bottom: 0; width: 6px; transform: translateX(-50%); }
.bp-window::after { top: 55%; left: 0; right: 0; height: 6px; }
.bp-window i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #FFE8C8; box-shadow: 0 0 6px #FFE8C8; animation: ttTwinkle 2.6s ease-in-out infinite alternate; }
.bp-window i:nth-child(1) { left: 20%; top: 22%; } .bp-window i:nth-child(2) { left: 70%; top: 70%; animation-delay: .8s; } .bp-window i:nth-child(3) { left: 30%; top: 75%; animation-delay: 1.6s; }
.bp-moon { position: absolute; right: 16%; top: 14%; width: 26%; aspect-ratio: 1; border-radius: 50%; box-shadow: -8px 4px 0 0 #FFE8C8; filter: drop-shadow(0 0 8px rgba(255, 232, 200, .6)); }
.bp-lamp { position: absolute; right: 12%; top: 0; width: 18%; height: 34%; }
.bp-lamp::before { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 55%; background: #8A6A8E; }
.bp-lamp::after { content: ""; position: absolute; left: 50%; top: 55%; width: 70%; aspect-ratio: 1.6; transform: translateX(-50%); border-radius: 50% 50% 8px 8px / 80% 80% 8px 8px; background: linear-gradient(#FFC49E, #F7A0B8); box-shadow: 0 30px 70px 30px rgba(255, 196, 140, .28); }
.bp-shelf { position: absolute; right: 8%; top: 44%; width: 34%; height: 4%; border-radius: 6px; background: #6B4B7E; display: flex; align-items: flex-end; gap: 4%; padding: 0 8%; }
.bp-shelf i { display: block; width: 12%; transform: translateY(-100%); border-radius: 3px 3px 0 0; }
.bp-shelf i:nth-child(1) { height: 260%; background: #F48FB1; } .bp-shelf i:nth-child(2) { height: 320%; background: #8FB4FF; }
.bp-shelf i:nth-child(3) { height: 240%; background: #F6C454; transform: translateY(-100%) rotate(12deg); } .bp-shelf i:nth-child(4) { height: 300%; background: #C4A1FF; margin-left: auto; border-radius: 50% 50% 3px 3px; }
.bp-planet { position: absolute; left: 50%; bottom: 7%; width: 46%; aspect-ratio: 2.4; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 40% 30%, #E7D6FF, #B794F6 50%, #6B4FB8); box-shadow: 0 16px 30px rgba(8, 3, 20, .5); }
.bp-ring { position: absolute; left: -16%; right: -16%; top: 30%; height: 44%; border-radius: 50%; border: 4px solid #F6C454; }
.bp-ring.back { clip-path: inset(0 0 50% 0); opacity: .6; }
.bp-ring.front { clip-path: inset(50% 0 0 0); }
.bp-bit { position: absolute; left: 50%; bottom: 20%; width: 40%; aspect-ratio: 1; transform: translateX(-50%); cursor: pointer; filter: drop-shadow(0 10px 18px rgba(8, 3, 20, .45)); }
.bp-bubble {
  position: absolute; left: 50%; bottom: 62%; transform: translateX(-10%); max-width: 56%; margin: 0;
  padding: 10px 14px; border-radius: 18px 18px 18px 4px; background: #FFF5EC; color: var(--plum); font-weight: 800; font-size: .95rem;
  box-shadow: 0 10px 22px rgba(8, 3, 20, .35);
}
.bp-bubble.pop { animation: bpPop .35s cubic-bezier(.2, .8, .2, 1.3); }
@keyframes bpPop { from { transform: translateX(-10%) scale(.85); opacity: .3; } }
.bp-mug { position: absolute; left: 12%; bottom: 12%; width: 9%; aspect-ratio: .9; border-radius: 4px 4px 10px 10px; background: #FFF5EC; box-shadow: 0 6px 12px rgba(8, 3, 20, .4); }
.bp-mug::after { content: ""; position: absolute; right: -38%; top: 22%; width: 40%; height: 45%; border: 4px solid #FFF5EC; border-left: 0; border-radius: 0 50% 50% 0; }
.bp-mug span, .bp-mug span::before { position: absolute; left: 35%; bottom: 110%; width: 6px; height: 22px; border-radius: 6px; background: rgba(255, 255, 255, .35); animation: bpSteam 2.4s ease-in-out infinite; }
.bp-mug span::before { content: ""; left: 160%; bottom: 0; animation-delay: .8s; }
@keyframes bpSteam { 0% { transform: translateY(6px) scaleY(.6); opacity: 0; } 50% { opacity: .9; } 100% { transform: translateY(-10px) scaleY(1); opacity: 0; } }

/* Ask Bit */
.bp-head { text-align: center; margin-bottom: 22px; }
.bp-head .lead { margin: 10px auto 0; }
.bp-ask-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: stretch; }
.bp-chat {
  display: flex; flex-direction: column; height: min(640px, 78vh); border-radius: 30px; overflow: hidden;
  background: linear-gradient(180deg, rgba(45, 29, 77, .92), rgba(29, 17, 53, .92)); border: 1px solid rgba(255, 179, 138, .3); box-shadow: var(--shadow-soft);
}
.bp-chat .bitc-log { padding: 20px; gap: 14px; }
.bp-chat .bitc-bubble { max-width: 80%; font-size: 1rem; }
.bp-chat .bitc-av { width: 40px; height: 40px; }
.bp-chat .bitc-form { padding: 14px 16px; }
.bp-chat .bitc-chips { padding: 0 16px 12px; flex-wrap: wrap; overflow: visible; }
.bp-shelves { padding: 18px; border-radius: 30px; background: rgba(36, 22, 63, .7); border: 1px solid var(--line); max-height: min(640px, 78vh); overflow-y: auto; }
.bp-shelves h3 { font-size: 1.05rem; margin-bottom: 10px; color: #FFD9C2; }
.bp-shelf-list { display: grid; gap: 8px; }
.bp-shelf-item { border-radius: 18px; background: rgba(196, 161, 255, .07); border: 1px solid var(--line); }
.bp-shelf-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 11px 14px; font-weight: 900; }
.bp-shelf-item summary::-webkit-details-marker { display: none; }
.bp-shelf-item summary::after { content: "▾"; margin-left: auto; color: var(--dim); transition: transform .2s; }
.bp-shelf-item[open] summary::after { transform: rotate(180deg); }
.bp-shelf-item > div { display: grid; gap: 6px; padding: 0 12px 12px; }
.bp-q { text-align: left; font: 700 .9rem var(--body); color: var(--text); padding: 8px 12px; border-radius: 12px; cursor: pointer; background: rgba(20, 10, 38, .45); border: 1px solid transparent; }
.bp-q:hover, .bp-q:focus-visible { border-color: rgba(255, 179, 138, .5); background: rgba(255, 179, 138, .1); outline: none; }

/* Bit's desk */
.bp-desk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.bp-card { position: relative; padding: 24px; border-radius: 28px; background: linear-gradient(180deg, rgba(45, 29, 77, .8), rgba(30, 18, 54, .8)); border: 1px solid var(--line); }
.bp-card-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; background: var(--grad-warm); margin-bottom: 12px; }
.bp-card h3 { margin-bottom: 8px; }
.bp-small { color: var(--muted); font-size: .92rem; }
.bp-small a { color: var(--purple-text); text-decoration: underline; }
.bp-tip blockquote { margin: 6px 0 8px; padding: 14px 16px; border-radius: 18px; background: #FFF5EC; color: var(--plum); font-weight: 700; line-height: 1.55; }
.bp-tip-who { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.bp-timer { display: grid; justify-items: center; gap: 4px; margin: 14px 0; padding: 16px; border-radius: 22px; background: rgba(20, 10, 38, .5); }
.bp-timer b { font-size: 2.6rem; font-weight: 900; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: #FFD9C2; }
.bp-timer span { color: var(--muted); font-weight: 700; font-size: .9rem; }
.bp-timer-bit { width: 78px; height: 78px; transition: filter .4s; }
.bp-timer-bit.asleep { filter: saturate(.6) brightness(.85); }
.bp-timer-bit.asleep .bit-eyes { transform: scaleY(.12); animation: none; }
.bp-how { margin: 4px 0 6px; padding-left: 20px; display: grid; gap: 4px; color: var(--muted); font-size: .9rem; }
.bp-how b { color: var(--text); }
.bp-phase { font-weight: 900 !important; color: #FFD9C2 !important; }
.bp-timer[data-mode="rest"] { background: rgba(30, 40, 70, .55); }
.bp-timer[data-mode="rest"] .bp-phase { color: #B8D0FF !important; }
.bp-bar { width: 100%; height: 8px; border-radius: 999px; background: rgba(196, 161, 255, .15); overflow: hidden; margin: 4px 0 2px; }
.bp-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad-warm); transition: width .3s linear; }
.bp-timer[data-mode="rest"] .bp-bar i { background: linear-gradient(90deg, #8FB4FF, #C4A1FF); }
.bp-next { font-size: .82rem !important; }
.bp-set { margin: 14px 0 6px; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--line); display: grid; gap: 10px; }
.bp-set legend { padding: 0 6px; font-weight: 900; color: #FFD9C2; font-size: .9rem; }
.bp-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.bp-presets .jl-chip { padding: 6px 11px; font-size: .82rem; }
.bp-nums { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.bp-nums > label { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--muted); font-size: .9rem; }
.bp-num { display: inline-flex; align-items: center; border-radius: 12px; border: 1.5px solid var(--line-strong); background: rgba(20, 10, 38, .6); overflow: hidden; }
.bp-num button { width: 30px; height: 34px; border: 0; background: rgba(196, 161, 255, .12); color: var(--text); font: 900 1rem var(--body); cursor: pointer; }
.bp-num button:hover { background: rgba(196, 161, 255, .28); }
.bp-num input { width: 48px; height: 34px; border: 0; background: transparent; color: #FFD9C2; text-align: center; font: 900 1rem var(--body); -moz-appearance: textfield; }
.bp-num input::-webkit-outer-spin-button, .bp-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bp-num:focus-within { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(244, 143, 177, .25); }
.bp-timer-modes, .bp-timer-ctrl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.bp-check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: .88rem; }
.bp-duck-step { margin: 10px 0; }
.bp-duck-n { font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; color: #FFD9C2; }
.bp-duck-q { margin: 6px 0 0; padding: 12px 14px; border-radius: 16px; background: #FFF5EC; color: var(--plum); font-weight: 800; }
.bp-duck-tips { margin: 10px 0; padding-left: 20px; color: var(--muted); display: grid; gap: 4px; font-size: .92rem; }
.bp-duck-notes { margin: 10px 0; color: var(--muted); font-size: .9rem; }
.bp-duck-notes summary { cursor: pointer; font-weight: 800; color: var(--text); }
.bp-duck-notes ol { padding-left: 20px; display: grid; gap: 8px; margin-top: 8px; }
.bp-duck textarea { width: 100%; resize: vertical; font: 700 .95rem var(--body); color: var(--text); padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line-strong); background: rgba(20, 10, 38, .6); }
.bp-duck textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(244, 143, 177, .25); }

/* Teach Bit */
.bp-teach-card { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 28px 32px; border-radius: 32px; background: linear-gradient(120deg, rgba(255, 179, 138, .14), rgba(196, 161, 255, .14)); border: 1px solid rgba(246, 196, 84, .3); }
.bp-teach-card > div:last-child { flex: 1 1 320px; }
.bp-teach-card p { color: var(--muted); margin: 8px 0 16px; }
.bp-teach-bit { width: 120px; height: 120px; flex: none; }

/* the floating chat: link to Bit's page */
.bitc-home { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(196, 161, 255, .1); color: var(--text); font-size: 1rem; text-decoration: none; }
.bitc-home:hover { background: rgba(196, 161, 255, .22); }

/* Daily spark + Bit's room decorations */
.spark-grid { display: grid; grid-template-columns: minmax(0, 720px); justify-content: center; }
.spark-type { display: inline-flex; gap: 6px; font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; color: #FFD9C2; }
.spark-title { font-size: 1.5rem; margin: 10px 0 8px; }
.spark-body { color: var(--muted); margin-bottom: 12px; }
.spark-pal { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.spark-pal span { display: grid; place-items: end center; width: 64px; height: 56px; border-radius: 14px; background: var(--c); border: 2px solid rgba(255, 255, 255, .25); padding-bottom: 4px; }
.spark-pal b { font-size: .66rem; padding: 1px 5px; border-radius: 6px; background: rgba(20, 10, 38, .75); color: #fff; }
.spark-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.spark-next { margin-bottom: 16px; }
.spark-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.spark-stats div { display: grid; justify-items: center; padding: 12px 6px; border-radius: 18px; background: rgba(20, 10, 38, .5); text-align: center; }
.spark-stats b { font-size: 1.6rem; font-weight: 900; color: #FFD9C2; font-variant-numeric: tabular-nums; }
.spark-stats span { color: var(--muted); font-weight: 700; font-size: .82rem; }
.spark-week { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.spark-week li { flex: 1; display: grid; place-items: center; height: 36px; border-radius: 12px; background: rgba(196, 161, 255, .1); border: 1px solid var(--line); font-weight: 900; color: var(--dim); }
.spark-week li.done { background: var(--grad-warm); color: var(--plum); border-color: transparent; }
.spark-week li.today { box-shadow: 0 0 0 2px #F6C454; }
.spark-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; margin: 0; padding: 12px 18px; border-radius: 999px; background: #FFF5EC; color: var(--plum); font-weight: 900; box-shadow: 0 14px 30px rgba(8, 3, 20, .45); }
.spark-toast.show { animation: bpPop .35s cubic-bezier(.2, .8, .2, 1.3); }
@media (max-width: 980px) { .spark-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .spark-pal span { width: 56px; } }
@media (prefers-reduced-motion: reduce) { .spark-toast.show { animation: none !important; } }
/* Dev journal */
.jr-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; margin-bottom: 18px; }
.jr-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.jr-when { flex: 1; text-align: center; }
.jr-when h3 { margin: 0; }
.jr-when small { color: var(--muted); font-weight: 700; }
.jr-arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(196, 161, 255, .1); color: var(--text); font: 900 1.3rem var(--body); cursor: pointer; }
.jr-arrow:hover:not(:disabled) { background: rgba(196, 161, 255, .25); }
.jr-arrow:disabled { opacity: .35; cursor: default; }
.jr-label { display: block; margin: 10px 0 6px; font-weight: 900; color: #FFD9C2; }
.bp-journal textarea, .jr-goal-form input { width: 100%; font: 700 .95rem var(--body); color: var(--text); padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line-strong); background: rgba(20, 10, 38, .6); resize: vertical; }
.bp-journal textarea:focus, .jr-goal-form input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(244, 143, 177, .25); }
.jr-x { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--dim); cursor: pointer; }
.jr-x:hover, .jr-x:focus-visible { background: rgba(244, 143, 177, .2); color: var(--text); }
.jr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 14px; }
.jr-stats div { display: grid; justify-items: center; text-align: center; padding: 10px 6px; border-radius: 16px; background: rgba(20, 10, 38, .5); }
.jr-stats b { font-size: 1.35rem; font-weight: 900; color: #FFD9C2; }
.jr-stats span { color: var(--muted); font-weight: 700; font-size: .78rem; }
.jr-map-scroll { overflow-x: auto; padding-bottom: 6px; }
.jr-months, .jr-map { display: grid; grid-template-columns: repeat(var(--cols, 53), 13px); gap: 3px; min-width: max-content; }
.jr-months { height: 16px; font-size: .7rem; color: var(--muted); font-weight: 800; }
.jr-months span { white-space: nowrap; }
.jr-map { grid-template-rows: repeat(7, 13px); }
.jr-map i, .jr-legend i { display: block; width: 13px; height: 13px; border-radius: 3px; background: rgba(196, 161, 255, .1); cursor: pointer; }
.jr-map i.l1, .jr-legend .l1 { background: #5B3E7A; }
.jr-map i.l2, .jr-legend .l2 { background: #9A5E9E; }
.jr-map i.l3, .jr-legend .l3 { background: #E58AAE; }
.jr-map i.l4, .jr-legend .l4 { background: #FFC49E; }
.jr-map i.sel { outline: 2px solid #F6C454; outline-offset: 1px; }
.jr-legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; color: var(--muted); font-size: .78rem; font-weight: 800; margin: 6px 0; }
.jr-legend i { cursor: default; }
.jr-backup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.jr-backup label { cursor: pointer; }
.jr-backup input:focus-visible + span, .jr-backup label:focus-within { outline: 3px solid var(--rose); }
.pwa-install-btn { font-size: .85rem; padding: 6px 12px; }
footer .legal-links { flex-wrap: wrap; align-items: center; }
.pwa-hint { flex-basis: 100%; text-align: center; margin: 6px auto 0; max-width: 560px; padding: 8px 12px; border-radius: 12px; background: rgba(196, 161, 255, .14); color: var(--text); font-weight: 700; font-size: .85rem; }
@media (max-width: 980px) { .jr-grid { grid-template-columns: 1fr; } .jr-stats { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 980px) {
  .bp-hero-grid, .bp-ask-grid { grid-template-columns: 1fr; }
  .bp-room { max-width: 520px; width: 100%; margin: 0 auto; }
  .bp-desk-grid { grid-template-columns: 1fr; }
  .bp-shelves { max-height: none; }
  .bp-chat { height: min(600px, 80vh); }
}
@media (prefers-reduced-motion: reduce) { .bp-window i, .bp-mug span, .bp-mug span::before, .bp-bubble.pop { animation: none !important; } }
html.a11y-still .bp-window i, html.a11y-still .bp-mug span, html.a11y-still .bp-mug span::before, html.a11y-still .bp-bubble.pop { animation: none !important; }

/* =====================================================================
   Calm layout: fewer decorations, clear groups, steady spacing.
   Inspired by the quiet, ordered pages of sites like Apple, Stripe and Linear:
   one idea per section, generous white space, one accent per heading.
   ===================================================================== */
main > section + section::before { display: none; }
.sky::before, .sky::after { display: none; }
.starfield span { opacity: .55; }
section { padding: 96px 0; }
@media (max-width: 760px) { section { padding: 64px 0; } }
.section-head { margin-bottom: 48px; }
.section-head .lead { max-width: 620px; margin-left: auto; margin-right: auto; }
/* only the main title of a page keeps the gradient */
h2 .grad, h3 .grad { background: none; -webkit-text-fill-color: currentColor; color: #FFC9A8; }

/* the slogan */
.hero-slogan {
  display: inline-block; margin: 0 0 14px; padding: 6px 14px; border-radius: 999px;
  font-size: .82rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: #FFD9C2; background: rgba(255, 179, 138, .08); border: 1px solid rgba(255, 179, 138, .28);
}
footer .slogan { text-align: center; margin: 22px 0 0; color: var(--muted); font-size: .9rem; font-weight: 700; letter-spacing: .02em; }
footer .slogan span { color: #FFD9C2; }

/* the toolbox: two clear groups of equal cards */
.tool-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 900px) { .tool-groups { grid-template-columns: 1fr; } }
.tool-group {
  padding: 26px; border-radius: var(--radius);
  background: rgba(30, 18, 54, .55); border: 1px solid rgba(196, 161, 255, .16);
}
.tg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 0 4px; }
.tg-head h3 { margin: 0; font-size: 1.35rem; }
.tg-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.tg-list { display: grid; gap: 10px; }
.tool-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  padding: 16px 18px; border-radius: 16px; color: var(--text); text-decoration: none;
  background: rgba(45, 29, 77, .5); border: 1px solid transparent;
  transition: background .2s, border-color .2s, transform .2s;
}
.tool-card:hover, .tool-card:focus-visible { background: rgba(60, 38, 100, .7); border-color: rgba(255, 179, 138, .35); transform: translateY(-1px); }
.tool-card .ico { width: 48px; height: 48px; display: grid; place-items: center; margin: 0; }
.tool-card .ico .sprite { width: 26px; }
.tc-text { display: grid; gap: 3px; min-width: 0; }
.tc-text b { font-size: 1.05rem; }
.tc-text span { color: var(--muted); font-size: .93rem; line-height: 1.5; }
.tc-go { color: var(--muted); font-size: 1.2rem; transition: transform .2s, color .2s; }
.tool-card:hover .tc-go { transform: translateX(3px); color: #FFD9C2; }
@media (max-width: 480px) { .tool-group { padding: 16px; } .tool-card { gap: 12px; padding: 14px; } .tc-go { display: none; } }
@media (prefers-reduced-motion: reduce) { .tool-card, .tc-go { transition: none; } .tool-card:hover { transform: none; } }

/* community card: no floating ornaments */
.portal-cta .ring, .portal-cta .float-sprite { display: none; }
.landscape { height: 120px; margin-top: 48px; }
@media (max-width: 760px) { .landscape { height: 80px; } }

/* "New spot found" no longer covers the page title: a small note at the bottom */
.area-banner, body.has-pagebar .area-banner {
  top: auto !important; bottom: 22px; width: auto; max-width: calc(100vw - 32px);
  padding: 10px 20px !important; gap: 2px !important; box-shadow: 0 12px 30px rgba(8, 3, 20, .5);
}
.area-banner { cursor: default !important; }
.area-banner b { font: 800 1.05rem var(--body) !important; text-shadow: none !important; gap: 8px !important; }
.area-banner b .sprite { width: 20px !important; height: 20px !important; }
.area-banner p { font-size: .88rem; }
.ap-split-text { display: grid; gap: 12px; }
.ap-split-text p { margin: 0; }
.ap-split .ap-plan-note { font-size: .86rem; color: var(--dim); padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- Dev diary: clearer layout ---------- */
.jr-how { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.jr-how li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: rgba(30, 18, 54, .55); border: 1px solid rgba(196, 161, 255, .16); }
.jr-how li > b { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-warm); color: var(--plum); font-weight: 900; }
.jr-how strong { display: block; margin-bottom: 2px; }
.jr-how span { color: var(--muted); font-size: .92rem; line-height: 1.45; }
@media (max-width: 760px) { .jr-how { grid-template-columns: 1fr; } }
.jr-note-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: .86rem; font-weight: 700; }
.jr-past { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.jr-past h4 { margin: 0 0 8px; font-size: .95rem; color: #FFD9C2; }
.jr-past ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.jr-past button { width: 100%; display: flex; gap: 12px; align-items: baseline; text-align: left; padding: 9px 12px; border-radius: 12px; border: 1px solid transparent; background: rgba(20, 10, 38, .45); color: var(--text); font: 700 .9rem var(--body); cursor: pointer; }
.jr-past button:hover, .jr-past button:focus-visible { border-color: rgba(255, 179, 138, .4); background: rgba(45, 29, 77, .6); }
.jr-past button b { flex: none; width: 52px; color: #FFD9C2; }
.jr-past button span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-empty { color: var(--muted); font-weight: 700; font-size: .9rem; padding: 6px 2px; }

/* goals */
.jr-goals-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.jr-goals-top h3 { margin: 0; }
.jr-goal-count { color: var(--muted); font-weight: 800; font-size: .85rem; }
.jr-progress { height: 8px; border-radius: 99px; background: rgba(196, 161, 255, .14); margin: 12px 0 14px; overflow: hidden; }
.jr-progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad-warm); transition: width .4s ease; }
.jr-goal-form { display: flex; gap: 8px; margin: 0 0 12px; }
.jr-add { flex: none; width: 46px; border-radius: 16px; border: 0; background: var(--grad-warm); color: var(--plum); font: 900 1.5rem var(--body); cursor: pointer; }
.jr-add:hover { filter: brightness(1.06); }
.jr-goals { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.jr-goals li { display: flex; align-items: center; gap: 6px; padding: 12px 10px 12px 14px; border-radius: 16px; background: rgba(45, 29, 77, .5); border: 1px solid rgba(196, 161, 255, .14); transition: border-color .2s; }
.jr-goals li:hover { border-color: rgba(255, 179, 138, .3); }
.jr-goals li label { flex: 1; display: flex; align-items: center; gap: 12px; font-weight: 800; cursor: pointer; overflow-wrap: anywhere; position: relative; }
.jr-goals li input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; cursor: pointer; }
.jr-tick { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255, 179, 138, .6); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.jr-goals li input:checked + .jr-tick { background: var(--grad-warm); border-color: transparent; }
.jr-goals li input:checked + .jr-tick::after { content: "✓"; color: var(--plum); font-weight: 900; font-size: .85rem; }
.jr-goals li input:focus-visible + .jr-tick { outline: 3px solid var(--rose); outline-offset: 2px; }
.jr-goals li.done span { text-decoration: line-through; color: var(--dim); }
.jr-goals li.jr-empty { display: block; background: none; border: 1px dashed rgba(196, 161, 255, .25); text-align: center; }
.jr-done-box { margin-top: 14px; }
.jr-done-box summary { cursor: pointer; font-weight: 800; color: var(--muted); padding: 4px 0; }
.jr-done-box .jr-goals { margin: 8px 0 10px; }
.jr-done-box li { background: rgba(20, 10, 38, .35); }
@media (prefers-reduced-motion: reduce) { .jr-progress i, .jr-tick, .jr-goals li { transition: none; } }
.jr-grid > *, .jr-past li, .jr-past button span { min-width: 0; }

/* ---------- "Get the app": always visible at the top ---------- */
.nav-install {
  display: inline-flex; align-items: center; gap: 6px; order: 3; margin-left: 18px;
  padding: 9px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  font: 800 .88rem var(--body); color: var(--text);
  background: rgba(196, 161, 255, .12); border: 1.5px solid rgba(196, 161, 255, .55);
  transition: background .2s, border-color .2s;
}
.nav-install:hover, .nav-install:focus-visible { background: rgba(196, 161, 255, .24); border-color: #FFD9C2; }
.nav-install[hidden] { display: none; }
.nav .nav-links { order: 2; margin-left: auto; }
.nav .nav-toggle { order: 4; }
@media (max-width: 960px) {
  .nav-install { order: 1; margin-left: auto; margin-right: 10px; padding: 8px 12px; }
}
@media (max-width: 380px) { .nav-install .ni-text { display: none; } .nav-install { padding: 8px 10px; } }
.pwa-pop {
  position: fixed; top: 88px; right: 16px; z-index: 1200; width: min(360px, calc(100vw - 32px));
  padding: 14px 40px 14px 16px; border-radius: 18px; background: #24153F; color: var(--text);
  border: 1px solid rgba(255, 179, 138, .45); box-shadow: 0 16px 40px rgba(8, 3, 20, .55);
}
.pwa-pop b { display: block; margin-bottom: 4px; color: #FFD9C2; }
.pwa-pop p { margin: 0; font-size: .92rem; line-height: 1.5; }
.pwa-pop-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.pwa-pop-x:hover { background: rgba(244, 143, 177, .2); color: var(--text); }
.hero-install { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 22px; }
.hero-install-btn {
  padding: 10px 20px; border-radius: 999px; cursor: pointer; font: 800 .95rem var(--body); color: #FFD9C2;
  background: rgba(255, 179, 138, .08); border: 1.5px dashed rgba(255, 179, 138, .55);
}
.hero-install-btn:hover, .hero-install-btn:focus-visible { background: rgba(255, 179, 138, .16); border-style: solid; }
.hero-install-btn[hidden], .hero-install-btn[hidden] + .hero-install-note { display: none; }
.hero-install-note { color: var(--dim); font-size: .82rem; font-weight: 700; }
.hero-install .pwa-hint { max-width: 520px; }
