:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #29251d; background: #f6f6f3; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.connection-view { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #fff6ca, #f6f6f3 54%); }
.connection-card { width: min(100%, 410px); text-align: center; }
.app-mark { width: 68px; height: 68px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 18px; background: #f7c948; color: #443600; font-weight: 800; font-size: 30px; box-shadow: inset 0 -4px #e5af27; }
h1 { margin: 0; font-size: 30px; letter-spacing: -.6px; }
.connection-card > p { color: #716b5d; line-height: 1.5; }
form { text-align: left; }
label { display: grid; gap: 7px; font-size: 14px; font-weight: 650; margin: 18px 0; }
input, textarea { width: 100%; border: 1px solid #d8d5ca; border-radius: 10px; padding: 12px; background: #fff; color: inherit; outline: none; }
input:focus, textarea:focus { border-color: #c99c1d; box-shadow: 0 0 0 3px #f7c94855; }
form > button { width: 100%; border: 0; border-radius: 10px; padding: 13px; background: #332e22; color: #fff; font-weight: 700; }
.help, .install-hint { font-size: 13px; color: #716b5d; line-height: 1.5; }
.error { min-height: 1.2em; color: #b42318; font-size: 14px; }
.notes-view { min-height: 100dvh; display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.sidebar { background: #eeece5; display: flex; flex-direction: column; border-right: 1px solid #ddd9ce; min-height: 100dvh; }
.sidebar header, .editor-header { display: flex; align-items: center; justify-content: space-between; padding: max(20px, env(safe-area-inset-top)) 18px 14px; }
.sidebar h1 { font-size: 27px; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f7c948; font-size: 27px; line-height: 1; }
.search-label { margin: 0 14px 12px; }
.search-label span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.search-label input { padding: 9px 11px; background: #fffdf9; }
.note-list { overflow: auto; flex: 1; padding: 0 8px; }
.note-row { width: 100%; text-align: left; border: 0; border-radius: 9px; background: transparent; padding: 11px 10px; margin-bottom: 2px; }
.note-row:hover, .note-row.active { background: #fff; }
.note-row strong, .note-row span, .note-row small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-row strong { font-size: 15px; margin-bottom: 3px; }
.note-row span { color: #777165; font-size: 13px; }
.note-row small { margin-top: 4px; color: #9a7a1d; font-size: 11px; font-weight: 700; }
.sidebar footer { padding: 12px 18px max(16px, env(safe-area-inset-bottom)); }
.text-button { border: 0; padding: 6px; background: none; color: #716b5d; }
.danger { color: #b42318; }
.editor { display: flex; flex-direction: column; min-width: 0; }
.editor-header { min-height: 71px; padding-bottom: 14px; color: #777165; font-size: 13px; }
.back-button { display: none; color: #5f4a0c; font-weight: 700; }
#editor-form { display: flex; flex: 1; flex-direction: column; padding: 0 clamp(22px, 5vw, 72px) 24px; }
#note-title { border: 0; border-radius: 0; box-shadow: none; padding: 13px 0 10px; background: transparent; font-size: clamp(27px, 4vw, 38px); font-weight: 750; letter-spacing: -.8px; }
#note-content { flex: 1; resize: none; border: 0; border-radius: 0; box-shadow: none; padding: 10px 0; background: transparent; line-height: 1.65; font-size: 16px; }
#markdown-preview { flex: 1; overflow: auto; padding: 10px 0; line-height: 1.65; }
#markdown-preview > :first-child { margin-top: 0; }
#markdown-preview > :last-child { margin-bottom: 0; }
#markdown-preview pre { overflow: auto; padding: 14px; border-radius: 10px; background: #ebe8df; }
#markdown-preview code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
#markdown-preview blockquote { margin-left: 0; padding-left: 16px; border-left: 3px solid #f0bd35; color: #716b5d; }
#markdown-preview img { max-width: 100%; }
.save-status { height: 26px; margin: 0; text-align: center; color: #777165; font-size: 13px; }
.empty-state { display: grid; place-content: center; flex: 1; color: #8a8476; text-align: center; }
.empty-state div { color: #f0bd35; font-size: 40px; }
.empty-state p { line-height: 1.6; }
@media (max-width: 700px) {
  .notes-view { display: block; }
  .sidebar { min-height: auto; height: 100dvh; border: 0; }
  .editor { min-height: 100dvh; }
  body.editing .sidebar { display: none; }
  body:not(.editing) .editor { display: none; }
  .back-button { display: inline-block; }
  .editor-header #connection-label { display: none; }
  .editor-header { padding-top: max(18px, env(safe-area-inset-top)); }
}
