:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#24382c;background:#f6f8f5;font-size:15px;--green:#2c694b;--muted:#748078;--border:#e2e8e0}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer;border:1px solid var(--border);background:white;color:inherit;border-radius:10px;padding:10px 15px;transition:background .15s}button:hover{background:#edf3eb}button:disabled{opacity:.55;cursor:wait}button.primary{background:var(--green);color:white;border-color:var(--green)}button.danger{color:#b23d3d}button.icon{padding:6px 10px;font-size:18px}a{color:var(--green)}input,select,textarea{width:100%;border:1px solid var(--border);background:white;border-radius:9px;padding:11px;color:inherit;outline:none}input:focus,select:focus,textarea:focus,[contenteditable]:focus{border-color:#70a584;box-shadow:0 0 0 3px #70a58420}label{display:block;font-size:13px;font-weight:600;margin-bottom:6px}h1,h2,h3,p{margin-top:0}h1{font-size:34px;letter-spacing:-1px;line-height:1.2}h2{font-size:22px;letter-spacing:-.4px}p{line-height:1.65}.muted{color:var(--muted)}.small{font-size:12px}.layout{display:flex;min-height:100vh}.sidebar{width:248px;flex-shrink:0;border-right:1px solid var(--border);padding:30px 20px;background:#fff;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column}.brand{font-size:26px;font-weight:750;letter-spacing:-1px;display:flex;align-items:center;gap:10px;margin-bottom:8px}.brand span{background:#e8f1e6;border-radius:12px;padding:7px;font-size:24px}.subtitle{font-size:12px;color:var(--muted);margin:0 0 34px 4px}.nav{display:flex;flex-direction:column;gap:6px}.nav button{border:0;background:transparent;text-align:left;display:flex;align-items:center;gap:12px;padding:13px 12px}.nav button.active{background:#eaf2e8;color:var(--green);font-weight:600}.nav .nav-icon{width:23px;font-size:20px}.side-bottom{margin-top:auto;padding-top:30px}.side-note{background:#f5f7f2;border-radius:14px;padding:16px;font-size:12px;line-height:1.7;margin-bottom:18px}.content{margin-left:248px;width:calc(100% - 248px);padding:30px 48px 60px;max-width:1550px}.topbar{display:flex;align-items:center;gap:14px;justify-content:space-between;margin-bottom:44px}.search{max-width:520px;flex:1;position:relative}.search input{background:#fff;padding-left:40px}.search:before{content:'⌕';position:absolute;left:15px;top:5px;font-size:28px;color:var(--muted)}.user{display:flex;align-items:center;gap:10px}.avatar{background:#e6ede2;border-radius:50%;width:36px;height:36px;display:grid;place-items:center;font-weight:600}.eyebrow{text-transform:uppercase;letter-spacing:2px;font-size:11px;font-weight:700;color:var(--green);margin-bottom:14px}.page-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:30px}.page-head h1{margin-bottom:10px}.page-head p{margin-bottom:0}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.category{padding:26px;background:#fff;border:1px solid var(--border);border-radius:18px;text-align:left;position:relative;min-height:170px;box-shadow:0 2px 3px #203d2310}.category:hover{border-color:#96b498;transform:translateY(-1px)}.category-icon{display:block;font-size:30px;width:57px;height:57px;border-radius:16px;background:#f1f5ea;padding:10px;margin-bottom:19px}.category:nth-child(2) .category-icon{background:#fff1df}.category:nth-child(3) .category-icon{background:#eaf1fb}.category:nth-child(4) .category-icon{background:#f3eefa}.category h2{margin:0 0 9px;font-size:20px}.category p{font-size:13px;color:var(--muted);margin:0;max-width:80%}.category .arrow{position:absolute;right:26px;bottom:25px;font-size:23px;color:#93a08f}.section-title{display:flex;justify-content:space-between;align-items:center;margin:36px 0 18px}.section-title h2{margin:0}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.card{background:white;border:1px solid var(--border);border-radius:15px;overflow:hidden;display:flex;flex-direction:column;position:relative}.card-body{padding:20px;flex:1}.card h3{font-size:18px;margin:12px 0;overflow-wrap:anywhere}.card .summary{font-size:13px;color:var(--muted);line-height:1.6;white-space:pre-line;overflow-wrap:anywhere}.card-photo{height:165px;width:100%;object-fit:cover}.card-top{display:flex;justify-content:space-between;align-items:center;gap:5px}.badge{font-size:11px;background:#f0f4ed;color:var(--green);border-radius:6px;padding:5px 8px}.badge.draft{background:#fff4d9;color:#946c20}.star{border:0;background:transparent;padding:3px 5px;color:#b1b9ad;font-size:21px}.star.on{color:#e6aa26}.card-actions{border-top:1px solid #f0f2ed;padding:10px 14px;display:flex;gap:5px;flex-wrap:wrap}.card-actions button{font-size:12px;padding:7px 9px;border:0}.card-actions button:first-child{color:var(--green);font-weight:600}.stats{display:flex;gap:10px;flex-wrap:wrap;font-size:12px;color:#586a5b;margin-top:13px}.empty{text-align:center;background:#fff;border:1px dashed #cfdbca;border-radius:18px;padding:48px 20px;grid-column:1/-1}.empty .emoji{font-size:36px;margin-bottom:18px}.empty h2{font-size:20px}.empty p{color:var(--muted);font-size:14px}.back{border:0;background:transparent;padding:0;margin-bottom:25px;color:var(--muted);font-size:13px}.panel{background:white;border:1px solid var(--border);border-radius:17px;padding:26px;margin-bottom:20px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.field{margin-bottom:18px}.full{grid-column:1/-1}.editor-title{font-size:26px;font-weight:600;padding:14px}.toolbar{display:flex;gap:5px;flex-wrap:wrap;padding:10px;background:#f6f8f4;border:1px solid var(--border);border-bottom:0;border-radius:10px 10px 0 0;position:sticky;top:0;z-index:2}.toolbar button{padding:6px 9px;min-width:32px;border-color:transparent;font-size:14px}.toolbar select{width:auto;font-size:12px;padding:5px}.toolbar input[type=color]{width:32px;height:30px;padding:3px}.toolbar label{display:flex;align-items:center;margin:0;gap:3px;font-size:12px}.rich{min-height:300px;border:1px solid var(--border);border-radius:0 0 10px 10px;padding:22px;outline:none;line-height:1.75;overflow-wrap:anywhere;background:white}.rich:empty:before{content:attr(data-placeholder);color:#a1aca0;pointer-events:none}.rich h1{font-size:30px}.rich h2{font-size:24px}.rich h3{font-size:19px}.rich blockquote,.prose blockquote{border-left:3px solid #93b48a;margin-left:0;padding-left:18px;color:#69806b}.rich p{margin-bottom:12px}.editor-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:20px;position:sticky;bottom:0;background:#f6f8f5eF;padding:14px 0}.photo-preview{max-width:100%;max-height:270px;border-radius:12px;display:block;margin-bottom:12px}.prose{line-height:1.8;overflow-wrap:anywhere}.prose h1{font-size:30px}.prose a{overflow-wrap:anywhere}.prose img{max-width:100%}.detail{max-width:850px;margin:auto}.detail-photo{width:100%;max-height:450px;object-fit:cover;border-radius:16px;margin-bottom:24px}.detail-stats{display:flex;flex-wrap:wrap;gap:15px;padding:20px;background:#f1f5ed;border-radius:12px;margin-bottom:26px}.detail-stats div{min-width:90px}.detail-stats strong{display:block;font-size:22px;margin-bottom:5px}.detail-stats span{color:var(--muted);font-size:12px}.date{font-size:12px;color:var(--muted);margin-top:26px}.drag{cursor:grab;touch-action:none}.dragging{opacity:.4}.card.over{outline:2px solid var(--green)}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(ellipse at top,#e5efdf,transparent 70%)}.login{max-width:420px;width:100%;background:white;border:1px solid var(--border);border-radius:24px;padding:38px;box-shadow:0 16px 70px #2b4e2810}.login .brand{margin-bottom:30px}.login h1{font-size:27px}.login button{width:100%}.login p{font-size:14px;color:var(--muted)}.error{color:#a73838;font-size:13px;line-height:1.6}.settings-row{display:flex;align-items:center;justify-content:space-between;padding:13px 0;border-bottom:1px solid var(--border);gap:10px}.settings-row:last-child{border:0}.settings-row .actions{display:flex;gap:8px}.settings-row button{font-size:12px}.help{font-size:13px;color:var(--muted);line-height:1.7}.notice{background:#edf4e9;color:#427246;border-radius:12px;padding:15px;font-size:13px;margin-bottom:20px}.notice.warning{background:#fff4df;color:#8d681e}dialog{border:1px solid var(--border);border-radius:20px;padding:28px;max-width:480px;width:calc(100% - 32px);color:inherit}dialog::backdrop{background:#18302055;backdrop-filter:blur(3px)}dialog h2{margin-bottom:16px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#243e2d;color:white;padding:13px 22px;border-radius:12px;box-shadow:0 5px 20px #0002;z-index:100;display:none;max-width:90%;font-size:14px}.mobile-brand{display:none}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.spacer{flex:1}button:focus-visible,a:focus-visible{outline:3px solid #8db986;outline-offset:2px}.sync{font-size:11px;color:#89917f;margin-top:10px}.sync.error{color:#b35035}
@media(min-width:1400px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}.category p{max-width:100%}.category{min-height:220px}}
@media(max-width:1100px){.content{padding:25px 28px}.sidebar{width:215px}.content{margin-left:215px;width:calc(100% - 215px)}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.user .small{display:none}}
@media(max-width:750px){.sidebar{position:fixed;top:auto;bottom:0;width:100%;height:68px;padding:5px 8px;z-index:10;border:0;border-top:1px solid var(--border)}.sidebar .brand,.sidebar .subtitle,.side-bottom,.nav .category-nav{display:none}.nav{flex-direction:row;justify-content:space-around;height:100%}.nav button{flex-direction:column;gap:3px;font-size:10px;padding:7px 10px;border-radius:9px;min-width:65px}.nav .nav-icon{font-size:20px;width:auto}.content{margin:0;width:100%;padding:20px 18px 95px}.topbar{flex-wrap:wrap;margin-bottom:28px;gap:12px}.mobile-brand{display:flex;font-weight:750;font-size:21px;gap:8px;align-items:center}.search{order:3;max-width:none;flex-basis:100%}.topbar .primary{margin-left:auto;font-size:12px;padding:10px}.user{display:none}h1{font-size:28px}.page-head{align-items:flex-start;margin-bottom:24px}.page-head p{font-size:13px}.page-head>button{font-size:12px;white-space:nowrap;padding:10px}.grid{gap:12px}.category{padding:19px;min-height:180px}.category h2{font-size:17px}.category p{font-size:12px;max-width:100%}.category-icon{width:46px;height:46px;font-size:25px;padding:7px;margin-bottom:16px}.category .arrow{display:none}.cards{grid-template-columns:1fr}.panel{padding:18px}.form-grid{gap:12px}.toolbar{top:0;padding:7px;gap:3px}.rich{padding:15px;min-height:300px}.editor-title{font-size:21px}.editor-footer{bottom:65px}.detail-stats{gap:18px;padding:16px}.detail-stats div{min-width:65px}.settings-row{align-items:flex-start}.settings-row .actions{flex-wrap:wrap;justify-content:flex-end}.login{padding:28px}.section-title{margin-top:28px}}
:root{--profile-avatar-size:40px}.brand{text-decoration:none;color:inherit}.mobile-brand{text-decoration:none;color:inherit}.user{display:flex;align-items:center;gap:9px}.user .avatar{width:40px;height:40px;border-radius:50%;padding:0;display:grid;place-items:center;background:#e8f1e6;color:var(--green);font-weight:700;overflow:hidden}.avatar img{width:100%;height:100%;object-fit:cover}.profile-preview img{width:72px;height:72px;border-radius:50%;object-fit:cover;margin-top:10px}
:root{--summary-line-height:1.5}.summary-rich{max-height:calc(1.5em * 4);overflow:hidden;line-height:1.5;overflow-wrap:anywhere}.summary-rich p,.summary-rich div,.summary-rich blockquote{margin:0 0 4px;line-height:inherit}.summary-rich h1,.summary-rich h2,.summary-rich h3{font-size:1em;letter-spacing:0;line-height:inherit;margin:0 0 4px}.summary-rich ul,.summary-rich ol{margin:2px 0;padding-left:20px}.summary-rich blockquote{border-left:2px solid var(--border);padding-left:8px;color:var(--muted)}
:root[data-theme="dark"]{color-scheme:dark;color:#e4ebe5;background:#111813;--green:#8bcea0;--muted:#a0afa3;--border:#354339}
:root[data-theme="dark"] body{background:#111813;color:#e4ebe5}
:root[data-theme="dark"] .sidebar,:root[data-theme="dark"] .panel,:root[data-theme="dark"] .card,:root[data-theme="dark"] .login,:root[data-theme="dark"] .rich,:root[data-theme="dark"] .toolbar,:root[data-theme="dark"] dialog{background:#1a241d;color:#e4ebe5}
:root[data-theme="dark"] .content{background:#111813}
:root[data-theme="dark"] button:not(.primary):not(.danger):not(.star){background:#202c23;color:#e4ebe5;border-color:#39483d}
:root[data-theme="dark"] button:hover:not(.primary):not(.danger):not(.star){background:#2a392e}
:root[data-theme="dark"] .nav button,:root[data-theme="dark"] .back,:root[data-theme="dark"] .card-actions button,:root[data-theme="dark"] .toolbar button{background:transparent;border-color:transparent}
:root[data-theme="dark"] .nav button.active{background:#283b2d;color:#a1d9ae}
:root[data-theme="dark"] input,:root[data-theme="dark"] select,:root[data-theme="dark"] textarea,:root[data-theme="dark"] .editor-title{background:#141c17;color:#e4ebe5;border-color:#3b4a3f}
:root[data-theme="dark"] .search input{background:#1a241d}
:root[data-theme="dark"] .category-icon,:root[data-theme="dark"] .brand span,:root[data-theme="dark"] .user .avatar{background:#29392e;color:#a1d9ae}
:root[data-theme="dark"] .side-note,:root[data-theme="dark"] .detail-stats{background:#202c23;color:#e4ebe5}
:root[data-theme="dark"] .badge{background:#29392e;color:#a1d9ae}
:root[data-theme="dark"] .badge.draft{background:#45391f;color:#f0d28a}
:root[data-theme="dark"] .empty,:root[data-theme="dark"] .notice{background:#202c23;color:#dce8dd;border-color:#39483d}
:root[data-theme="dark"] .notice.warning{background:#40351f;color:#f0d28a}
:root[data-theme="dark"] .card-actions,:root[data-theme="dark"] .settings-row,:root[data-theme="dark"] .editor-footer{border-color:#354339}
:root[data-theme="dark"] .editor-footer{background:#111813f2!important;color:#e4ebe5;backdrop-filter:blur(12px)}
:root[data-theme="dark"] .toolbar{border-color:#354339}
:root[data-theme="dark"] .sync.error,:root[data-theme="dark"] .danger{color:#ff9b91}
:root[data-theme="dark"] .login-wrap{background:radial-gradient(ellipse at top,#253a2a,transparent 70%)}
:root[data-theme="dark"] #toast{background:#d9e9dc;color:#18251c}
:root[data-theme="dark"] dialog::backdrop{background:#0009}
.theme-toggle{width:40px;height:40px;display:grid;place-items:center;padding:0!important;font-size:18px;border-radius:50%!important}
@media(max-width:750px){.user{display:flex;gap:6px}.user .small{display:none}.theme-toggle{width:38px;height:38px;min-width:38px}}
.card,.category{transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;cursor:pointer}
.card:hover,.category:hover{transform:translateY(-2px);border-color:#9bb79d;box-shadow:0 8px 22px #24452d16}
.card:focus-visible,.category:focus-visible{outline:3px solid #83ad88;outline-offset:3px}
:root[data-theme="dark"] .card:hover,:root[data-theme="dark"] .category:hover{border-color:#71947a;box-shadow:0 8px 24px #0005}
