/* Interface system: a quiet workspace surrounding the map. */
:root{color-scheme:light;--ink:#1d2430;--muted:#626c79;--surface:#fff;--page:#f4f5f3;--line:#e3e7e6;--accent:#7256e9;--accent-ink:#fff;--radius:14px;--radius-lg:20px;font-family:"Segoe UI Variable","Segoe UI",system-ui,sans-serif;color:var(--ink);background:var(--page)}
*{box-sizing:border-box}body{background:var(--page);color:var(--ink);font-size:15px;line-height:1.5}
main{max-width:1440px;margin:auto;padding:24px 40px 48px}
p{color:var(--muted);line-height:1.55}h1,h2,h3,h4{color:var(--ink);letter-spacing:-.025em}
h2{font-size:clamp(1.5rem,2.4vw,2rem);line-height:1.2}h3{font-size:1.1rem}
.topbar{display:flex;justify-content:flex-start;align-items:center;gap:12px;padding:0 0 20px;border-bottom:1px solid var(--line)}
.brand-orbit{display:grid;width:42px;height:42px;border-radius:14px;background:#eeeafd;color:#6d55df;border:0;font-size:1.5rem;box-shadow:none;flex:none}
.topbar small{display:none}.topbar h1{font-size:1rem;font-weight:700;letter-spacing:-.02em;margin:0}.topbar p{font-size:.78rem;margin:1px 0 0;color:#7a8390}
.main-nav{display:flex;flex-wrap:wrap;gap:4px;border:0;margin:20px 0 32px;padding:4px;background:#e9eceb;border-radius:13px;width:fit-content;max-width:100%}
.nav-button{min-height:40px;color:#646d79;font-size:.9rem;font-weight:600;padding:8px 16px;border:0;border-radius:10px;background:transparent}
.nav-button.active{background:#fff;color:#272b38;box-shadow:0 1px 4px #25304015}.nav-button:hover{color:#272b38;background:#ffffff80}
.section-heading{margin:0 0 8px;align-items:center}.section-heading h2{margin:7px 0}.section-heading p{font-size:.95rem}.eyebrow,.topbar small,.lp-eyebrow{color:#7564bb;font-size:.68rem;font-weight:750;letter-spacing:.14em}.guide-number{color:#929aa3;font-weight:600;letter-spacing:.1em}
#overview{display:flex;flex-direction:column;gap:0}#overview>.section-heading{order:0}#overview>.map-welcome{order:1}#overview>.graph{order:2}#overview>.graph-controls{order:3}#overview>.graph-help{order:4}#overview>.map-search{order:5}#overview>.map-outline{order:6}#overview>.add-sphere{order:7}
.map-welcome{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 24px}.map-welcome>p{margin:0;flex:1 1 320px;color:#747d88}.map-welcome>.save{margin:0}.map-welcome>button:not(.save){font-size:.85rem}.start-details{flex-basis:100%;font-size:.85rem}
button{font-family:inherit;cursor:pointer}.save,.question,.back,.file-label,.outline-link,.outline-sphere,.graph-control,.lp-link,.lp-goal-link{min-height:42px;font:inherit;font-size:.87rem;font-weight:600;border-radius:11px;padding:10px 15px;box-shadow:none}
.save{background:var(--accent);color:#fff;border:1px solid var(--accent);margin:0}.save:hover{background:#5e43d6;filter:none}
.question,.back,.file-label,.outline-sphere{background:#fff;border:1px solid #dce1e2;color:#343d4b}.question:hover,.back:hover,.file-label:hover{background:#f3f2fb}
button:disabled{opacity:.48;cursor:not-allowed}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #a698f5;outline-offset:3px}
.panel,.neuron-card{background:var(--surface);border:1px solid var(--line);box-shadow:0 12px 38px #29344a0a;border-radius:var(--radius-lg);padding:24px}
.graph{position:relative;height:clamp(430px,54vh,650px);background:#171b2a;border:1px solid #282e40;border-radius:20px;box-shadow:none}
.graph:before{opacity:.35;background-image:radial-gradient(#79829d 0.8px,transparent 1px);background-size:24px 24px;background-position:center}
.graph-world path{stroke:#7e85a2;stroke-width:1.5;opacity:.55}.graph-world path.active-link{stroke:#c7bafa;opacity:1;stroke-width:2.5}
.graph-node{color:#f7f6ff;border:1px solid #6a718c;background:#30364c;text-shadow:none;box-shadow:0 8px 24px #090b162e;overflow:hidden;line-height:1.3;transition:background .15s,border-color .15s,box-shadow .15s}
.graph-node:hover,.graph-node:focus-visible,.graph-node[aria-pressed=true]{outline:2px solid #d5cbff;outline-offset:3px;border-color:#c0adff;background:#474160;box-shadow:0 10px 30px #080a164d}
.graph-node.self{width:98px;height:98px;background:#d4cbff;color:#2b2450;border:7px solid #5c547e;font-weight:750;font-size:1.25rem}
.graph-node.sphere{width:115px;height:115px;background:#313b4c;border:1px solid #788ba6;font-size:.95rem;font-weight:650;padding:12px;overflow-wrap:anywhere}
.graph-node.mini{width:26px;height:26px;padding:0;background:#bba9ff;border:4px solid #51496b;color:transparent;box-shadow:none}
.graph-node.thought{width:190px;height:74px;border-radius:17px;text-align:left;display:flex;justify-content:flex-start;font-size:.86rem;font-weight:600;padding:14px 16px;overflow-wrap:anywhere}
.graph-node.role-goal{background:#514a72;border-color:#aa9de2}.graph-node.role-stage{background:#304750;border-color:#83acaa}.graph-node.role-action{background:#344337;border-color:#9bbc9b}.graph-node.role-note,.graph-node.role-condition{background:#474452}
.graph-controls{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap;margin:10px 0 0}
.graph-control{min-width:40px;min-height:38px;height:auto;padding:8px 12px;background:#fff;color:#515b69;border:1px solid var(--line);font-size:.8rem}.graph-control:hover{background:#eeedf9;color:#30285c}
.graph-help{margin:8px 0 18px;color:#7c8691;font-size:.78rem}
.map-search{margin:8px 0}.map-search label{font-size:.8rem;font-weight:650;color:#606b79;margin:0 0 7px}.map-search input{width:min(100%,420px);min-height:44px}
.map-outline{margin:10px 0;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px}.map-outline summary,.add-sphere summary,.card-more summary,.lp-details summary{cursor:pointer;color:#505b6b;font-weight:650}
.outline-group ul{border-color:#dfe3e8}.outline-link{background:transparent;color:#3e4857;border-color:transparent;font-size:.86rem}.outline-sphere{font-size:.88rem}.outline-group p{font-size:.82rem}
.add-sphere{margin:12px 0}.add-sphere summary{color:#6855c4}.inline-form{margin-top:12px}
#sphere-view>.back{margin-bottom:18px}#sphere-view>.panel{display:grid;grid-template-columns:minmax(0,1fr);gap:0;padding:24px}
#sphere-view>.panel:has(.neuron-card:not([hidden])){grid-template-columns:minmax(0,1fr) minmax(280px,340px);column-gap:22px}
#sphere-view>.panel>h2,#sphere-view>.panel>#sphere-hint,#sphere-view>.panel>.map-outline{grid-column:1/-1}
#sphere-view>.panel>#sphere-graph,#sphere-view>.panel>.graph-controls,#sphere-view>.panel>.graph-help{grid-column:1}
#sphere-view>.panel>.neuron-card{grid-column:2;grid-row:4 / span 6;align-self:start;position:sticky;top:20px;margin:0;border-radius:16px;background:#f7f8fa;border-color:#e4e7eb;box-shadow:none;max-height:75vh;overflow:auto}
#sphere-view>.panel>.new-root,#sphere-view>.panel>.new-root+.question{grid-column:1;justify-self:start;margin:4px 0}
#sphere-view>.panel:not(:has(.neuron-card:not([hidden])))>.graph-controls,#sphere-view>.panel:not(:has(.neuron-card:not([hidden])))>.graph-help{grid-column:1}
#sphere-hint{margin:4px 0 12px}#sphere-view .map-outline{margin:0 0 14px}
.neuron-card-label{font-size:.7rem;color:#7663c6;letter-spacing:.1em;font-weight:700;text-transform:uppercase;margin:0 0 14px}.neuron-card-text{color:#202837;font-size:1.2rem;line-height:1.35;margin:18px 0;font-weight:700}
.neuron-card>p:not(.neuron-card-label):not(.neuron-card-text){font-size:.88rem;color:#606b79}
.neuron-card nav{display:flex;gap:5px;flex-wrap:wrap}.neuron-card nav .question{min-height:30px;padding:5px 8px;font-size:.75rem}
.neuron-card-actions{display:flex;flex-wrap:wrap;gap:7px}.neuron-card-actions button{font-size:.8rem}.neuron-card-actions .save{order:-1}
.card-more{margin-top:16px;padding-top:14px;border-top:1px solid #e2e5e8}.card-more summary{font-size:.85rem}.card-more button{display:block;width:100%;text-align:left;margin:8px 0;font-size:.8rem}
textarea,input,select,.lp-date-input{font:inherit;color:var(--ink);background:#fff;border:1px solid #cbd2d7;border-radius:10px;padding:11px 12px;max-width:100%}
textarea{min-height:82px}.plan-dialog{width:min(92vw,580px);max-height:min(90vh,850px);background:#fff;color:var(--ink);border:1px solid #e4e5ed;border-radius:22px;padding:30px;box-shadow:0 30px 100px #171b2a50}
.plan-dialog::backdrop{background:#161b2bbd;backdrop-filter:blur(5px)}.plan-dialog h2{margin:0 0 8px}.plan-dialog form>p:first-of-type{margin:0 0 20px}.plan-dialog label{font-size:.84rem;font-weight:650;color:#454f5c;margin:16px 0 6px}.plan-dialog textarea{min-height:74px}.plan-dialog input:not([type=checkbox]),.plan-dialog select{width:100%}.plan-dialog input[type=checkbox]{width:20px;height:20px;accent-color:var(--accent)}
.plan-dialog .question,.plan-dialog .save{margin:14px 8px 0 0}.plan-dialog [role=status]{color:#a33b4d;font-size:.86rem}
.life-planner{color:var(--ink)}.lp-title{color:var(--ink);font-size:1.9rem}.lp-subtitle{color:var(--muted)}.lp-eyebrow{color:#7564bb}
.lp-days{gap:8px}.lp-day{background:#fff;color:var(--ink);border:1px solid var(--line);border-radius:14px;min-height:92px}.lp-day:hover{border-color:#b7abea}.lp-day.is-selected{background:#f0edff;border-color:#a99bec;box-shadow:none}
.lp-day-name,.lp-day-count{color:#707b8a}.lp-day-number{color:#252e3c}.lp-selected-date{color:#364150}
.lp-task{background:#fff;border-color:var(--line);border-radius:16px;padding:18px;box-shadow:0 5px 20px #29344a08}.lp-task-text{color:#25303d}.lp-task-meta{color:#687381}.lp-task.is-done .lp-task-text{color:#75808d}
.lp-link{background:#f7f7fa;color:#444d5b;border:1px solid #e1e5e8}.lp-goal-link{color:#6850d1;background:transparent;border-color:transparent}.lp-details{color:#5f6a78}.lp-status,.lp-error{color:#6047c4}.lp-empty{background:#fff;color:#5d6875;border-color:#d5d9de}
#profile-page h3{margin-top:32px}#profile-page .neuron-card{position:static;background:#fafbfc}.data-panel{max-width:760px}footer.note{border-color:var(--line);color:#8a939c;margin-top:40px;font-size:.78rem}
@media(max-width:850px){main{padding:20px 20px 40px}#sphere-view>.panel:has(.neuron-card:not([hidden])){grid-template-columns:minmax(0,1fr)}#sphere-view>.panel>.neuron-card{grid-column:1;grid-row:auto;position:static;max-height:none;margin:16px 0}.graph{height:440px}}
@media(max-width:600px){main{padding:16px 16px 32px}.brand-orbit{display:grid;width:38px;height:38px}.topbar p{display:none}.main-nav{display:flex;flex-wrap:nowrap;overflow-x:auto;width:100%;margin:16px 0 24px}.nav-button{white-space:nowrap;flex:1 0 auto;padding:8px 12px;font-size:.8rem}.section-heading{align-items:flex-start}.guide-number{display:none}.map-welcome{margin-bottom:16px}.map-welcome>p{flex-basis:100%;font-size:.88rem}.graph{height:390px;border-radius:16px}.graph-control{font-size:.75rem;padding:8px}.panel,#sphere-view>.panel{padding:16px}.plan-dialog{padding:22px 18px}.lp-days{grid-template-columns:repeat(4,minmax(0,1fr))}.lp-day{min-height:72px;padding:9px}.lp-task{padding:15px}.lp-task{flex-wrap:nowrap}.lp-task-main,.lp-details{flex-basis:auto;min-width:0}.lp-task>*{max-width:100%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.dialog-header{display:flex;align-items:flex-start;gap:16px;justify-content:space-between}.dialog-header h2{flex:1;margin:0;max-width:24ch}.dialog-close{flex:none;display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:10px;background:#f3f4f6;color:#596273;font-size:1.45rem;line-height:1}.dialog-close:hover{background:#e9e7f7;color:#4f3eb0}
.plan-dialog .dialog-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:24px;padding-top:18px;border-top:1px solid var(--line)}.plan-dialog .dialog-actions .save,.plan-dialog .dialog-actions .question{margin:0}.dialog-optional{margin:15px 0;padding:14px;background:#f7f7fa;border:1px solid #e9eaf0;border-radius:12px}.dialog-optional summary{color:#5b6270;font-size:.85rem;font-weight:650;cursor:pointer}

@media(max-width:600px){.main-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible}.nav-button{white-space:normal;text-align:center;font-size:.72rem;line-height:1.2;padding:8px 4px;min-width:0}}

.lp-date-label{color:#5f6a78}.lp-day-name,.lp-day-count{color:#5f6a78}.lp-details label{color:#414b59}.lp-status{color:#6047c4}

/* Life map: a single light workspace with readable, connected idea cards. */
@font-face{font-family:"Golos Text";src:url("assets/fonts/GolosText-VF.ttf") format("truetype");font-weight:400 900;font-style:normal;font-display:swap}
:root{font-family:"Golos Text","Segoe UI",sans-serif;--ink:#24292e;--muted:#65716e;--accent:#506f65;--accent-ink:#fff;--page:#f7f8f5;--line:#e0e7e1}
body,button,input,textarea,select{font-family:"Golos Text","Segoe UI",sans-serif}
main{max-width:1500px}
.topbar{border-color:#e5eae5}.brand-orbit{background:#e2efe5;color:#527c68}
.main-nav{background:#eaf0e9}.nav-button.active{background:#fff;color:#243e32}.eyebrow,.lp-eyebrow{color:#668475;letter-spacing:.09em}
.save{background:#4f7864;border-color:#4f7864}.save:hover{background:#3e6251}
.graph{background:#edf3ed;border:1px solid #d8e4d9;box-shadow:inset 0 0 0 1px #ffffff80}
.graph:before{opacity:.28;background-image:radial-gradient(#aec0b0 1px,transparent 1.2px);background-size:25px 25px}
.graph-world path{stroke:#9eb6a4;stroke-width:2.5;opacity:.95}.graph-world path.active-link{stroke:#5d8a71;stroke-width:3}
.graph-node{color:#293b31;text-shadow:none;box-shadow:0 8px 24px #52715a13;border:1px solid #d4e2d6;background:#fff}
.graph-node:hover,.graph-node:focus-visible,.graph-node[aria-pressed=true]{outline:3px solid #c5deca;outline-offset:4px;color:#23382a;background:#fff;box-shadow:0 12px 26px #4c755622;border-color:#82ae8a}
.graph-node.self{width:112px;height:112px;background:#4f7864;color:#fff;border:8px solid #c7dfca;font-size:1.35rem;font-weight:650;box-shadow:0 8px 25px #4f786433}
.graph-node.sphere{width:124px;height:124px;background:#fff;color:#2b4938;border:1px solid #bbd7c0;font-size:1rem;font-weight:600;box-shadow:0 10px 28px #59796218}
.graph-node.mini{width:22px;height:22px;border:4px solid #d1e3d1;background:#6f9a76;box-shadow:0 2px 10px #70997b33}
.graph-node.thought{width:220px;height:98px;border-radius:28px;text-align:left;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;font-size:1rem;font-weight:550;padding:15px 21px;white-space:normal;overflow:hidden}
.graph-node.role-goal,.graph-node.role-stage,.graph-node.role-action,.graph-node.role-note,.graph-node.role-condition{background:#fff;border-color:#d7e5d9}
.graph-node.role-goal{background:#f7fbf6}.graph-node.role-stage{background:#fff}.graph-node.role-action{background:#fcfdf8}
.graph-caption{font-size:.72rem;color:#718b77;font-weight:600;letter-spacing:.015em;line-height:1.1}
.graph-caption:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:#82ad89;margin-right:7px;vertical-align:1px}
.role-stage .graph-caption:before{background:#b4a481}.role-action .graph-caption:before{background:#7ba2aa}
.graph-title{font-size:1rem;line-height:1.25;font-weight:600;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.graph-controls .graph-control{border-color:#dae6da;color:#526658}.graph-control:hover{background:#e9f3e9;color:#294b38}
.neuron-card-label{color:#708f78;letter-spacing:.06em}.neuron-card-actions .save{background:#4f7864}
.outline-link{color:#435b4c}.add-sphere summary{color:#507562}.lp-goal-link{color:#4e7862}.lp-status{color:#527d62}
.dialog-close:hover,.nav-button:hover{color:#3f6650}.sphere-remove{color:#91545a;border-color:#ebdfe0}
@media(max-width:600px){.graph-node.thought{font-size:1rem}.graph-title{font-size:1rem}.graph-caption{font-size:.72rem}}
.graph-node.thought{height:112px}.graph-title{-webkit-line-clamp:3}
#sphere-view>.panel>.sphere-remove{grid-column:1;justify-self:start;margin:4px 0}

/* The map is the centre of the workspace; use one visual language throughout. */
:root{--page:#f6f7fb;--surface:#fff;--ink:#20283a;--muted:#606b7d;--line:#dfe4ef;--accent:#545bcc}
body{background:var(--page)}
.topbar{border-color:#e2e5ef}.brand-orbit{background:#e7eafa;color:#545bcc}
.main-nav{background:#eceef7}.nav-button.active{color:#313b8f}.nav-button:hover{color:#313b8f}
h1,h2,h3,h4{letter-spacing:-.025em}.section-heading h2{font-weight:650;font-size:clamp(1.65rem,2.5vw,2.15rem)}
.map-welcome>p{color:#677184}.map-welcome>.save{white-space:nowrap}
.save,.neuron-card-actions .save{background:#545bcc;border-color:#545bcc;color:white}.save:hover{background:#434bad}
.graph{background:#edf1f9;border-color:#d8dfef;box-shadow:inset 0 1px 0 #fff}
.graph:before{opacity:.23;background-image:radial-gradient(#9baacc 1px,transparent 1.2px);background-size:28px 28px}
.graph-world path{stroke:#a2afd0;stroke-width:2.2;opacity:.9}.graph-world path.active-link{stroke:#6876cd;stroke-width:3}
.graph-node{border-color:#d7def0;box-shadow:0 6px 20px #46588112;color:#27304c}
.graph-node:hover,.graph-node:focus-visible,.graph-node[aria-pressed=true]{outline:3px solid #c5cdf8;border-color:#8493e8;box-shadow:0 8px 28px #5966bb24;color:#202947}
.graph-node.self{background:#545bcc;border-color:#d6dbfa;box-shadow:0 8px 28px #545bcc36}
.graph-node.sphere{background:#fff;color:#333f72;border-color:#c5cee8}.graph-node.mini{background:#747fd8;border-color:#d7def7}
.graph-node.thought{border-radius:28px;padding:15px 20px;gap:6px}
.graph-node.role-goal{background:#f0effe;border-color:#cacaf0}.graph-node.role-stage{background:#fff;border-color:#d8dfef}.graph-node.role-action{background:#f5faf9;border-color:#cbe3df}.graph-node.role-note,.graph-node.role-condition{background:#fffaf3;border-color:#ecdcc6}
.graph-caption{font-size:.76rem;color:#67769a;letter-spacing:0;font-weight:600;text-transform:none}
.graph-caption:before{background:#8b8fdd}.role-stage .graph-caption:before{background:#9cb2df}.role-action .graph-caption:before{background:#75b6ad}
.graph-title{font-size:1rem;font-weight:600;line-height:1.3}
.graph-controls .graph-control{color:#536078;border-color:#dbe1ed}.graph-control:hover{background:#eef0fb;color:#454dac}
.neuron-card-label{color:#6874b0;text-transform:none;letter-spacing:0;font-size:.79rem}
.card-more summary,.map-outline summary{color:#59657a}.lp-goal-link{color:#4d57ba}.lp-status{color:#515ab7}
.plan-dialog [role=status]{color:#a1344e}
.start-details summary{color:#5d6880}
@media(max-width:600px){.graph-node.thought,.graph-title{font-size:1rem}.graph-caption{font-size:.76rem}}

#sphere-view>.panel>.layout-status{grid-column:1;margin:8px 0 0;color:#526797;font-size:.8rem}
.layout-status:empty{display:none}

/* Avoid device cutouts without assuming Telegram's viewport size. */
@supports (padding: max(0px)) {
  main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); padding-bottom: max(32px, env(safe-area-inset-bottom)); }
}
