:root { --bg:#f5f6f8; --card:#fff; --ink:#1d2330; --muted:#667085; --line:#d9dde4; --accent:#1565C0; --danger:#C62828; }
* { box-sizing: border-box; }
body { margin:0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:var(--ink); }
.top { display:flex; justify-content:space-between; align-items:center; padding:12px 20px; background:#0f1b2d; color:#fff; flex-wrap:wrap; gap:8px; }
.brand { font-weight:700; } .brand .sub { font-weight:400; opacity:.7; }
main { max-width:980px; margin:0 auto; padding:16px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:16px; margin:12px 0; }
.narrow { max-width:380px; margin:60px auto; }
label { display:block; margin:10px 0; font-size:14px; color:var(--muted); }
input, select, textarea { width:100%; padding:9px 10px; border:1px solid var(--line); border-radius:8px; font:inherit; color:var(--ink); background:#fff; margin-top:4px; }
input[type=color] { width:52px; padding:2px; height:40px; }
textarea { resize:vertical; }
button { font:inherit; padding:8px 14px; border-radius:8px; border:1px solid var(--line); background:#fff; cursor:pointer; }
button.primary { background:var(--accent); color:#fff; border-color:var(--accent); }
button.danger { color:var(--danger); border-color:var(--danger); }
button.ghost { background:transparent; }
.top button.ghost { color:#fff; border-color:rgba(255,255,255,.4); }
button.small { padding:4px 8px; font-size:13px; }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:8px; }
.row input { flex:1 1 180px; margin-top:0; }
.toolbar { display:flex; gap:8px; flex-wrap:wrap; margin:12px 0; }
.toolbar select, .toolbar input { flex:1 1 200px; width:auto; margin-top:0; }
.tabs { display:flex; gap:6px; flex-wrap:wrap; border-bottom:1px solid var(--line); margin-top:12px; }
.tabs button { border:none; border-bottom:3px solid transparent; border-radius:0; background:transparent; }
.tabs button.active { border-bottom-color:var(--accent); font-weight:600; }
.publishbar { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; background:#fff; border:1px solid var(--line); border-radius:10px; padding:10px 14px; }
.publishbar.dirty { border-color:#F9A825; background:#FFF8E1; }
.hidden { display:none !important; }
.error { color:var(--danger); min-height:1em; font-size:14px; }
.muted { color:var(--muted); font-size:14px; }
.group h3 { display:flex; align-items:center; gap:8px; margin:18px 0 6px; }
.swatch { width:14px; height:14px; border-radius:4px; display:inline-block; border:1px solid rgba(0,0,0,.15); }
.note { background:#fff; border:1px solid var(--line); border-left-width:6px; border-radius:8px; padding:10px 12px; margin:6px 0; display:flex; gap:10px; justify-content:space-between; flex-wrap:wrap; }
.note .text { flex:1 1 300px; min-width:0; }
.note .title { font-weight:600; }
.note .body { white-space:pre-wrap; color:#344054; font-size:14px; margin-top:4px; overflow-wrap:anywhere; }
.note .actions, .cat .actions { display:flex; gap:4px; flex-wrap:wrap; align-items:flex-start; }
.cat { display:flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--line); border-radius:8px; padding:8px 12px; margin:6px 0; flex-wrap:wrap; }
.cat input[type=text] { flex:1 1 160px; width:auto; margin-top:0; }
table.grid { width:100%; border-collapse:collapse; background:#fff; font-size:14px; }
table.grid th, table.grid td { border-bottom:1px solid var(--line); padding:6px 8px; text-align:left; }
pre { background:#0f1b2d; color:#fff; padding:10px; border-radius:8px; white-space:pre-wrap; overflow-wrap:anywhere; }
.kb { background:#d1d4db; border-radius:10px; padding:8px; max-width:420px; }
.kb .ktabs { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px; }
.kb .ktab { padding:5px 10px; border-radius:14px; font-size:13px; font-weight:600; }
.kb .kgrid { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.kb .kkey { background:#fff; border-radius:6px; padding:8px; font-size:13px; border-left:5px solid; min-height:40px; }
.kb .kbottom { display:flex; gap:6px; margin-top:8px; }
.kb .kbottom div { background:#aeb3be; border-radius:6px; padding:8px; font-size:12px; text-align:center; flex:1; }
.kb .kbottom .space { flex:3; background:#fff; }
.toast { position:fixed; bottom:20px; left:50%; transform:translateX(-50%); background:#0f1b2d; color:#fff; padding:10px 16px; border-radius:8px; max-width:90vw; }
