.modal-backdrop { position: fixed; inset: 0; z-index: 5; display: grid; place-items: end center; padding: 16px; background: rgba(0, 0, 0, .68); opacity: 0; pointer-events: none; transition: .2s; }
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-backdrop.open { z-index:50; }
.entry-modal { position: relative; width: min(100%, 520px); background: #121812; border: 1px solid #3b4735; border-radius: 22px; padding: 24px; box-shadow: 0 20px 80px #000; transform: translateY(24px); transition: .2s; }
.modal-backdrop.open .entry-modal { transform: translateY(0); }
.modal-close { position: absolute; right: 16px; top: 13px; border: 0; background: none; color: #9aa198; font-size: 28px; cursor: pointer; }
.entry-modal h2 { margin-bottom: 18px; }
.entry-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 20px; }
.entry-type { border: 1px solid var(--line); border-radius: 9px; padding: 9px 4px; background: #192019; color: #aab1a7; font: 700 11px Manrope, sans-serif; cursor: pointer; }
.entry-type.active { background: var(--lime); border-color: var(--lime); color: #10140b; }
.entry-modal.task-only .entry-types { grid-template-columns:1fr; }
.entry-modal.task-only .entry-type:not([data-type="task"]) { display:none; }
.field-label { display: block; color: #aab1a7; font-size: 11px; font-weight: 700; margin: 11px 0 6px; }
.field { width: 100%; border: 1px solid #354034; border-radius: 10px; background: #0a0e0a; color: #f5f7f2; padding: 12px; font: 500 13px Manrope, sans-serif; outline: none; }
.field:focus { border-color: var(--lime); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.submit-entry { width: 100%; margin-top: 20px; }
.empty-state { margin: 0; color: var(--muted); text-align: center; padding: 25px; font-size: 13px; border: 1px dashed #303830; border-radius: 15px; }
.goal-list { display: grid; gap: 12px; }
.app-screen { display: none; }
.app-screen.active-screen { display: block; }
.small-add { padding: 10px 12px; font-size: 12px; }
.transaction-list { display: grid; gap: 9px; margin-top: 18px; }
.transaction-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.transaction-row h3 { font-size: 13px; }
.transaction-row p { color: var(--muted); font-size: 11px; margin-top: 4px; }
.transaction-row strong { white-space: nowrap; }
.more-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.more-card h3 { font-size: 17px; margin-bottom: 9px; }
.more-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.more-card .text-button { margin-top: 18px; padding: 0; }
.connection-state { margin-top: 12px; color: var(--lime) !important; }
.feature-goal { margin-top: 14px; border: 0; background: transparent; color: var(--muted); font: 700 11px Manrope, sans-serif; cursor: pointer; padding: 0; }
.feature-goal.featured { color: var(--lime); }
.profile-card { display:flex; align-items:center; gap:14px; background:var(--panel); border:1px solid var(--line); border-radius:18px; padding:18px; }
.profile-card h3 { font-size:18px; }
.profile-avatar { display:grid; place-items:center; border-radius:50%; background:var(--lime); color:#10140b; font-weight:800; }
.profile-avatar.large { width:56px; height:56px; font-size:22px; }
.notes-list { display:grid; gap:9px; margin-top:16px; }
.note-row { border-top:1px solid var(--line); padding:12px 0; }
.note-row:first-child { border-top:0; }
.note-row p { font-size:13px; line-height:1.5; }
.note-row small { display:block; color:var(--muted); font-size:10px; margin-top:5px; }
.note-item { width:100%; display:block; background:none; color:inherit; text-align:left; font:inherit; cursor:pointer; }
.note-item p { white-space:normal; max-height:44px; overflow:hidden; overflow-wrap:anywhere; word-break:break-word; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.note-item.expanded p { white-space:pre-wrap; max-height:none; display:block; -webkit-line-clamp:unset; overflow:visible; overflow-wrap:anywhere; word-break:break-word; }
.section-link { width:100%; display:flex; align-items:center; justify-content:space-between; border:0; background:none; color:inherit; text-align:left; padding:0; cursor:pointer; }
.section-link h3 { margin:0; }
.section-link small { display:block; color:var(--lime); font-size:11px; margin-top:5px; }
.section-arrow { color:var(--lime); font-size:28px; }
.latest-note { width:100%; margin-top:10px; padding:12px; border:1px solid var(--line); border-radius:12px; background:#0b100b; color:#eef5e9; text-align:left; font:500 13px/1.5 Manrope,sans-serif; cursor:pointer; display:-webkit-box; max-height:78px; overflow:hidden; overflow-wrap:anywhere; word-break:break-word; -webkit-box-orient:vertical; -webkit-line-clamp:3; }
.notes-search { margin:0 0 14px; }
.notes-page-list .note-row { cursor:pointer; }
.note-modal { position:relative; width:min(100%,620px); max-height:min(80vh,700px); overflow:auto; background:#121812; border:1px solid #3b4735; border-radius:22px; padding:24px; box-shadow:0 20px 80px #000; overflow-wrap:anywhere; word-break:break-word; }
.note-modal h2 { padding-right:35px; }
.note-modal-date { color:var(--muted); font-size:11px; margin-top:8px; }
.note-modal-text { margin-top:20px; white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.7; color:#eef5e9; }
.task { position:relative; }
.task-more { border:0; background:none; color:var(--muted); font-size:22px; line-height:1; padding:4px; cursor:pointer; }
.task-actions { display:none; position:absolute; right:10px; top:48px; z-index:3; padding:6px; gap:4px; background:#182018; border:1px solid var(--line); border-radius:10px; box-shadow:0 10px 25px #000; }
.task.actions-open .task-actions { display:grid; }
.task-actions button { border:0; background:none; color:#eef5e9; text-align:left; padding:8px 10px; font:600 12px Manrope,sans-serif; cursor:pointer; }
.task-actions button:last-child { color:#ff9b9b; }
.settings-button { margin-left:auto; width:38px; height:38px; border:1px solid var(--line); border-radius:50%; background:#151b14; color:var(--lime); font-size:18px; cursor:pointer; }
.profile-card { min-width:0; }
.app-shell, .app-screen, .more-card, .profile-card, .notes-list, .note-row, .latest-note { min-width:0; }
body { overflow-x:hidden; }
#profileScreen.active-screen { display:grid; gap:14px; }
#profileScreen .section-head { margin:42px 0 10px; }
#profileScreen .more-card { padding:18px; }
.notes-preview-card .muted { margin-top:15px; font-size:12px; }
.notes-page-list { margin-top:0; gap:10px; }
.notes-page-list .note-row { border:1px solid var(--line); border-radius:15px; padding:14px; background:var(--panel); }
.notes-page-list .note-row:first-child { border-top:1px solid var(--line); }
.notes-page-list .note-row p { margin:0; }
.note-item p, .latest-note, .note-modal-text { max-width:100%; }
.bottom-nav { display:grid !important; }
.featured-goal { border-color: #647e30; box-shadow: 0 0 0 1px rgba(196,242,58,.1), 0 10px 30px rgba(128,180,20,.08); }
.secondary-goal { margin-top: 12px; }
.purple-icon { background: rgba(174, 114, 255, .14); color: #d4b8ff; }
.purple-progress span { background: var(--purple); }
.level-track { height: 9px; display: flex; align-items: center; gap: 8px; background: none; overflow: visible; }
.level-segment { flex: .65; height: 7px; background: #30372f; transition: flex .25s, height .2s, background .2s; }
.level-segment.active { flex: 1.7; height: 9px; background: var(--lime); }
.level-segment:not(.active) { opacity: .62; }
.level-segment { cursor:pointer; }
.week-plan { display: grid; gap: 14px; }
.day-group { display: grid; gap: 9px; }
.day-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; border: 1px solid #29332b; border-radius: 13px; padding: 12px 14px; background: #111811; color: #eef5e9; text-align: left; cursor: pointer; }
.day-group.today .day-toggle { border-color: var(--lime); background: rgba(196,242,58,.08); }
.day-toggle strong { font-size: 13px; }
.day-toggle small { color: var(--muted); font-size: 11px; }
.day-tasks { display: grid; gap: 9px; }
.day-group.collapsed .day-tasks { display: none; }
.day-group.collapsed .day-toggle::after { content: '＋'; color: var(--lime); font-size: 18px; }
.day-group:not(.collapsed) .day-toggle::after { content: '−'; color: var(--lime); font-size: 18px; }
