@font-face { font-family: Figtree; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url(/fonts/figtree-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Figtree; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url(/fonts/figtree-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ground: #F7F7FB; --panel: #FFFFFF; --ink: #1E1B2E; --muted: #625E73; --line: #E7E5F0;
  --accent: #5140D9; --accent-soft: #EEEBFF;
  --toi: #F2A93B; --moi: #D9663E; --nous: #16A37A;
  --red: #C42E20; --red-soft: #FDECEA; --amber: #8F5300; --amber-soft: #FFF1D9; --green: #0B7350; --green-soft: #E1F5EC;
  --dusk: linear-gradient(180deg, #ECEBFF 0%, #F6F1FF 55%, #FFF3EA 100%);
  --radius: 12px; --gutter: 32px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
  view-transition-name: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 Figtree, system-ui, sans-serif; background: var(--ground); color: var(--ink); -webkit-font-smoothing: antialiased; }
::selection { background: #D9D3FF; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: #C9C4DE transparent; scrollbar-width: thin; }
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; z-index: 10; }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font-weight: 700; font-size: 16px; transition: transform .2s var(--ease-out), background .2s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #4333C4; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn-link { background: none; border: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 10px; min-height: 44px; }
.icon-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-weight: 600; font-size: 14px; }
.icon-btn:hover { color: var(--ink); border-color: #CFCBE0; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#motion[aria-pressed="true"] .i-play, #motion[aria-pressed="false"] .i-pause { display: none; }

/* ---------- sign-in ---------- */
.signin { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--dusk); }
.signin-card { width: min(100%, 420px); background: var(--panel); border-radius: 24px; padding: 40px 32px 32px; text-align: center; box-shadow: 0 20px 50px rgba(60, 40, 120, .12); display: grid; gap: 14px; }
.signin-wisp { display: grid; place-items: center; height: 150px; }
.signin-card h1 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.signin-lead { color: var(--muted); margin-bottom: 10px; }
.recovery { display: grid; gap: 8px; text-align: left; }
.recovery-hint { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.recovery label { font-weight: 600; font-size: 14px; }
.recovery input { min-height: 48px; border: 1px solid #8A85A3; border-radius: var(--radius); padding: 0 14px; font: 600 17px/1 Figtree, system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.recovery input:focus-visible { outline-offset: 1px; }
.signin-error { color: var(--red); font-weight: 600; min-height: 1.5em; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; gap: 24px; padding: max(16px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 16px max(var(--gutter), env(safe-area-inset-left)); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand-mark { display: inline-grid; width: 22px; height: 30px; }
.brand-mark .wisp { opacity: 1; filter: none; transform: none; }
.brand-mark .w-halo, .brand-mark .w-sparks { display: none; }
.brand-mark .w-body, .brand-mark .w-flame, .brand-mark .w-eyes { animation: none; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 16px; border-radius: 999px; transition: background .2s, color .2s; }
.nav a:hover { color: var(--ink); background: #EFEEF6; }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.top-actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- hearth ---------- */
.hearth { margin: 4px var(--gutter) 28px; border-radius: 24px; background: var(--dusk); padding: 24px 24px 14px; }
.ring { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: ". bubble ." "party claude ."; align-items: end; column-gap: 28px; row-gap: 10px; min-height: 210px; }
.bubble { grid-area: bubble; justify-self: center; }
.party { grid-area: party; justify-self: end; display: flex; gap: 10px; align-items: flex-end; }
.claude { grid-area: claude; justify-self: center; }
.bubble { background: var(--panel); border-radius: 14px; padding: 10px 16px; font-size: 14px; color: var(--muted); box-shadow: 0 6px 18px rgba(60, 40, 120, .10); max-width: 320px; text-align: center; }
.bubble b { display: block; color: var(--ink); font-size: 15px; }
.bench-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 12px; border-top: 1px solid rgba(81, 64, 217, .14); margin-top: 12px; padding-top: 12px; }
.bench-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.bench { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 40px; }
.wisp-card { display: flex; flex-direction: column; align-items: center; width: 92px; text-align: center; white-space: nowrap; }
.wisp-name { font-weight: 650; font-size: 13px; margin-top: 4px; }
.wisp-class { font-size: 12px; color: var(--muted); }

/* ---------- wisp ---------- */
.wisp { --flick: 1.9s; position: relative; width: var(--s); height: calc(var(--s) * 1.33); flex: none; opacity: .78; filter: saturate(.5);
  transition: opacity .9s var(--ease-out), filter .9s var(--ease-out), transform .9s var(--ease-out); }
.w-halo { position: absolute; inset: -35% -45% -10%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--c) 55%, transparent), transparent); opacity: .14; transform: scale(.7); transition: opacity .9s, transform .9s var(--ease-out); }
.w-body { position: absolute; inset: 0; animation: w-bob 3.4s ease-in-out infinite; animation-delay: var(--d); }
.w-flame { position: absolute; inset: 0; transform-origin: 50% 88%; }
.w-flame svg { display: block; width: 100%; height: 100%; overflow: visible; }
.w-outer { animation: w-flick var(--flick) ease-in-out infinite alternate; animation-delay: var(--d); }
.w-outer path { fill: var(--c); opacity: .5; }
.w-inner { animation: w-flick2 calc(var(--flick) * .77) ease-in-out infinite alternate; animation-delay: var(--d); }
.s0 { stop-color: #fff; } .s1 { stop-color: var(--c2); } .s2 { stop-color: var(--c); }
.core { fill: #fff; opacity: .75; }
.blush { fill: var(--c); opacity: .45; }
.w-eyes { position: absolute; left: 0; right: 0; top: calc(65% - var(--s) * .05); display: flex; justify-content: center; gap: calc(var(--s) * .106); animation: w-blink 4.6s infinite; animation-delay: var(--d); }
.w-eyes i { width: calc(var(--s) * .077); height: calc(var(--s) * .1); border-radius: 50%; background: #2A2233; }
.w-sparks i { position: absolute; left: 50%; bottom: 32%; width: 4px; height: 4px; border-radius: 50%; background: var(--c2); opacity: 0; }
.w-sparks i:nth-child(2) { margin-left: -9px; --sx: -8px; } .w-sparks i:nth-child(3) { margin-left: 7px; --sx: 10px; }
.wisp.lit { --flick: .85s; opacity: 1; filter: saturate(1.15); transform: scale(1.12); }
.wisp.lit .w-halo { opacity: .85; transform: scale(1); }
.wisp.lit .w-sparks i { animation: w-spark 1.6s ease-out infinite; }
.wisp.lit .w-sparks i:nth-child(2) { animation-delay: .5s; } .wisp.lit .w-sparks i:nth-child(3) { animation-delay: 1s; }
.wisp.ignite .w-halo { animation: w-burst .9s ease-out; }
@keyframes w-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes w-flick { from { transform: skewX(-5deg) scaleY(1.04); } to { transform: skewX(5deg) scaleY(.95); } }
@keyframes w-flick2 { from { transform: skewX(7deg) scale(.98, 1.07); } to { transform: skewX(-4deg) scale(1.02, .94); } }
@keyframes w-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes w-spark { 0% { opacity: 0; transform: none; } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--sx, 5px), -46px) scale(.3); } }
@keyframes w-burst { 0% { transform: scale(.4); opacity: .2; } 45% { transform: scale(1.45); opacity: 1; } 100% { transform: scale(1); opacity: .85; } }
.paused .wisp *, .paused .wisp { animation-play-state: paused !important; }
.motion-off .w-body, .motion-off .w-flame, .motion-off .w-eyes, .motion-off .w-sparks i, .motion-off .w-halo { animation: none !important; }
.motion-off .wisp, .motion-off .w-halo { transition: none; }

/* ---------- sections ---------- */
.view { padding: 0 var(--gutter) 48px; outline: none; view-transition-name: section; }
::view-transition-old(section) { animation: vt-out .12s ease-in both; }
::view-transition-new(section) { animation: vt-in .24s var(--ease-out) .08s both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
.view-head { margin-bottom: 22px; }
.view-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; outline: none; }
.sub { color: var(--muted); margin-top: 4px; }
.h2 { font-size: 18px; font-weight: 750; margin: 8px 0 12px; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.colh { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 750; margin-bottom: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-toi { background: var(--toi); } .dot-moi { background: var(--moi); } .dot-nous { background: var(--nous); }
.count { margin-left: 2px; min-width: 24px; padding: 0 7px; border-radius: 999px; background: #EFEEF6; color: var(--muted); font-size: 13px; text-align: center; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.task { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; }
.task-title { font-weight: 600; }
.task-note { color: var(--muted); font-size: 14px; margin-top: 2px; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #EFEEF6; color: var(--muted); }
.t-bl { background: var(--red-soft); color: var(--red); } .t-co { background: var(--amber-soft); color: var(--amber); }
.t-ok { background: var(--green-soft); color: var(--green); } .t-ur { background: var(--red); color: #fff; }
.empty { color: var(--muted); font-size: 15px; padding: 18px; border-radius: var(--radius); border: 1px dashed #D6D2E6; }
.empty.wide { max-width: 640px; }

.figures { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0 0 18px; font-size: 17px; }
.figures div { display: flex; gap: 8px; align-items: baseline; }
.figures dt { color: var(--muted); }
.figures dd { margin: 0; font-weight: 750; }
.meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.meter { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.meter-top { display: flex; justify-content: space-between; font-weight: 650; }
.bar { height: 10px; border-radius: 999px; background: #EEECF6; margin: 10px 0 8px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(max(var(--f, 0), .015)); border-radius: inherit; background: #12875F; transition: transform .8s var(--ease-out); }
.meter.warm .bar i { background: #A85F00; } .meter.hot .bar i { background: var(--red); }
.meter-foot { color: var(--muted); font-size: 14px; }

.roster { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.member { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; font-size: 14.5px; }
.member .tag { margin-left: auto; white-space: nowrap; }
.t-on { background: var(--accent-soft); color: var(--accent); }
.member-wisp { display: grid; place-items: center; width: 48px; height: 58px; flex: none; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .top { flex-wrap: wrap; gap: 10px 12px; }
  .nav { order: 3; width: 100%; }
  .nav a { flex: 1; text-align: center; padding: 10px 8px; }
  .icon-btn .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .icon-btn { width: 44px; justify-content: center; padding: 0; }
  .hearth { padding: 18px 12px 10px; margin-bottom: 22px; }
  .ring { grid-template-areas: "bubble bubble bubble" "party claude ."; column-gap: 10px; min-height: 0; }
  .bubble { max-width: none; justify-self: stretch; }
  .claude .wisp { --s: 70px !important; }
  .party .wisp, .bench .wisp { --s: 44px !important; }
  .wisp-card { width: 64px; }
  .bench { display: grid; grid-template-columns: repeat(5, 64px); }
  .party .wisp-card .wisp-name { font-size: 12px; }
  .wisp-class { display: none; }
  .bench-label { width: 100%; text-align: center; }
  .cols, .meters { grid-template-columns: 1fr; }
  .view-head h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(section), ::view-transition-new(section) { animation: none; }
  .btn, .bar i { transition: none; }
  .btn:active { transform: none; }
}
.signin .w-body, .signin .w-flame, .signin .w-eyes { animation: none; }
.signin-wisp .wisp { opacity: 1; filter: none; }
.task-meta:empty { display: none; }

/* ---------- step 2: requests, task actions, history, device settings ---------- */
.btn-small { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #CFCBE0; background: var(--panel); font-weight: 650; font-size: 14px; color: var(--ink); transition: background .2s, border-color .2s; }
.btn-small:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn-small:disabled { opacity: .5; cursor: progress; }
.task-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.asks { margin-bottom: 30px; }
.ask { background: var(--panel); border: 1px solid #CFC8FF; border-radius: 16px; padding: 22px 24px 24px; max-width: 760px; box-shadow: 0 8px 24px rgba(81, 64, 217, .07); }
.ask + .ask { margin-top: 14px; }
.ask h3 { font-size: 20px; font-weight: 750; letter-spacing: -.01em; margin: 0; }
.ask-why { color: var(--muted); margin: 4px 0 18px; max-width: 65ch; }
.ask-form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 650; font-size: 15px; }
.hint { color: var(--muted); font-size: 14px; margin-top: -2px; }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; border: 1px solid #8A85A3; border-radius: var(--radius); padding: 11px 14px; font: 16px/1.4 Figtree, system-ui, sans-serif; color: var(--ink); background: var(--panel); }
.field textarea { resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline-offset: 1px; }
.form-error { color: var(--red); font-weight: 600; min-height: 0; }
.ask-form .btn { justify-self: start; }
.block { margin-top: 36px; max-width: 760px; }
.h2[tabindex]:focus-visible, .colh[tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.h2[tabindex]:focus:not(:focus-visible), .colh[tabindex]:focus:not(:focus-visible) { outline: none; }
.sents { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sent { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; font-size: 14.5px; }
.sent summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-top: 6px; min-height: 32px; display: flex; align-items: center; }
.sent dl { margin: 8px 0 0; display: grid; gap: 6px; }
.sent dt { color: var(--muted); font-size: 13px; }
.sent dd { margin: 0; white-space: pre-line; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.history time { white-space: nowrap; font-size: 13px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.setting p { font-size: 14px; margin-top: 2px; }
.toast-region { position: fixed; left: 0; right: 0; bottom: 0; height: 0; z-index: 20; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 14px; background: var(--ink); color: #fff; padding: 10px 10px 10px 18px; border-radius: 999px; box-shadow: 0 10px 30px rgba(30, 27, 46, .25); font-weight: 600; font-size: 15px; z-index: 20; max-width: calc(100vw - 32px); animation: toast-in .3s var(--ease-out); }
.toast-undo { background: rgba(255, 255, 255, .14); border: 0; color: #fff; border-radius: 999px; min-height: 36px; padding: 0 14px; font-weight: 700; }
.toast:not(:has(.toast-undo:not([hidden]))) { padding-right: 18px; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
@media (max-width: 760px) { .ask { padding: 18px 16px 20px; } .ask-form .btn { justify-self: stretch; } .history li { flex-direction: column; gap: 2px; } }
@media (pointer: fine) { .btn-small { min-height: 34px; padding: 0 13px; font-size: 13.5px; } }
