/* Notlar */
.md { line-height: 1.55; font-size: 14px; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 8px; }
.md h3, .md h4, .md h5 { margin: 12px 0 6px; line-height: 1.3; } .md h3 { font-size: 17px; } .md h4 { font-size: 15px; } .md h5 { font-size: 14px; }
.md ul, .md ol { margin: 0 0 8px; padding-left: 22px; }
.md li.task { list-style: none; margin-left: -20px; display: flex; gap: 7px; align-items: flex-start; }
.md li.task input { margin-top: 4px; accent-color: var(--accent); cursor: pointer; }
.md li.task.done span { color: var(--muted); text-decoration: line-through; }
.md blockquote { margin: 0 0 8px; padding: 2px 10px; border-left: 3px solid var(--accent); color: var(--muted); }
.md code { background: var(--panel-3); padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.md pre { background: var(--panel-3); padding: 8px 10px; border-radius: 8px; overflow-x: auto; margin: 0 0 8px; }
.md pre code { background: none; padding: 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.nt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; align-items: start; }
.nt-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; min-width: 0; }
.nt-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.nt-card h3 { margin: 0 0 6px; font-size: 15px; display: flex; gap: 6px; }
.nt-card .md { max-height: 220px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 170px, transparent); mask-image: linear-gradient(#000 170px, transparent); font-size: 13px; }
.nt-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.nt-inbox { display: grid; gap: 8px; }
.nt-in { display: grid; grid-template-columns: 1fr auto; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.nt-in .nt-acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; }
.nt-quick { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 12px; align-items: end; }
.nt-quick textarea, .nt-edit textarea, .capture-box textarea, .nt-day textarea { padding: 10px 12px; font: inherit; color: var(--text); resize: vertical; line-height: 1.5; }
.nt-edit { display: grid; gap: 10px; }
.nt-edit input { padding-left: 12px; font: inherit; color: var(--text); }
.nt-edit textarea { min-height: 300px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13.5px; }
.nt-edit .frow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nt-preview { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 120px; }
.nt-day { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.nt-day h2 { margin: 0 0 10px; font-size: 15px; display: flex; gap: 8px; align-items: baseline; }
.nt-day textarea { width: 100%; min-height: 150px; }
/* Journal */
.jr { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 14px; align-items: start; }
.jr-main { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 12px; min-width: 0; }
.jr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jr-date { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.jr-date b { font-size: 17px; }
.jr-mood { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.jr-mood-btn { display: inline-flex; align-items: center; gap: 5px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 11px 4px 8px; cursor: pointer; font-size: 18px; color: var(--muted); }
.jr-mood-btn span { font-size: 12px; }
.jr-mood-btn:hover { border-color: var(--accent); }
.jr-mood-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, var(--panel)); border-color: var(--accent); color: var(--text); }
.jr-tools { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; padding: 6px; background: var(--panel-2); border-radius: 10px; }
.jr-tool { background: none; border: 1px solid transparent; border-radius: 7px; min-width: 32px; height: 32px; padding: 0 8px; cursor: pointer; color: var(--text); font-size: 13px; white-space: nowrap; }
.jr-tool:hover { background: var(--panel-3); }
.jr-tool[aria-pressed="true"] { background: var(--panel-3); border-color: var(--accent); }
.jr-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.jr-select { height: 32px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 0 8px; font: inherit; font-size: 13px; cursor: pointer; }
.jr-edit { display: grid; gap: 12px; }
.jr-edit textarea { width: 100%; min-height: 380px; padding: 14px 16px; resize: vertical; font: inherit; font-size: 15px; line-height: 1.7; color: var(--text); }
.jr-prev { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; min-height: 380px; overflow-wrap: anywhere; font-size: 15px; }
.jr-edit.write .jr-prev { display: none; }
.jr-edit.preview textarea { display: none; }
.jr-edit.split { grid-template-columns: 1fr 1fr; }
.jr-foot { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.jr-side { display: grid; gap: 14px; }
.jr-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.jr-dow { font-size: 10px; color: var(--muted); padding-bottom: 2px; }
.jr-cell { aspect-ratio: 1; border-radius: 8px; border: 1px solid transparent; background: var(--panel-2); color: var(--muted); font-size: 12px; cursor: pointer; padding: 0; }
.jr-cell:disabled { opacity: .35; cursor: default; }
.jr-cell.has { background: color-mix(in srgb, var(--mood) 30%, var(--panel)); color: var(--text); font-weight: 700; }
.jr-cell.today { border-color: var(--muted); }
.jr-cell.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.jr-past { display: grid; gap: 2px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 8px 2px; cursor: pointer; color: var(--text); }
.jr-past:first-of-type { border-top: 0; }
.jr-past span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-past:hover b { color: var(--accent); }
/* Focus mode: only the page, full screen. */
body.jr-focus-mode .jr-main { position: fixed; inset: 0; z-index: 30; border-radius: 0; border: 0; overflow-y: auto; padding: 24px max(20px, calc(50vw - 420px)); background: var(--bg); }
body.jr-focus-mode .jr-edit textarea, body.jr-focus-mode .jr-prev { min-height: calc(100vh - 260px); font-size: 17px; }
@media (max-width: 900px) {
  .jr { grid-template-columns: minmax(0, 1fr); }
  .jr-edit.split { grid-template-columns: 1fr; }
  .jr-mood-btn span { display: none; }
}

#capture .capture-box { position: fixed; z-index: 21; top: 14vh; left: 50%; transform: translateX(-50%); width: min(600px, calc(100% - 32px));
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 10px; }
#capture textarea { min-height: 110px; }
.capture-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.capture-foot button { flex: none; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--panel-3); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 14px; font-size: 13px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
