/* ==========================================================================
   Uga Nila — the playful layer: Nila's sky, her moods, the day orbit, the focus deck,
   planets, the command bar and Focus mode. Calm mode / reduce-motion turns movement off.
   ========================================================================== */

/* ---------------------------------------------------------------- Nila, the character */
.nila { overflow: visible; display: block; }
.nila .halo { fill: rgba(233, 211, 151, .16); transform-box: fill-box; transform-origin: center; animation: halo 4.5s ease-in-out infinite; }
.nila .body { fill: url(#g-nila); }
.nila .crown path { fill: none; stroke: #9c7a2c; stroke-width: 1.8; opacity: .55; stroke-linecap: round; }
.nila .crown .dash { stroke-dasharray: 2.5 3; }
.nila .crown circle { fill: #9c7a2c; opacity: .6; }
.nila .crater { fill: #c9a654; opacity: .3; }
.nila .cheek { fill: #f2998b; opacity: .5; }
.nila .eyes ellipse { fill: #0b1630; }
.nila .eyes .glint { fill: #fff; }
.nila .eyes path { fill: none; stroke: #0b1630; stroke-width: 3.4; stroke-linecap: round; }
.nila .eyes.open { transform-box: fill-box; transform-origin: center; animation: blink 5.5s infinite; }
.nila .eyes.joy, .nila .eyes.shut, .nila .mouth.open, .nila .mouth.o, .nila .zz, .nila .orbit { display: none; }
.nila .mouth.smile { fill: none; stroke: #0b1630; stroke-width: 3.2; stroke-linecap: round; }
.nila .mouth.open, .nila .mouth.o { fill: #0b1630; }
.nila .zz text { fill: #e9d397; font: 700 15px var(--font); }
.nila .orbit circle { fill: #f3e3ad; }
.nila .bob { animation: bob 3.8s ease-in-out infinite; }

.nila.mood-party .eyes.open { display: none; }
.nila.mood-party .eyes.joy { display: inline; }
.nila.mood-party .mouth.smile { display: none; }
.nila.mood-party .mouth.open { display: inline; }
.nila.mood-party .bob { animation-duration: 1.4s; }
.nila.mood-party .halo { fill: rgba(243, 227, 173, .32); }
.nila.mood-think .eyes.open { transform: translate(3px, -3px); animation: none; }
.nila.mood-think .orbit { display: inline; transform-box: view-box; transform-origin: 60px 60px; animation: spin 2.2s linear infinite; }
.nila.mood-think .mouth.smile { transform: scaleX(.6); transform-box: fill-box; transform-origin: center; }
.nila.mood-sleep .eyes.open { display: none; }
.nila.mood-sleep .eyes.shut, .nila.mood-sleep .zz { display: inline; }
.nila.mood-sleep .zz text { animation: zz 2.6s ease-in-out infinite; }
.nila.mood-sleep .zz text + text { animation-delay: .9s; }
.nila.mood-sleep .mouth.smile { display: none; }
.nila.mood-sleep .mouth.o { display: inline; transform: scale(.7); transform-box: fill-box; transform-origin: center; }
.nila.mood-sleep .bob { animation-duration: 6s; }
.nila.mood-wow .eyes.open { transform: scale(1.18); animation: none; }
.nila.mood-wow .mouth.smile { display: none; }
.nila.mood-wow .mouth.o { display: inline; }
.nila.hop { animation: hop .7s cubic-bezier(.3, 1.6, .5, 1); }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes halo { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.06); opacity: .5; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -8px); } }
@keyframes hop { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(-16px) scale(1.04, .96); } 60% { transform: translateY(0) scale(.97, 1.03); } 100% { transform: translateY(0) scale(1); } }

.brand .mini-face { width: 44px; height: 44px; flex: none; }

/* ---------------------------------------------------------------- the stage (sky changes with the time of day) */
.stage { position: relative; overflow: hidden; border-radius: 26px; padding: 26px 28px 22px; color: #fff; isolation: isolate;
  background: radial-gradient(120% 90% at 85% 0%, #2a3a78 0%, transparent 55%), linear-gradient(165deg, #0b1630 0%, #16224a 55%, #1e2c62 100%);
  box-shadow: 0 24px 60px rgba(11, 22, 48, .28); }
.stage.sky-dawn { background: radial-gradient(90% 70% at 90% 110%, rgba(255, 196, 140, .55), transparent 60%), linear-gradient(165deg, #141f4a 0%, #3b3a7a 50%, #a8667a 85%, #e7a27c 100%); }
.stage.sky-day { background: radial-gradient(80% 70% at 88% 0%, rgba(150, 190, 255, .35), transparent 60%), linear-gradient(165deg, #13245a 0%, #1f3d86 55%, #2f5fae 100%); }
.stage.sky-dusk { background: radial-gradient(90% 70% at 10% 110%, rgba(255, 140, 110, .45), transparent 60%), linear-gradient(165deg, #0e1838 0%, #33296a 55%, #8a4a6e 100%); }
.stars { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(1.2px 1.2px at 8% 18%, #fff, transparent), radial-gradient(1px 1px at 22% 62%, #fff, transparent), radial-gradient(1.4px 1.4px at 35% 12%, #fff, transparent),
    radial-gradient(1px 1px at 48% 40%, #fff, transparent), radial-gradient(1.2px 1.2px at 62% 8%, #fff, transparent), radial-gradient(1px 1px at 71% 55%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 83% 22%, #fff, transparent), radial-gradient(1px 1px at 92% 70%, #fff, transparent), radial-gradient(1px 1px at 14% 88%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 55% 85%, #fff, transparent), radial-gradient(1px 1px at 40% 72%, #fff, transparent), radial-gradient(1px 1px at 96% 40%, #fff, transparent);
  opacity: .7; animation: twinkle 5s ease-in-out infinite; }
.stars.s2 { background-image: radial-gradient(2px 2px at 18% 30%, #f3e3ad, transparent), radial-gradient(1.6px 1.6px at 66% 26%, #fff, transparent), radial-gradient(2px 2px at 88% 52%, #f3e3ad, transparent),
    radial-gradient(1.6px 1.6px at 30% 50%, #fff, transparent), radial-gradient(1.8px 1.8px at 76% 80%, #fff, transparent); animation-duration: 7s; animation-delay: 2s; }
.sky-day .stars { opacity: .25; }
.shooting { position: absolute; top: 12%; left: 70%; width: 120px; height: 2px; background: linear-gradient(90deg, #fff, transparent); border-radius: 2px; opacity: 0; transform: rotate(-24deg); animation: shoot 11s ease-in 3s infinite; z-index: -1; }
@keyframes twinkle { 0%, 100% { opacity: .75; } 50% { opacity: .35; } }
@keyframes shoot { 0%, 92% { opacity: 0; transform: translate(0, 0) rotate(-24deg); } 93% { opacity: 1; } 100% { opacity: 0; transform: translate(-260px, 120px) rotate(-24deg); } }

.stage-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.nila-side { display: flex; gap: 18px; align-items: flex-start; }
.nila-btn { background: none; border: 0; padding: 0; cursor: pointer; flex: none; border-radius: 50%; margin-top: 6px; }
.nila-btn:focus-visible { outline-offset: 6px; }
.bubble { position: relative; background: rgba(255, 252, 244, .96); color: #17203d; border-radius: 22px; padding: 16px 18px 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .25); flex: 1; min-width: 0; animation: pop .5s cubic-bezier(.3, 1.5, .5, 1) both; }
.bubble::before { content: ""; position: absolute; left: -9px; top: 46px; width: 20px; height: 20px; background: inherit; transform: rotate(45deg); border-radius: 4px; }
.bubble .when { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #a07d2c; font-weight: 700; }
.bubble .say { font-size: 17px; line-height: 1.5; margin: 6px 0 12px; min-height: 52px; }
.bubble .say p { margin: 0 0 6px; }
.bubble .say ul { margin: 4px 0 6px 18px; padding: 0; }
.bubble .say .md h4 { margin: 8px 0 2px; font-size: 14px; }
.bubble.long .say { max-height: 340px; overflow: auto; font-size: 15px; padding-right: 6px; }
.bubble .close-say { margin-top: 6px; }
.say.typing > :last-child::after, .say.typing:not(:has(*))::after { content: ""; display: inline-block; width: 2px; height: 1em; background: #b8923a; margin-left: 2px; vertical-align: -2px; animation: caret .8s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.thinking-dots span { animation: dots 1.2s infinite; opacity: .2; font-weight: 800; }
.thinking-dots span:nth-child(2) { animation-delay: .2s; } .thinking-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dots { 40% { opacity: 1; } }
.spells { display: flex; flex-wrap: wrap; gap: 7px; }
.spell { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1px solid #e3d6b0; background: #fff; color: #17203d; font-weight: 650; font-size: 13px; cursor: pointer; transition: transform .15s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s, background .2s; }
.spell:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(184, 146, 58, .25); }
.spell:active { transform: scale(.95); }
.spell.gold { background: linear-gradient(135deg, #f3e3ad, #d8b866); border-color: transparent; }
.spell .i { width: 16px; height: 16px; }

.command { margin-top: 18px; width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .09); backdrop-filter: blur(8px); color: rgba(255, 255, 255, .85); font-size: 15px; cursor: text; text-align: left; transition: background .2s, border-color .2s, transform .2s; }
.command:hover, .command:focus-visible { background: rgba(255, 255, 255, .15); border-color: rgba(243, 227, 173, .6); transform: translateY(-1px); }
.command .i { color: #f3e3ad; width: 20px; height: 20px; }
.command span { flex: 1; } .command i { color: rgba(255, 255, 255, .55); }
.command kbd, .pal kbd, .po kbd { font: 600 11px var(--font); padding: 2px 7px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .75); }

/* ---------------------------------------------------------------- the day orbit */
.orbit-side { position: relative; }
.orbit-svg { width: 100%; height: auto; display: block; overflow: visible; }
.orbit-svg .band { fill: none; stroke: rgba(233, 211, 151, .38); stroke-width: 1.4; }
.orbit-svg .b2 { stroke-dasharray: 6 5; } .orbit-svg .b3 { stroke-dasharray: 2 5; stroke-linecap: round; }
.orbit-svg .b4 { stroke: rgba(255, 255, 255, .16); stroke-width: 6; stroke-linecap: round; }
.orbit-svg .elapsed { fill: none; stroke: #e9d397; stroke-width: 6; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(243, 227, 173, .7)); stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.6s ease-out .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.orbit-svg .base { stroke: rgba(233, 211, 151, .35); stroke-width: 1.2; }
.orbit-svg .tick { stroke: rgba(255, 255, 255, .45); stroke-width: 1.4; }
.orbit-svg .tl { fill: rgba(255, 255, 255, .6); font: 600 10.5px var(--font); text-anchor: middle; }
.orbit-svg .now .ncore { fill: #ffd98a; }
.orbit-svg .now .nglow { fill: rgba(255, 217, 138, .35); transform-box: fill-box; transform-origin: center; animation: halo 2.4s ease-in-out infinite; }
.orbit-svg .now.nite .ncore { fill: #e8eeff; } .orbit-svg .now.nite .nglow { fill: rgba(200, 215, 255, .3); }
.orbit-svg .bead { cursor: pointer; outline: none; }
.orbit-svg .bead .dot { stroke: rgba(11, 22, 48, .6); stroke-width: 2; transform-box: fill-box; transform-origin: center; transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); animation: beadIn .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.orbit-svg .bead .ring { fill: none; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.orbit-svg .bead:hover .dot, .orbit-svg .bead:focus .dot { transform: scale(1.45); }
.orbit-svg .bead:hover .ring, .orbit-svg .bead:focus .ring { opacity: .8; }
.orbit-svg .bead.meet .dot { fill: #f3e3ad; } .orbit-svg .bead.meet .ring { stroke: #f3e3ad; }
.orbit-svg .bead.rem .dot { fill: #a9bcff; } .orbit-svg .bead.rem .ring { stroke: #a9bcff; }
.orbit-svg .bead.task .dot { fill: #8fa6ff; } .orbit-svg .bead.task .ring { stroke: #fff; }
.orbit-svg .bead.p-urgent .dot { fill: #ff6b6f; } .orbit-svg .bead.p-high .dot { fill: #ffb547; } .orbit-svg .bead.p-low .dot { fill: #c3c8da; }
.orbit-svg .bead.past { opacity: .45; }
.orbit-svg .bead.soon .ring { opacity: 1; animation: ping 1.6s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes beadIn { from { transform: scale(0); } }
.orbit-svg .center { cursor: pointer; outline: none; }
.orbit-svg .center:hover .phase, .orbit-svg .center:focus .phase { filter: drop-shadow(0 0 10px rgba(243, 227, 173, .7)); }
.phase .glow { fill: rgba(233, 211, 151, .12); }
.phase .dark { fill: #1a2550; stroke: rgba(233, 211, 151, .4); stroke-width: 1.2; }
.phase .lit { fill: url(#g-lit); }
.phase .crater { fill: rgba(11, 22, 48, .13); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; font-size: 12px; color: rgba(255, 255, 255, .75); margin-top: 6px; }
.legend .lg::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.legend .meet::before { background: #f3e3ad; } .legend .task::before { background: #8fa6ff; } .legend .rem::before { background: #a9bcff; border: 1.5px dotted #fff; }
.legend .soft { color: rgba(255, 255, 255, .5); }
.orbit-side .tip { position: absolute; transform: translate(-50%, -100%); background: rgba(255, 252, 244, .97); color: #17203d; padding: 6px 11px; border-radius: 10px; font-size: 12.5px; font-weight: 600; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); pointer-events: none; white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; z-index: 2; }

/* ---------------------------------------------------------------- play area */
.play { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; margin-top: 18px; align-items: start; }
.side-stack { display: grid; gap: 16px; }
.side-stack .card + .card { margin-top: 0; }
.pill { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: color-mix(in srgb, var(--gold) 25%, transparent); color: #8a6a18; margin-left: 4px; }
:root[data-theme="night"] .pill { color: var(--gold-2); }

.deck { position: relative; height: 210px; margin: 6px 4px 0; outline: none; perspective: 900px; }
.deck:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold) 60%, transparent); outline-offset: 6px; border-radius: 20px; }
.fcard { position: absolute; inset: 0 0 18px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px 18px 28px; box-shadow: 0 14px 34px rgba(17, 25, 55, .12);
  transition: transform .38s cubic-bezier(.2, .8, .2, 1), opacity .38s; touch-action: none; user-select: none; overflow: hidden; display: flex; flex-direction: column; gap: 8px; }
.fcard.lvl1 { transform: translateY(12px) scale(.955); opacity: .85; }
.fcard.lvl2 { transform: translateY(23px) scale(.91); opacity: .55; }
.fcard.lvl3 { transform: translateY(32px) scale(.87); opacity: .25; }
.fcard.top { cursor: grab; animation: dealt .45s cubic-bezier(.3, 1.4, .5, 1); }
.fcard.dragging { transition: none; cursor: grabbing; box-shadow: 0 26px 60px rgba(17, 25, 55, .28); }
.fcard[class*="fly-"] { opacity: 0; transition: transform .42s cubic-bezier(.5, 0, .9, .4), opacity .42s; pointer-events: none; }
@keyframes dealt { from { transform: translateY(14px) scale(.95); } }
.fcard .stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 7px; }
.fcard .ftop { display: flex; gap: 6px; align-items: center; }
.fcard .due { display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.fcard .due.bad { color: var(--bad); }
.fcard .due .i { width: 15px; height: 15px; }
.fcard h4 { font-family: var(--serif); font-size: 24px; line-height: 1.22; margin: 6px 0 0; font-weight: 600; letter-spacing: -.005em; }
.fcard .who { color: var(--muted); font-weight: 600; display: flex; gap: 6px; align-items: center; margin-top: auto; }
.fcard .open { position: absolute; right: 14px; bottom: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card-2); cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.fcard .open:hover { background: var(--bg-2); }
.stamp { position: absolute; top: 20px; right: 22px; font: 800 20px var(--font); letter-spacing: .12em; text-transform: uppercase; padding: 4px 12px; border: 3px solid; border-radius: 10px; transform: rotate(10deg) scale(.6); opacity: 0; transition: opacity .15s, transform .2s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.s-done { color: #2f8f6b; left: 26px; right: auto; transform: rotate(-10deg) scale(.6); } .s-later { color: #4c6fd1; transform: rotate(10deg) scale(.6); } .s-hand { color: #7a4fd1; left: 50%; right: auto; top: 14px; transform: translateX(-50%) scale(.6); }
.fcard.h-done .s-done { opacity: 1; transform: rotate(-10deg) scale(1); }
.fcard.h-later .s-later { opacity: 1; transform: rotate(10deg) scale(1); }
.fcard.h-hand .s-hand { opacity: 1; transform: translateX(-50%) scale(1); }
.fcard.h-done { box-shadow: 0 0 0 3px rgba(47, 143, 107, .35), 0 26px 60px rgba(17, 25, 55, .25); }
.fcard.h-later { box-shadow: 0 0 0 3px rgba(76, 111, 209, .35), 0 26px 60px rgba(17, 25, 55, .25); }
.fcard.h-hand { box-shadow: 0 0 0 3px rgba(122, 79, 209, .35), 0 26px 60px rgba(17, 25, 55, .25); }
.deck-acts { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 12px; }
.dact { display: grid; justify-items: center; gap: 4px; border: 0; background: none; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); }
.dact .i { width: 50px; height: 50px; padding: 14px; border-radius: 50%; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s; stroke-width: 2.2; }
.dact:hover .i { transform: translateY(-3px) scale(1.06); }
.dact:active .i { transform: scale(.9); }
.dact.later .i { color: #4c6fd1; } .dact.hand .i { color: #7a4fd1; }
.dact.done .i { width: 64px; height: 64px; padding: 17px; background: linear-gradient(135deg, #f3e3ad, #d8b866); color: #1a1405; border-color: transparent; box-shadow: 0 10px 26px rgba(184, 146, 58, .4); }
.hint { text-align: center; font-size: 12px; color: var(--soft); margin: 10px 0 0; }
.deck-empty { height: 100%; display: grid; place-items: center; align-content: center; text-align: center; gap: 4px; color: var(--muted); }
.deck-empty b { font-family: var(--serif); font-size: 24px; color: var(--ink); }
.deck-empty .btn { margin-top: 8px; }

/* moon card */
.moon-row { display: flex; gap: 16px; align-items: center; }
.moon-card .phase .dark { fill: #ece6d4; stroke: #d6c79c; }
.moon-card .phase .crater { fill: rgba(156, 122, 44, .14); }
:root[data-theme="night"] .moon-card .phase .dark { fill: #20295a; stroke: rgba(233, 211, 151, .4); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .moon-card .phase .dark { fill: #20295a; stroke: rgba(233, 211, 151, .4); } }
.kick { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: #a07d2c; font-weight: 800; }
:root[data-theme="night"] .kick { color: var(--gold-2); }
.phase-name { font-family: var(--serif); font-size: 22px; display: block; line-height: 1.2; }
.streak { margin-top: 8px; display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 4px 10px; border-radius: 99px; background: var(--bg-2); }
.streak.on { background: linear-gradient(135deg, #fff3cf, #f3e3ad); color: #6d5212; }
.streak.on .i { color: #c48a12; animation: halo 2s ease-in-out infinite; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.wd { display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--soft); font-weight: 700; }
.wd.today { color: var(--ink); }
.wd.today .phase { filter: drop-shadow(0 0 6px rgba(216, 184, 102, .7)); }

/* planets */
.planets { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 8px 16px; padding: 6px 0 2px; }
.planet { border: 0; background: none; cursor: pointer; display: grid; justify-items: center; gap: 6px; font: inherit; color: var(--ink-2); animation: float 5s ease-in-out infinite; }
.planet.d1 { animation-delay: -1s; } .planet.d2 { animation-delay: -2s; } .planet.d3 { animation-delay: -3s; } .planet.d4 { animation-delay: -4s; } .planet.d5 { animation-delay: -2.5s; }
.planet .ball { border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 20px; font-family: var(--serif); box-shadow: inset -8px -10px 18px rgba(0, 0, 0, .22), inset 6px 6px 14px rgba(255, 255, 255, .35), 0 10px 22px rgba(17, 25, 55, .18);
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); position: relative; }
.planet:hover .ball { transform: scale(1.1) rotate(-6deg); }
.planet .ball .i { width: 20px; height: 20px; opacity: .85; }
.planet .pl { font-size: 12px; font-weight: 700; }
.pl-confirm .ball { background: radial-gradient(circle at 35% 30%, #fff3cf, #d8b866 60%, #9c7a2c); color: #1a1405; }
.pl-fu .ball { background: radial-gradient(circle at 35% 30%, #b9c8ff, #6e8efb 55%, #3651c4); }
.pl-dg .ball { background: radial-gradient(circle at 35% 30%, #d6c6ff, #9b7bf0 55%, #5e40bf); }
.pl-wt .ball { background: radial-gradient(circle at 35% 30%, #b6f0e2, #3fbfa5 55%, #1f7d67); }
.pl-dr .ball { background: radial-gradient(circle at 35% 30%, #fffaf0, #e9dfc6 55%, #b9a77a); color: #4d3d14; }
.pl-dc .ball { background: radial-gradient(circle at 35% 30%, #ffd0c7, #f08a7a 55%, #b8433b); }
.planet.zero .ball { background: radial-gradient(circle at 35% 30%, #fff, var(--bg-2) 70%); color: var(--soft); box-shadow: inset -4px -6px 12px rgba(0, 0, 0, .06), 0 4px 10px rgba(17, 25, 55, .08); }
:root[data-theme="night"] .planet.zero .ball { background: radial-gradient(circle at 35% 30%, #2d3c6e, #16224a 70%); }
.planet.pulse .ball::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #d8b866; animation: ping2 1.8s ease-out infinite; }
@keyframes ping2 { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* extras */
.extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.extras .card + .card { margin-top: 0; }
.rings { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-around; }
.gring { border: 0; background: none; cursor: pointer; display: grid; justify-items: center; gap: 2px; width: 110px; font: inherit; color: var(--ink); text-align: center; }
.gring svg .track { fill: none; stroke: var(--bg-2); stroke-width: 7; }
.gring svg .fill { fill: none; stroke: url(#g-moon); stroke-width: 7; stroke-linecap: round; animation: ringIn 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.gring svg text { fill: var(--ink); font: 800 13px var(--font); text-anchor: middle; }
.gring span { font-size: 12.5px; font-weight: 650; line-height: 1.25; }
.gring small { font-size: 11px; color: var(--soft); }
.gring:hover svg { transform: scale(1.06) rotate(-4deg); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes ringIn { from { stroke-dasharray: 0 999; } }
.trip { display: flex; gap: 18px; align-items: center; cursor: pointer; position: relative; overflow: hidden; }
.trip .count { display: grid; justify-items: center; line-height: 1; padding-right: 16px; border-right: 1px dashed var(--line-2); }
.trip .count b { font-family: var(--serif); font-size: 46px; color: #b8923a; }
.trip .count span { font-size: 12px; color: var(--muted); font-weight: 700; }
.trip .sky-line { position: absolute; left: 0; right: 0; top: 14px; height: 1px; border-top: 1.5px dashed color-mix(in srgb, var(--gold) 45%, transparent); }
.trip .plane { position: absolute; top: -11px; left: -30px; color: #b8923a; animation: fly 9s linear infinite; }
@keyframes fly { to { transform: translateX(min(560px, 90vw)); } }

/* ---------------------------------------------------------------- command palette */
.palette { position: fixed; inset: 0; z-index: 120; background: rgba(8, 14, 34, .5); backdrop-filter: blur(6px); animation: fadeIn .15s ease; }
.palette.out { animation: fadeOut .16s ease forwards; }
.pal { width: min(660px, calc(100vw - 24px)); margin: 13vh auto 0; background: var(--card); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); border: 1px solid var(--line); overflow: hidden; animation: pop .3s cubic-bezier(.3, 1.5, .5, 1); }
.pal-in { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pal-in input { flex: 1; border: 0; outline: none; background: none; font-size: 19px; padding: 6px 0; min-width: 0; }
.pal kbd, .po kbd { border-color: var(--line-2); color: var(--muted); }
.pal-read { padding: 10px 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-height: 46px; border-bottom: 1px solid var(--line); background: var(--card-2); font-size: 13.5px; }
.pal-read .rk, .pal-read .rw, .pal-read .rp { display: inline-flex; gap: 5px; align-items: center; padding: 4px 10px; border-radius: 99px; font-weight: 700; font-size: 12.5px; }
.pal-read .i { width: 15px; height: 15px; }
.rk.k-reminder { background: #e6ecff; color: #3651c4; } .rk.k-task { background: #e8f5ef; color: #2f8f6b; } .rk.k-followup { background: #efe8ff; color: #6a4fd1; }
.rk.k-note { background: #fbf1d7; color: #8a6a18; } .rk.k-ask { background: linear-gradient(135deg, #f3e3ad, #d8b866); color: #1a1405; }
.pal-read .rt { font-weight: 650; }
.pal-read .rw { background: var(--bg-2); color: var(--ink-2); }
.pal-read .rp { background: #ffe5e3; color: #c8443f; text-transform: capitalize; }
.pal-list { max-height: 46vh; overflow: auto; padding: 6px; }
.po { display: flex; width: 100%; gap: 10px; align-items: center; padding: 10px 12px; border: 0; background: none; border-radius: 12px; text-align: left; cursor: pointer; font-weight: 600; }
.po span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.po.minor { color: var(--muted); font-weight: 500; font-size: 13.5px; }
.po.on { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--ink); }
.po .i { color: #b8923a; }
.pal-foot { display: flex; gap: 16px; padding: 9px 16px; font-size: 11.5px; color: var(--soft); border-top: 1px solid var(--line); flex-wrap: wrap; }
.pal-foot span:last-child { margin-left: auto; }
@keyframes pop { from { transform: translateY(8px) scale(.96); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }

/* hand-off people picker */
.people-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.pp { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line-2); background: var(--card); border-radius: 99px; padding: 4px 12px 4px 4px; cursor: pointer; font-weight: 600; }
.pp .avatar { width: 28px; height: 28px; font-size: 11px; }
.pp.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 30%, transparent); }

/* ---------------------------------------------------------------- Focus mode */
.focus { position: fixed; inset: 0; z-index: 110; color: #fff; display: grid; place-items: center; align-content: center; gap: 22px; padding: 24px;
  background: radial-gradient(80% 60% at 50% 0%, #22305e 0%, transparent 70%), linear-gradient(180deg, #070f24, #0b1630 60%, #16224a); animation: fadeIn .3s ease; isolation: isolate; text-align: center; }
.focus.out { animation: fadeOut .25s ease forwards; }
body.focusing { overflow: hidden; }
.focus .fx-close { position: absolute; top: 18px; right: 18px; display: flex; gap: 6px; align-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); color: #fff; border-radius: 99px; padding: 7px 12px; cursor: pointer; font-size: 12px; }
.focus .f-nila { position: absolute; top: 14px; left: 18px; }
.focus .f-count { font-size: 12px; letter-spacing: .25em; text-transform: uppercase; color: var(--gold-2); font-weight: 700; }
.focus .f-card { max-width: 760px; }
.focus .f-card.in { animation: pop .45s cubic-bezier(.3, 1.4, .5, 1); }
.focus .f-card .kick { color: var(--gold-2); }
.focus .f-card h2 { font-family: var(--serif); font-size: clamp(28px, 4.6vw, 46px); line-height: 1.15; margin: 10px 0; font-weight: 600; }
.focus .f-meta { color: rgba(255, 255, 255, .7); display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }
.focus .f-timer { position: relative; width: 168px; height: 168px; }
.focus .f-timer .tr { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 6; }
.focus .f-timer .tf { fill: none; stroke: #e9d397; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s linear; filter: drop-shadow(0 0 6px rgba(243, 227, 173, .6)); }
.focus .f-time { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; }
.focus .f-time b { font: 700 34px var(--font); font-variant-numeric: tabular-nums; }
.focus .f-acts { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn.glass { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; }
.btn.glass:hover { background: rgba(255, 255, 255, .18); }
.btn.big { padding: 13px 26px; font-size: 16px; border-radius: 14px; }

/* ---------------------------------------------------------------- global micro-interactions */
.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9999; }
.toast { animation: toastIn .4s cubic-bezier(.3, 1.5, .5, 1); cursor: pointer; }
.toast .tact { margin-left: 8px; background: none; border: 0; color: var(--gold-2); font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@keyframes toastIn { from { transform: translateY(16px) scale(.9); opacity: 0; } }
#view.enter > * { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
#view.enter > *:nth-child(2) { animation-delay: .06s; } #view.enter > *:nth-child(3) { animation-delay: .12s; } #view.enter > *:nth-child(4) { animation-delay: .18s; } #view.enter > *:nth-child(n+5) { animation-delay: .22s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.btn { transition: transform .15s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s, background .2s; }
.btn:active { transform: scale(.95); }
.nav a .i { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.nav a:hover .i { transform: scale(1.18) rotate(-8deg); }
.nav a.on .i { color: var(--gold-2); }
.item { transition: transform .18s, box-shadow .2s, border-color .2s; }
.list .item:hover { transform: translateX(3px); }
.check:hover { transform: scale(1.12); }

/* ---------------------------------------------------------------- calm mode & reduced motion */
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- night theme touches */
:root[data-theme="night"] .fcard, :root[data-theme="night"] .dact .i { box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .kick { color: var(--gold-2); } :root[data-theme="auto"] .pill { color: var(--gold-2); } :root[data-theme="auto"] .planet.zero .ball { background: radial-gradient(circle at 35% 30%, #2d3c6e, #16224a 70%); } }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 1100px) { .stage-grid { grid-template-columns: minmax(0, 1fr); } .orbit-side { max-width: 560px; margin: 0 auto; width: 100%; } }
@media (max-width: 900px) {
  .stage { border-radius: 20px; padding: 18px 16px 16px; }
  .nila-side { gap: 10px; }
  .nila.big { width: 84px; height: 84px; }
  .bubble { padding: 12px 14px; } .bubble::before { top: 30px; }
  .bubble .say { font-size: 15.5px; min-height: 44px; }
  .spells { flex-wrap: nowrap; overflow-x: auto; margin-right: -14px; padding: 2px 14px 4px 0; scrollbar-width: none; }
  .spells::-webkit-scrollbar { display: none; }
  .spell { flex: none; }
  .command kbd { display: none; } .command { font-size: 14px; padding: 12px 14px; } .command i { display: none; }
  .play { grid-template-columns: 1fr; }
  .fcard h4 { font-size: 20px; }
  .focus .f-nila { display: none; }
  #topActions .seg.mini, #topActions #focusGo { display: none; }
  .nila-side > .bubble { min-width: 0; overflow: hidden; }
  .pal { margin-top: 6vh; } .pal-foot span:last-child { display: none; }
}

/* Ask Nila */
.chat-hello .hello-face { margin: 0 auto 6px; }
.msg.nila .who .nila { display: inline-block; vertical-align: -6px; }
.msg.nila .who .nila .halo { display: none; }
.msg .ev a { animation: pop .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.msg .ev a:nth-child(2) { animation-delay: .08s; } .msg .ev a:nth-child(3) { animation-delay: .16s; }
.msg.me { animation: rise .3s ease both; }

/* ---------------------------------------------------------------- Confirmations: sealed envelopes */
.envelope { position: relative; overflow: hidden; padding-top: 26px; background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%); transition: transform .6s cubic-bezier(.5, 0, .9, .4), opacity .6s; }
.envelope .flap { position: absolute; left: 0; right: 0; top: 0; height: 14px; background: repeating-linear-gradient(-45deg, #c8443f 0 10px, transparent 10px 18px, #3651c4 18px 28px, transparent 28px 36px); opacity: .55; }
.envelope.nudge { animation: nudge .45s; }
@keyframes nudge { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.seal-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.seal-l { display: grid; text-align: right; line-height: 1.25; }
.seal-l b { font-size: 14px; } .seal-l small { color: var(--soft); font-size: 11.5px; }
.seal { position: relative; width: 78px; height: 78px; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; touch-action: none; user-select: none; -webkit-user-select: none; }
.seal svg .sr { fill: none; stroke: color-mix(in srgb, var(--gold) 30%, transparent); stroke-width: 4; }
.seal svg .sp { fill: none; stroke: #b8923a; stroke-width: 5; stroke-linecap: round; }
.seal .wax { position: absolute; inset: 9px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #e36a5f, #b3362f 55%, #7d1f1c); box-shadow: inset -4px -6px 10px rgba(0, 0, 0, .3), inset 3px 4px 8px rgba(255, 255, 255, .25), 0 6px 14px rgba(125, 31, 28, .35);
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.seal .wax::before { content: ""; position: absolute; inset: -3px; border-radius: 47% 53% 50% 50% / 52% 48% 52% 48%; background: inherit; z-index: -1; opacity: .9; }
.seal:hover .wax { transform: scale(1.05) rotate(-6deg); }
.holding .seal .wax { transform: scale(.9); }
.stamped .seal .wax { animation: stamp .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes stamp { 0% { transform: scale(1.4) rotate(-20deg); } 100% { transform: scale(1) rotate(0); } }
.envelope.sent { transform: translate(40px, -120%) rotate(-6deg) scale(.9); opacity: 0; }
.envelope.dropped { transform: translateY(40px) rotate(3deg) scale(.92); opacity: 0; }
.envelope.shake { animation: nudge .45s; }
@media (max-width: 700px) { .seal-l { text-align: left; } .seal-row .grow { display: none; } }

/* ---------------------------------------------------------------- Tasks board */
.seg.mini button { padding: 5px 9px; }
.seg.mini .i { width: 16px; height: 16px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.bcol { background: var(--bg-2); border-radius: 18px; padding: 10px; min-height: 220px; border: 2px dashed transparent; transition: border-color .15s, background .15s, transform .15s; }
.bcol.over { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, var(--bg-2)); transform: scale(1.01); }
.bcol header { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 13px; padding: 4px 6px 10px; }
.bcol header b { margin-left: auto; font-size: 12px; background: var(--card); border-radius: 99px; padding: 1px 9px; color: var(--muted); }
.cdot { width: 10px; height: 10px; border-radius: 50%; background: #6e8efb; box-shadow: 0 0 0 3px color-mix(in srgb, #6e8efb 25%, transparent); }
.c-in_progress .cdot { background: #f0a020; box-shadow: 0 0 0 3px rgba(240, 160, 32, .25); }
.c-waiting .cdot { background: #9b7bf0; box-shadow: 0 0 0 3px rgba(155, 123, 240, .25); }
.c-done .cdot { background: #2f8f6b; box-shadow: 0 0 0 3px rgba(47, 143, 107, .25); }
.bdrop { display: grid; gap: 9px; }
.bcard { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px 10px 16px; cursor: grab; box-shadow: 0 2px 6px rgba(17, 25, 55, .05); touch-action: none; user-select: none; transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s, opacity .2s; overflow: hidden; animation: rise .35s ease both; }
.bcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.bcard .bstripe { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.bcard .bt { font-weight: 650; line-height: 1.35; }
.bcard .meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 9px; align-items: center; font-size: 12px; color: var(--muted); }
.bcard .meta > span { display: inline-flex; align-items: center; gap: 4px; }
.bcard .meta .i { width: 13px; height: 13px; }
.bcard.is-done .bt { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ok) 60%, transparent); color: var(--muted); }
.bcard.lifted { opacity: .35; }
.bcard.ghost { position: fixed; z-index: 140; pointer-events: none; box-shadow: 0 24px 50px rgba(17, 25, 55, .3); cursor: grabbing; transition: none; animation: none; }
.bempty { text-align: center; color: var(--soft); font-size: 12.5px; padding: 26px 8px; border-radius: 12px; }
@media (max-width: 900px) { .board { grid-template-columns: repeat(4, 78vw); scroll-snap-type: x mandatory; } .bcol { scroll-snap-align: start; } }
