:root{
  --bg:#161310; --panel:#1e1a15; --line:rgba(220,200,170,.14); --ink:#efe7d8; --muted:#a08e72;
  --rust:#c46a3f; --rust-ink:#fff;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}

.topbar{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--bg);z-index:5}
.topbar .logo{width:26px;height:26px;border-radius:7px}
.topbar b{font-weight:600;font-size:15px}
.topbar .home{color:var(--muted);text-decoration:none;font-size:13px}
.topbar .home:hover{color:var(--ink)}
.ghost{background:transparent;border:1px solid var(--line);color:var(--ink);border-radius:999px;padding:6px 13px;font:inherit;font-size:13px;cursor:pointer}
.ghost:hover{border-color:var(--rust)}
.topbar .ghost{margin-left:auto}
.topbar .ghost + .ghost{margin-left:0}

.app{max-width:680px;margin:0 auto;padding:18px 16px 60px}

/* capture */
.capture{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:14px;box-shadow:0 10px 30px rgba(0,0,0,.35)}
.capture textarea{
  width:100%;resize:none;border:0;background:transparent;color:var(--ink);
  font:inherit;font-size:18px;line-height:1.5;outline:none;min-height:56px;
}
.capture textarea::placeholder{color:var(--muted);opacity:.75}
.capture-row{display:flex;align-items:center;gap:12px;margin-top:8px;padding-top:10px;border-top:1px solid var(--line)}
.todo{background:transparent;border:1px solid var(--line);color:var(--muted);border-radius:9px;padding:7px 11px;font:inherit;font-size:13px;cursor:pointer;white-space:nowrap}
.todo:hover{border-color:var(--rust);color:var(--ink)}
.hint{color:var(--muted);font-size:12.5px;flex:1;text-align:right}
.hint.flash{color:var(--rust)}
.save{background:var(--rust);color:var(--rust-ink);border:0;border-radius:10px;padding:9px 18px;font:inherit;font-weight:600;font-size:15px;cursor:pointer}
.save:active{transform:translateY(1px)}
.save:disabled{opacity:.6}

/* timeline */
.timeline{margin-top:22px;display:flex;flex-direction:column;gap:22px}
.day h3{font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:0 0 10px;font-weight:600}
.jot{display:flex;gap:14px;padding:2px 0 12px;border-bottom:1px solid var(--line)}
.jot:last-child{border-bottom:0}
.jot time{color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums;flex:0 0 42px;padding-top:2px}
.jot .body{flex:1;min-width:0;font-size:16px;line-height:1.55}
.jot .body>:first-child{margin-top:0}.jot .body>:last-child{margin-bottom:0}
.jot .body p{margin:.3em 0}
.jot .body h1,.jot .body h2,.jot .body h3{font-size:1.05em;margin:.3em 0;color:var(--ink)}
.jot .body ul,.jot .body ol{margin:.3em 0;padding-left:1.3em}
.jot .body code{font-family:ui-monospace,Menlo,monospace;font-size:.85em;background:rgba(128,128,128,.18);padding:.05em .3em;border-radius:5px}
.jot .body a{color:var(--rust)}
/* task-list items: show the checkbox only, not the list bullet */
.jot .body ul.contains-task-list{padding-left:0}
.jot .body li.task-list-item{list-style:none}
.jot .body li.task-list-item label{display:inline}
.jot .body input[type=checkbox]{margin-right:8px;vertical-align:baseline}
.empty{color:var(--muted);text-align:center;padding:40px 0;font-size:15px;line-height:1.6}

.foot{color:var(--muted);font-size:12.5px;text-align:center;line-height:1.6;margin-top:34px}
.foot a{color:var(--muted)}

/* sync sheet */
.sheet-bg{position:fixed;inset:0;background:rgba(0,0,0,.5);display:grid;place-items:end center;z-index:20}
@media(min-width:560px){.sheet-bg{place-items:center}}
.sheet{background:var(--panel);border:1px solid var(--line);border-radius:18px 18px 0 0;width:100%;max-width:460px;padding:22px;box-shadow:0 -20px 50px rgba(0,0,0,.5)}
@media(min-width:560px){.sheet{border-radius:18px}}
.sheet h2{margin:0 0 8px;font-size:19px}
.sheet-note{color:var(--muted);font-size:13.5px;line-height:1.55;margin:0 0 16px}
.sheet input#code{width:100%;padding:12px 14px;border-radius:11px;border:1px solid var(--line);background:#181510;color:var(--ink);font:inherit;font-size:16px}
.sheet input#code:focus{outline:2px solid var(--rust);outline-offset:1px}
.code-row{display:flex;align-items:center;justify-content:space-between;margin:10px 2px 0}
.link{background:none;border:0;color:var(--rust);font:inherit;font-size:13.5px;cursor:pointer;padding:0}
.link:hover{text-decoration:underline}
.show{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:13px;cursor:pointer}
.autosync{display:flex;align-items:flex-start;gap:8px;color:var(--muted);font-size:13px;line-height:1.4;margin:14px 2px 0;cursor:pointer}
.autosync input{margin-top:2px}
.sheet-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}
.sheet-status{font-size:13.5px;color:var(--muted);min-height:1.3em;margin:12px 2px 0;text-align:center}
.sheet-status.ok{color:#7bb87b}.sheet-status.err{color:#e08a5a}
.export{width:100%;margin-top:16px;background:transparent;border:1px solid var(--line);color:var(--muted);border-radius:11px;padding:11px;font:inherit;font-size:14px;cursor:pointer}
.export:hover{border-color:var(--rust);color:var(--ink)}
[hidden]{display:none!important}
