:root {
  --ink: #f5f7fb;
  --muted: #98a1b5;
  --bg: #0a0e18;
  --panel: #111724;
  --panel-2: #171f2f;
  --line: #2b3548;
  --lime: #b9f18c;
  --cyan: #6bd4ff;
  --amber: #ffc86b;
  --violet: #aa9cff;
  --danger: #ff8f9a;
  --shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
* { scrollbar-width: thin; scrollbar-color: #526078 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #526078; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #697992; background-clip: padding-box; }
html { font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; background: var(--bg); color: var(--ink); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 78% 8%, rgba(107, 212, 255, .08), transparent 27rem), var(--bg); }
button, input { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px; border-right: 1px solid rgba(255,255,255,.07); display: flex; flex-direction: column; background: rgba(9, 13, 23, .86); backdrop-filter: blur(18px); z-index: 10; }
.brand { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 4px 8px 26px; font-size: 1.25rem; font-weight: 720; cursor: pointer; }
.brand-mark { width: 30px; height: 30px; position: relative; display: inline-block; }
.brand-mark::before { content: ""; position: absolute; left: 4px; top: 14px; width: 17px; height: 2px; background: var(--lime); transform: rotate(-28deg); border-radius: 2px; }
.brand-mark i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.brand-mark i:nth-child(1) { left: 1px; top: 17px; }
.brand-mark i:nth-child(2) { right: 2px; top: 3px; background: var(--cyan); }
.brand-mark i:nth-child(3) { right: 1px; bottom: 3px; background: var(--amber); }
.nav { display: grid; gap: 8px; }
.nav-item { border: 0; background: transparent; color: var(--muted); border-radius: 12px; padding: 12px 14px; text-align: left; display: flex; gap: 12px; align-items: center; cursor: pointer; font-size: .94rem; }
.nav-item span { width: 18px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,.045); color: var(--ink); }
.nav-item.is-active { background: var(--panel-2); color: var(--ink); }
.sidebar-note { margin-top: auto; padding: 15px; border: 1px solid var(--line); border-radius: 14px; display: flex; align-items: flex-start; gap: 10px; color: var(--muted); }
.sidebar-note p { margin: 0; line-height: 1.6; font-size: .82rem; }
.pulse { width: 8px; height: 8px; margin-top: 6px; flex: none; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(185,241,140,.09); }

.main { min-width: 0; }
.view { display: none; min-height: 100vh; padding: 48px clamp(24px, 4vw, 64px); }
.view.is-visible { display: block; animation: arrive .32s ease both; }
#tree-view { padding-top: clamp(20px, 3vh, 48px); padding-bottom: 20px; }
#tree-view .tree-head { margin-bottom: 20px; }
@keyframes arrive { from { opacity: 0; transform: translateY(7px); } }
.page-head, .tree-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 42px; }
.page-head.compact { margin-bottom: 18px; }
.head-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.eyebrow { margin: 0 0 10px; color: var(--lime); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 750; }
h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: -.05em; line-height: 1.04; }
h2 { margin: 0; font-size: 1.4rem; letter-spacing: -.03em; }
.primary-button, .soft-button { border-radius: 12px; padding: 11px 16px; border: 1px solid transparent; cursor: pointer; font-weight: 680; }
.primary-button { background: var(--lime); color: #10160d; }
.primary-button:hover { background: #c9ffa0; transform: translateY(-1px); }
.soft-button { border-color: var(--line); background: var(--panel); color: var(--muted); }
.soft-button:hover { color: var(--ink); border-color: #44516a; }

.goal-grid { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 18px; max-width: 980px; }
.goal-card { min-height: 206px; border: 1px solid var(--line); background: linear-gradient(150deg, rgba(255,255,255,.035), rgba(255,255,255,.008)); border-radius: 22px; text-align: left; position: relative; overflow: hidden; transition: .22s ease; }
.goal-card:hover { transform: translateY(-3px); border-color: var(--goal-color); box-shadow: var(--shadow); }
.goal-card::after { content: ""; position: absolute; width: 170px; height: 170px; border-radius: 50%; right: -80px; top: -85px; background: var(--goal-color); opacity: .08; }
.goal-icon { width: 42px; height: 42px; border-radius: 13px; background: color-mix(in srgb, var(--goal-color) 16%, transparent); color: var(--goal-color); display: grid; place-items: center; font-size: 1.15rem; margin-bottom: 34px; }
.goal-open { position: relative; z-index: 1; width: 100%; min-height: 204px; padding: 24px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.goal-card h2 { font-size: 1.5rem; }
.goal-meta { margin-top: 8px; display: flex; gap: 14px; color: var(--muted); font-size: .82rem; }
.goal-arrow { position: absolute; right: 22px; bottom: 24px; color: var(--goal-color); font-size: 1.25rem; }
.goal-delete { position: absolute; z-index: 2; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: #6f7a91; cursor: pointer; }
.goal-delete:hover { color: var(--danger); border-color: rgba(255,143,154,.28); background: rgba(255,143,154,.07); }
.add-goal-card { border-style: dashed; color: var(--muted); display: grid; place-items: center; min-height: 206px; padding: 24px; cursor: pointer; }
.add-goal-card span { display: block; text-align: center; font-size: .92rem; }
.add-goal-card b { display: block; font-size: 1.8rem; color: var(--ink); font-weight: 400; margin-bottom: 9px; }

.back-link { border: 0; padding: 0 0 12px; background: transparent; color: var(--muted); cursor: pointer; }
.title-row { display: flex; align-items: center; gap: 14px; }
.title-row h1 { font-size: clamp(2rem, 3vw, 3.1rem); }
.quiet-badge { color: var(--muted); border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; font-size: .76rem; }
.tree-actions { display: flex; gap: 10px; }
.breadcrumb { min-height: 35px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .86rem; overflow-x: auto; white-space: nowrap; margin-bottom: 12px; }
.breadcrumb button { border: 0; background: transparent; color: inherit; padding: 4px 0; cursor: pointer; }
.breadcrumb button:last-child { color: var(--ink); }
.crumb-sep { color: #465168; }
.tree-workspace { min-height: 620px; height: calc(100vh - 210px); border: 1px solid var(--line); background: rgba(14,20,32,.76); border-radius: 22px; display: grid; grid-template-columns: minmax(0, 1fr) 290px; overflow: hidden; box-shadow: var(--shadow); }
.tree-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.tree-scroll { min-width: 0; position: relative; overflow: auto; padding: 44px 48px 90px; scrollbar-width: thin; scrollbar-color: #526078 transparent; }
.tree-scroll:focus-visible { outline: 2px solid var(--cyan); outline-offset: -3px; }
.tree-columns { position: relative; z-index: 2; display: flex; align-items: flex-start; gap: 86px; min-width: max-content; }
.tree-column { width: 230px; display: grid; gap: 18px; align-content: center; min-height: 390px; }
.column-label { color: #68748c; text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; margin: 0 0 1px 2px; }
.tree-node { width: 230px; min-height: 82px; border: 1px solid color-mix(in srgb, var(--node-color) 82%, #344057); border-left: 6px solid var(--node-color); background: color-mix(in srgb, var(--node-color) 20%, #151d2b); border-radius: 15px; padding: 13px 15px; text-align: left; cursor: pointer; position: relative; transition: .18s ease; }
.tree-node:hover { transform: translateY(-2px); border-color: #53617a; }
.tree-node.is-selected { border-color: var(--node-color, var(--cyan)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--node-color, var(--cyan)) 13%, transparent); }
.tree-node.is-root { background: color-mix(in srgb, var(--node-color) 13%, #202a3c); }
.tree-node.is-actionable { border-style: solid; }
.tree-node.is-done { background: #294334; border-color: #83c965; border-left-color: #b9f18c; }
.tree-node.is-done.is-selected { border-color: #b9f18c; box-shadow: 0 0 0 3px rgba(185,241,140,.25); }
.tree-node-title { display: block; font-size: 1rem; font-weight: 720; line-height: 1.35; }
.tree-node-ideas { display: block; margin-top: 6px; color: #f0c977; font-size: .75rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-meta { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: #c0c9d8; font-size: .8rem; }
.tree-node.is-done .node-meta { color: #d4efce; }
.node-dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.node-count { margin-left: auto; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 7px; background: color-mix(in srgb, var(--node-color) 16%, #242e40); display: grid; place-items: center; color: #dce2ee; font-style: normal; white-space: nowrap; }
.node-total { margin-left: auto; color: var(--lime); font-weight: 750; }
.node-notes-count { margin-left: auto; font-style: normal; color: #dce5f5; white-space: nowrap; }
.node-notes-count + .node-count { margin-left: 0; }
.tree-node.is-done .node-count { background: rgba(185,241,140,.18); color: #e8ffda; }
.connectors { position: absolute; z-index: 1; inset: 0; pointer-events: none; overflow: visible; }
.connector { fill: none; stroke: #354157; stroke-width: 1.5; }
.connector.active { stroke: var(--lime); opacity: .7; }
.node-panel { border-left: 1px solid var(--line); background: #0e1420; padding: 24px; overflow-y: auto; }
.panel-link-idea { width: 100%; margin-top: 10px; text-align: left; }
.node-notes { border-top: 1px solid var(--line); background: #101a27; max-height: 210px; min-height: 54px; overflow: hidden; }
.notes-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; }
.notes-heading h3 { margin: 2px 0 0; font-size: .92rem; }
.notes-eyebrow { color: var(--lime); font-size: .7rem; }
.notes-content { max-height: 154px; overflow-y: auto; padding: 0 18px 16px; scrollbar-width: thin; scrollbar-color: #526078 transparent; }
.node-notes.is-collapsed .notes-content { display: none; }
.note-empty { color: var(--muted); font-size: .8rem; margin: 4px 0 12px; }
.note-list { display: flex; gap: 10px; overflow-x: auto; padding: 3px 0 12px; }
.note-entry { flex: 0 0 min(280px, 85%); border: 1px solid #3c4a60; background: #172335; border-radius: 12px; padding: 10px 12px; }
.note-entry p { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.note-view-full, .idea-view-full { border: 0; background: transparent; color: var(--cyan); cursor: pointer; padding: 0; font-size: .74rem; margin: 0 0 8px; }
.note-entry div { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .7rem; }
.note-entry time { margin-right: auto; }
.note-entry button, .linked-ideas button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
#note-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
#note-form label { grid-column: 1/-1; color: var(--muted); font-size: .72rem; }
#note-input { width: 100%; min-height: 48px; max-height: 110px; resize: vertical; border: 1px solid #44516a; background: #0c1421; color: var(--ink); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: .84rem; }
.note-form-actions { display: flex; align-items: center; gap: 8px; }
.linked-ideas { display: flex; align-items: center; gap: 8px; overflow-x: auto; margin: 0 0 10px; }
.linked-ideas > span { flex: none; color: var(--muted); font-size: .72rem; }
.linked-ideas article { display: flex; align-items: flex-start; gap: 7px; flex: 0 0 auto; max-width: min(370px, 85%); border: 1px solid #53617a; border-radius: 9px; padding: 6px 8px; font-size: .75rem; }
.linked-ideas details { min-width: 0; }
.linked-ideas summary { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.linked-ideas summary b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linked-ideas details p { white-space: pre-wrap; line-height: 1.5; overflow-y: auto; max-height: 110px; margin: 8px 0; }
.linked-ideas details a { display: inline-block; margin: 4px 0; color: var(--cyan); }
.linked-ideas small { color: var(--muted); }
.empty-panel { height: 100%; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); line-height: 1.6; }
.panel-orbit { width: 48px; height: 48px; border: 1px dashed #48546b; border-radius: 50%; position: relative; margin-bottom: 8px; }
.panel-orbit::after { content: ""; position: absolute; width: 8px; height: 8px; background: var(--lime); border-radius: 50%; top: 3px; left: 4px; }
.panel-kicker { color: var(--muted); font-size: .74rem; margin: 0 0 8px; }
.panel-title { font-size: 1.3rem; margin-bottom: 10px; overflow-wrap: anywhere; }
.panel-path { color: var(--muted); font-size: .76rem; line-height: 1.6; margin: 0 0 24px; }
.branch-progress { border: 1px solid var(--line); background: #121a28; border-radius: 14px; padding: 15px; margin: 0 0 15px; }
.branch-progress-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.branch-progress-head b { color: var(--lime); font-size: 1.3rem; }
.branch-progress-head span, .daily-note { color: var(--muted); font-size: .76rem; line-height: 1.5; }
.progress-track { height: 5px; border-radius: 999px; background: #2b3548; overflow: hidden; margin-bottom: 10px; }
.progress-track span { display: block; height: 100%; background: var(--lime); border-radius: inherit; }
.progress-item { display: flex; gap: 8px; align-items: baseline; border-top: 1px solid rgba(255,255,255,.05); padding: 8px 0 0; margin-top: 8px; font-size: .77rem; line-height: 1.35; }
.progress-item span { color: var(--lime); }
.daily-note { margin: 0 0 16px; }
.panel-buttons { display: grid; gap: 10px; }
.panel-buttons button { width: 100%; text-align: left; }
.panel-tip { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); font-size: .78rem; line-height: 1.65; }
.panel-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 18px 0; }
.stat-card { min-width: 0; padding: 12px; border: 1px solid var(--line); background: #121a28; border-radius: 12px; }
.stat-card b { display: block; font-size: 1.25rem; line-height: 1.1; color: var(--ink); }
.stat-card span { display: block; margin-top: 6px; color: var(--muted); font-size: .7rem; }
.recent-work { margin: 0 0 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.recent-work p { margin: 0 0 9px; color: var(--muted); font-size: .75rem; }
.recent-work > div { display: grid; gap: 3px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.045); }
.recent-work span { color: var(--ink); font-size: .79rem; line-height: 1.35; }
.recent-work small { color: var(--muted); font-size: .69rem; }
.danger-text-button { border: 0; background: transparent; color: var(--danger); cursor: pointer; padding: 8px 2px; text-align: left; opacity: .78; }
.danger-text-button:hover { opacity: 1; }

.action-stage { min-height: calc(100vh - 150px); display: grid; place-items: stretch; }
.action-placeholder { text-align: center; color: var(--muted); }
.action-placeholder .panel-orbit { display: block; margin: 0 auto 12px; }
.action-empty-filter { flex: 1; min-height: 420px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.action-empty-filter .panel-orbit { margin-bottom: 14px; }
.action-content { width: 100%; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100vh - 170px); }
.action-categories { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.category-chip { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: #121a28; color: var(--muted); cursor: pointer; font-size: .78rem; }
.category-chip span { color: #7d8ba4; margin-left: 3px; }
.category-chip.is-active { background: color-mix(in srgb, var(--lime) 12%, #121a28); border-color: var(--lime); color: var(--ink); }
.category-chip.is-active span { color: var(--lime); }
.bubble-field { width: 100%; min-height: var(--bubble-field-height, 620px); flex: 1; position: relative; overflow: visible; }
.action-bubble { border: 1px solid color-mix(in srgb, var(--bubble-color) 64%, var(--line)); background: radial-gradient(circle at 36% 30%, color-mix(in srgb, var(--bubble-color) 18%, transparent), transparent 64%), #111724; border-radius: 50%; width: var(--bubble-size); height: var(--bubble-size); padding: 28px; display: grid; place-content: center; text-align: center; cursor: pointer; transition: .24s ease; position: absolute; left: var(--bubble-left); top: var(--bubble-top); transform: translate(-50%, -50%); box-shadow: inset 0 0 30px rgba(255,255,255,.015), 0 16px 42px color-mix(in srgb, var(--bubble-color) 8%, transparent); }
.action-bubble:hover { transform: translate(-50%, calc(-50% - 4px)) scale(1.02); box-shadow: 0 20px 60px color-mix(in srgb, var(--bubble-color) 13%, transparent); }
.bubble-path { color: var(--muted); font-size: .75rem; line-height: 1.5; margin-bottom: 10px; }
.bubble-title { font-size: 1.1rem; line-height: 1.45; font-weight: 720; }
.bubble-idea { display: block; max-width: 22ch; margin-top: 9px; color: var(--lime); font-size: .74rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bubble-hint { margin-top: 12px; color: var(--bubble-color); font-size: .73rem; }
.action-stage:has(.focus-wrap) { place-items: center; }
.focus-wrap { width: min(660px, 100%); display: grid; justify-items: center; text-align: center; }
.focus-path { color: var(--muted); font-size: .8rem; margin: 0 0 12px; line-height: 1.5; }
.focus-idea { color: var(--lime); font-size: .78rem; width: min(16ch, 100%); margin: 0 auto 18px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.focus-card { width: 100%; padding: clamp(28px, 5vw, 54px); border-radius: 28px; background: linear-gradient(155deg, rgba(255,255,255,.045), rgba(255,255,255,.01)); border: 1px solid #354158; box-shadow: var(--shadow); }
.focus-card h2 { font-size: clamp(1.75rem, 4vw, 2.8rem); line-height: 1.22; margin: 8px auto 12px; max-width: 16ch; text-align: left; }
.focus-label { color: var(--lime); font-size: .75rem; letter-spacing: .12em; }
.timer-mode { display: inline-flex; border: 1px solid var(--line); background: #0d1320; border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.timer-mode button { border: 0; background: transparent; color: var(--muted); border-radius: 8px; padding: 8px 13px; cursor: pointer; font-size: .78rem; }
.timer-mode button.is-active { background: var(--panel-2); color: var(--ink); }
.timer { font-variant-numeric: tabular-nums; font-size: clamp(3.5rem, 10vw, 6.8rem); letter-spacing: -.07em; line-height: 1; margin-bottom: 28px; }
.timer-controls { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.timer-button { min-width: 120px; }
.timer-button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.focus-exits { margin-top: 28px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; }
.text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 8px 2px; text-decoration: underline; text-decoration-color: #404b60; text-underline-offset: 5px; }
.text-button:hover { color: var(--ink); }
.action-topline { width: 100%; display: flex; justify-content: space-between; align-items: center; margin: 0 0 18px; color: var(--muted); font-size: .8rem; }
.today-done { width: min(900px, 100%); margin: 26px auto 0; padding: 16px 18px; border: 1px solid rgba(185,241,140,.17); background: rgba(185,241,140,.045); border-radius: 15px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; }
.today-done b { color: var(--lime); font-size: 1.2rem; }
.action-stats { margin: 12px 0 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(150px, 280px)); gap: 10px; padding-bottom: 8px; }
.action-stats div { border: 1px solid var(--line); background: #111925; border-radius: 14px; padding: 14px 16px; }
.action-stats b { display: block; color: var(--ink); font-size: 1.18rem; }
.action-stats span { display: block; margin-top: 5px; color: var(--muted); font-size: .72rem; }
.repeat-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; color: var(--bubble-color); font-size: .7rem; }
.custom-time { display: none; justify-content: center; align-items: center; gap: 8px; margin: -10px 0 22px; }
.custom-time.is-visible { display: flex; }
.custom-time input { width: 88px; border: 1px solid #3d4960; background: #0d1320; color: var(--ink); border-radius: 10px; padding: 9px 10px; text-align: center; }
.custom-time span { color: var(--muted); font-size: .82rem; }
.timer-status { min-height: 22px; margin: -15px 0 15px; color: var(--lime); font-size: .78rem; }

.dialog { width: min(520px, calc(100vw - 32px)); padding: 0; color: var(--ink); background: var(--panel); border: 1px solid #3a465c; border-radius: 20px; box-shadow: 0 30px 90px rgba(0,0,0,.5); }
.dialog::backdrop { background: rgba(3,6,11,.72); backdrop-filter: blur(4px); }
.dialog form { padding: 24px; }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 1.8rem; cursor: pointer; line-height: 1; }
.field-label { display: block; color: #dce2ee; font-size: .87rem; margin-bottom: 9px; }
.text-input { width: 100%; border: 1px solid #3d4960; background: #0d1320; color: var(--ink); border-radius: 12px; padding: 14px; outline: none; font-size: 1rem; }
.text-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(107,212,255,.1); }
.prompt-block { margin-top: 18px; padding: 15px; border-radius: 14px; background: #0e1420; }
.prompt-block > span { color: var(--muted); font-size: .75rem; }
.prompt-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.prompt-chips button { border: 1px solid var(--line); background: #151d2b; border-radius: 999px; color: #bac3d5; padding: 7px 10px; font-size: .75rem; cursor: pointer; }
.prompt-chips button:hover, .prompt-chips button.is-active { border-color: var(--cyan); color: var(--cyan); }
.prompt-block p { margin: 12px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.dialog-actions.centered { justify-content: center; }
.small-dialog { width: min(450px, calc(100vw - 32px)); }
.action-type-options { display: grid; gap: 10px; }
.type-option { display: flex; gap: 12px; align-items: flex-start; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #0e1420; cursor: pointer; }
.type-option:has(input:checked) { border-color: var(--lime); background: rgba(185,241,140,.055); }
.type-option input { margin-top: 4px; accent-color: var(--lime); }
.type-option b, .type-option small { display: block; }
.type-option b { margin-bottom: 5px; }
.type-option small { color: var(--muted); line-height: 1.45; }
.repeat-settings { margin-top: 18px; }
.repeat-settings[hidden] { display: none; }
.repeat-settings p { margin: 8px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.color-label { margin-top: 20px; }
.color-options { display: flex; gap: 9px; flex-wrap: wrap; }
.color-choice { display: inline-flex; cursor: pointer; }
.color-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.color-choice span { width: 32px; height: 32px; border-radius: 50%; background: var(--choice-color); border: 3px solid #121a28; box-shadow: 0 0 0 1px #58647b; }
.color-choice input:checked + span, .color-choice input:focus-visible + span { box-shadow: 0 0 0 3px #f3f6ff; }
.spaced-label { margin-top: 16px; }
.idea-body { min-height: 145px; resize: vertical; line-height: 1.55; }
.idea-filters { display: flex; gap: 9px; overflow-x: auto; margin: -16px 0 22px; padding: 4px 0; }
.idea-filter { border: 1px solid var(--line); border-radius: 999px; background: #151d2b; color: var(--muted); padding: 8px 13px; cursor: pointer; white-space: nowrap; }
.idea-filter.is-active { border-color: var(--lime); color: #e8ffda; background: rgba(185,241,140,.12); }
.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.idea-card { min-width: 0; border: 1px solid #3a4960; border-radius: 18px; background: #151e2d; padding: 20px; }
.idea-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 15px; color: var(--lime); font-size: .76rem; }
.idea-card-top small { color: var(--muted); }
.idea-card h2 { font-size: 1.15rem; overflow-wrap: anywhere; }
.idea-card p { margin: 12px 0 6px; color: #c2cad8; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: .9rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; }
.idea-card a { display: inline-block; color: var(--cyan); font-size: .78rem; margin: 5px 0; }
.idea-card-actions { display: flex; gap: 14px; margin-top: 17px; padding-top: 12px; border-top: 1px solid var(--line); }
.idea-card-actions button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px 0; }
.idea-card-actions button:hover { color: var(--ink); }
.ideas-empty { grid-column: 1/-1; padding: 56px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 16px; }
.picker-shell { padding: 24px; }
.idea-picker-list { display: grid; gap: 9px; max-height: min(55vh, 420px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #526078 transparent; }
.idea-picker-list article { display: grid; gap: 7px; border: 1px solid var(--line); background: #0e1420; border-radius: 12px; padding: 12px; }
.idea-picker-list article span { color: var(--lime); font-size: .72rem; }
.idea-picker-list article b { overflow-wrap: anywhere; }
.idea-picker-list article div { display: flex; gap: 8px; flex-wrap: wrap; }
.idea-picker-list button:disabled { opacity: .45; cursor: default; }
.import-summary { line-height: 1.6; }
.import-warning { color: var(--danger); font-size: .82rem; line-height: 1.5; }
.node-menu { position: fixed; z-index: 35; width: 234px; padding: 8px; border: 1px solid #58657a; background: #1b2535; box-shadow: 0 20px 55px rgba(0,0,0,.5); border-radius: 14px; }
.node-menu[hidden] { display: none; }
.node-menu p { margin: 3px 8px 8px; color: var(--muted); font-size: .72rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.node-menu > button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; color: var(--ink); font-size: .82rem; }
.node-menu > button:hover { background: #303d52; }
.node-menu > button.menu-danger { color: #ffb5bd; }
.menu-colors { padding: 9px 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 7px; }
.menu-colors span { width: 100%; color: var(--muted); font-size: .7rem; }
.menu-colors button { width: 20px; height: 20px; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; background: var(--choice-color); cursor: pointer; }
.content-dialog { width: min(680px, calc(100vw - 32px)); height: min(78vh, 720px); max-height: min(78vh, 720px); overflow: hidden; }
.content-dialog-shell { height: 100%; max-height: 100%; padding: 26px; overflow: hidden; display: flex; flex-direction: column; }
.content-dialog-meta { color: var(--muted); font-size: .8rem; margin: -10px 0 18px; }
.content-dialog-body { min-height: 0; flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; font-size: .98rem; overflow-y: auto; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #0d1522; scrollbar-width: thin; scrollbar-color: #526078 transparent; }
.content-dialog-body::-webkit-scrollbar { width: 8px; }
.content-dialog-body::-webkit-scrollbar-track { background: transparent; }
.content-dialog-body::-webkit-scrollbar-thumb { background: #526078; border-radius: 999px; border: 2px solid #0d1522; }
.content-dialog-link { display: inline-block; margin-top: 15px; color: var(--cyan); font-size: .84rem; }
.delete-mark { width: 44px; height: 44px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; color: var(--danger); background: rgba(255,143,154,.09); font-size: 1.5rem; }
#delete-form { text-align: center; }
.delete-copy { color: var(--muted); line-height: 1.6; margin: 12px 0 4px; }
.danger-button { border: 1px solid rgba(255,143,154,.42); background: rgba(255,143,154,.12); color: #ffc2c8; border-radius: 12px; padding: 11px 16px; cursor: pointer; font-weight: 680; }
.danger-button:hover { background: rgba(255,143,154,.2); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 11px 15px; border-radius: 11px; background: #efffdc; color: #16200f; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s ease; z-index: 30; font-size: .85rem; font-weight: 650; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .app-shell { display: block; padding-bottom: 72px; }
  .sidebar { position: fixed; inset: auto 0 0; height: 68px; padding: 8px 16px; border-right: 0; border-top: 1px solid rgba(255,255,255,.08); flex-direction: row; align-items: center; z-index: 20; }
  .brand, .sidebar-note { display: none; }
  .nav { width: 100%; grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .nav-item { justify-content: center; flex-direction: column; gap: 2px; padding: 6px; font-size: .72rem; }
  .nav-item span { font-size: 1rem; }
  .view { padding: 28px 18px; min-height: calc(100vh - 68px); }
  .head-actions { justify-content: flex-start; }
  #goals-view .page-head, #ideas-view .page-head { display: grid; }
  .page-head, .tree-head { align-items: flex-start; margin-bottom: 28px; }
  .goal-grid { grid-template-columns: 1fr; }
  .goal-card, .add-goal-card { min-height: 170px; }
  .tree-head { display: block; }
  .tree-actions { margin-top: 18px; }
  .tree-workspace { height: auto; min-height: 0; display: flex; flex-direction: column; overflow: visible; }
  .tree-main { display: block; }
  .tree-scroll { height: 340px; padding: 24px 30px 60px; }
  .node-notes { max-height: none; }
  .notes-content { max-height: 250px; }
  .node-panel { position: static; max-height: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 16px; }
  .empty-panel { display: none; }
  .panel-path, .panel-tip { display: none; }
  .panel-buttons { grid-template-columns: repeat(2, 1fr); }
  .panel-kicker { display: none; }
  .panel-title { font-size: 1rem; margin-bottom: 12px; }
  .bubble-field { min-height: 560px; }
  .action-bubble { padding: 22px; }
}

@media (max-width: 480px) {
  h1 { font-size: 2.1rem; }
  .page-head { gap: 14px; }
  .primary-button, .soft-button { padding: 10px 12px; }
  .goal-card { min-height: 150px; }
  .goal-icon { margin-bottom: 22px; }
  .title-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .tree-actions { width: 100%; }
  .tree-actions button { flex: 1; }
  .action-content { min-height: calc(100vh - 110px); }
  .bubble-field { min-height: 560px; padding: 10px 0; }
  .action-bubble { width: min(var(--bubble-size), 72vw); height: min(var(--bubble-size), 72vw); padding: 18px; }
  .action-stats { grid-template-columns: 1fr; }
  .focus-card { padding: 28px 20px; }
  .timer { font-size: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Light theme variant */
body.light-theme {
  --ink: #243044;
  --muted: #718096;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-2: #e8eef6;
  --line: #d5deea;
  --lime: #5d963d;
  --cyan: #1a7ea8;
  --amber: #b5791a;
  --violet: #6e5bc2;
  --danger: #c24f60;
  --shadow: 0 18px 50px rgba(55, 75, 105, .14);
  color: var(--ink);
  background: radial-gradient(circle at 78% 8%, rgba(107, 212, 255, .18), transparent 27rem), var(--bg);
}
body.light-theme .sidebar { background: rgba(255,255,255,.86); border-color: #e0e7f0; }
body.light-theme .nav-item:hover { background: #eef3f8; }
body.light-theme .nav-item.is-active { background: #e7eef7; }
body.light-theme .sidebar-note { background: rgba(255,255,255,.7); }
body.light-theme .goal-card { background: linear-gradient(150deg, rgba(255,255,255,.96), rgba(246,249,253,.96)); }
body.light-theme .tree-workspace { background: rgba(255,255,255,.72); }
body.light-theme .tree-node { background: color-mix(in srgb, var(--node-color) 15%, #ffffff); }
body.light-theme .tree-node.is-root { background: color-mix(in srgb, var(--node-color) 11%, #ffffff); }
body.light-theme .tree-node.is-done { background: #e5f4e4; border-color: #77b978; }
body.light-theme .node-panel { background: #fbfdff; }
body.light-theme .node-notes { background: #f6f9fc; }
body.light-theme .note-entry { border-color: #d5deea; background: #ffffff; }
body.light-theme #note-input, body.light-theme .text-input, body.light-theme .custom-time input { background: #ffffff; border-color: #c8d4e3; }
body.light-theme .branch-progress, body.light-theme .stat-card, body.light-theme .category-chip, body.light-theme .action-stats div { background: #ffffff; }
body.light-theme .progress-track { background: #dce5ef; }
body.light-theme .action-bubble { background: radial-gradient(circle at 36% 30%, color-mix(in srgb, var(--bubble-color) 18%, transparent), transparent 64%), #ffffff; box-shadow: inset 0 0 30px rgba(20,45,80,.025), 0 16px 42px color-mix(in srgb, var(--bubble-color) 12%, transparent); }
body.light-theme .focus-card { background: linear-gradient(155deg, rgba(255,255,255,.98), rgba(246,249,253,.98)); border-color: #ccd8e7; }
body.light-theme .timer-mode { background: #f1f5fa; }
body.light-theme .timer-mode button.is-active { background: #ffffff; }
body.light-theme .action-stats div { background: rgba(255,255,255,.86); }
body.light-theme .today-done { background: rgba(185,241,140,.16); }
body.light-theme .dialog { background: #ffffff; border-color: #cbd7e6; box-shadow: 0 30px 90px rgba(50,70,100,.22); }
body.light-theme .dialog::backdrop { background: rgba(33,47,68,.32); }
body.light-theme .prompt-block, body.light-theme .type-option, body.light-theme .idea-picker-list article { background: #f5f8fc; }
body.light-theme .prompt-chips button, body.light-theme .idea-filter { background: #eef3f8; }
body.light-theme .idea-card { background: #ffffff; border-color: #cbd7e6; }
body.light-theme .node-menu { background: #ffffff; border-color: #c1cedf; box-shadow: 0 20px 55px rgba(50,70,100,.2); }
body.light-theme .node-menu > button:hover { background: #edf2f8; }
body.light-theme .content-dialog-body { background: #f7faff; }
body.light-theme .content-dialog-body::-webkit-scrollbar-thumb { border-color: #f7faff; }
body.light-theme * { scrollbar-color: #9aabc0 transparent; }
body.light-theme *::-webkit-scrollbar-thumb { background: #9aabc0; }
body.light-theme *::-webkit-scrollbar-thumb:hover { background: #7f93ad; }
