:root {
  color-scheme: light;
  font-family: Georgia, 'Times New Roman', serif;
  color: #292c27;
  background: #f5f1e8;
  font-synthesis: none;
}

* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body { margin: 0; min-width: 320px; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, textarea:focus-visible { outline: 2px solid #a65339; outline-offset: 3px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.eyebrow, .sidebar-intro, .button, .list-heading, .note-card-date, .note-card-preview, .sidebar-footer, .editor-context, .delete-button, .paper-meta, .editor-bottom, .mobile-toolbar, .install-dialog p { font-family: Arial, Helvetica, sans-serif; }
.eyebrow { margin: 0; color: #a65339; font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }

.app-shell { display: grid; grid-template-columns: 370px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { display: flex; flex-direction: column; min-width: 0; background: #e9e6dc; border-right: 1px solid #d8d4c9; }
.sidebar-header { padding: 42px 30px 34px; }
.brand { display: flex; gap: 14px; align-items: center; }
.brand-mark { position: relative; display: grid; place-items: center; width: 47px; height: 47px; flex: none; border: 1px solid #323a2e; border-radius: 14px; background: #323a2e; box-shadow: 4px 4px 0 #c6c3b6; transform: rotate(-5deg); }
.brand-mark::before { content: ''; width: 20px; height: 26px; border-radius: 3px; background: #f8f4ea; transform: rotate(5deg); }
.brand-mark::after { content: ''; position: absolute; width: 11px; height: 2px; top: 19px; left: 18px; background: #b4583d; box-shadow: 0 5px 0 #b4583d; transform: rotate(5deg); }
.brand h1 { margin: 5px 0 0; font-size: 27px; line-height: 1; letter-spacing: -.06em; white-space: nowrap; }
.brand-period { color: #a65339; }
.sidebar-intro { margin: 32px 0 25px; max-width: 260px; color: #74766d; font-size: 14px; line-height: 1.6; }
.sidebar-actions { display: flex; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 44px; border: 0; border-radius: 7px; padding: 0 18px; font-size: 12px; font-weight: 700; letter-spacing: .03em; transition: transform .18s, background .18s, box-shadow .18s; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button-primary { color: #fffdf7; background: #a65339; box-shadow: 0 4px 0 #81432f; }
.button-primary:hover { background: #92472f; }
.button-primary span { font-size: 18px; font-weight: 400; line-height: 1; }

.list-heading { display: flex; justify-content: space-between; align-items: baseline; padding: 0 30px 12px; border-bottom: 1px solid #d8d4c9; }
.list-heading h2 { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.list-heading span { color: #aaa99e; font-size: 12px; }
.notes-list { flex: 1; min-height: 120px; overflow-y: auto; padding: 13px 12px; }
.list-empty { padding: 24px 18px; margin: 0; color: #8c8d82; font: 13px/1.5 Arial, Helvetica, sans-serif; }
.note-card { display: grid; gap: 8px; width: 100%; min-height: 117px; margin: 0 0 5px; padding: 19px 18px; text-align: left; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 7px; transition: background .18s, border-color .18s, transform .18s; }
.note-card:hover { background: #f3f0e8; transform: translateX(2px); }
.note-card.is-selected { background: #f8f6ef; border-color: #ded9cd; box-shadow: 0 4px 14px #49412f0b; }
.note-card-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; font-weight: 700; letter-spacing: -.025em; }
.note-card-preview { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #77796f; font-size: 12px; }
.note-card-date { color: #a3a398; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-footer { display: flex; align-items: center; flex-wrap: wrap; column-gap: 14px; row-gap: 12px; min-height: 72px; padding: 18px 30px; border-top: 1px solid #d8d4c9; color: #77796f; font-size: 11px; }
.connection { display: inline-flex; align-items: center; gap: 7px; margin-right: auto; white-space: nowrap; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: #73916e; box-shadow: 0 0 0 3px #73916e26; }
.connection[data-online='false'] .connection-dot { background: #a65339; box-shadow: 0 0 0 3px #a6533926; }
.text-button { border: 0; padding: 0; color: #6c6d62; background: none; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: #a65339; }

.workspace { min-width: 0; display: flex; flex-direction: column; background-color: #f5f1e8; background-image: radial-gradient(#baaf9b28 .7px, transparent .7px); background-size: 7px 7px; }
.editor-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; min-height: 500px; padding: 32px; text-align: center; }
.empty-illustration { display: grid; place-items: center; width: 100px; height: 116px; margin-bottom: 34px; border: 1px solid #d7d1c3; border-radius: 5px 13px 13px 5px; color: #ab5a3e; background: #fbf9f3; box-shadow: 9px 8px 0 #e5dece, 13px 12px 0 #d1c8b6; transform: rotate(-7deg); }
.empty-illustration span { font-size: 37px; transform: rotate(7deg); }
.editor-empty h2 { margin: 11px 0 12px; font-size: clamp(30px, 3.5vw, 49px); font-weight: 400; letter-spacing: -.06em; }
.editor-empty > p:not(.eyebrow) { max-width: 330px; margin: 0 0 29px; color: #797a71; font: 14px/1.7 Arial, Helvetica, sans-serif; }
.editor { display: flex; flex-direction: column; width: min(100%, 980px); flex: 1; margin: 0 auto; padding: 39px clamp(32px, 7vw, 100px) 23px; }
.editor-topbar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.editor-context { color: #aaa598; font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.editor-context span { color: #8c8d81; }
.delete-button { border: 0; padding: 8px 0; color: #a65339; background: transparent; font-size: 11px; font-weight: 700; }
.delete-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.editor-paper { display: flex; flex-direction: column; flex: 1; min-height: 420px; margin-top: 42px; }
.paper-meta { display: flex; align-items: center; gap: 15px; color: #9c9b90; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.paper-rule { width: 28px; height: 1px; background: #af573c; }
#note-content { display: block; width: 100%; flex: 1; min-height: 350px; margin-top: 22px; padding: 0 0 30px; resize: none; border: 0; outline: none; color: #2e322c; background: transparent; font-size: clamp(25px, 3vw, 36px); line-height: 1.54; letter-spacing: -.025em; }
#note-content::placeholder { color: #b9b6aa; }
.editor-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 16px; border-top: 1px solid #dcd7cb; color: #a3a296; font-size: 10px; letter-spacing: .04em; }
.editor-bottom span:first-child { color: #688163; }
.mobile-toolbar { display: none; }

.install-dialog { width: min(420px, calc(100% - 32px)); border: 1px solid #d9d2c4; border-radius: 13px; padding: 31px; color: #2d322b; background: #f8f5ed; box-shadow: 0 22px 70px #14171140; }
.install-dialog::backdrop { background: #171e1abb; backdrop-filter: blur(3px); }
.install-dialog form:first-child { display: flex; justify-content: flex-end; }
.dialog-close { border: 0; background: none; color: #77796f; font-size: 26px; line-height: 1; }
.dialog-mark { color: #a65339; font-size: 30px; }
.install-dialog h2 { margin: 11px 0 14px; font-size: 30px; font-weight: 400; letter-spacing: -.05em; }
.install-dialog p { color: #696e63; font-size: 13px; line-height: 1.65; }
.install-dialog .dialog-small { margin: 20px 0 25px; padding-top: 17px; border-top: 1px solid #dcd7cb; color: #898b80; font-size: 11px; }

@media (max-width: 760px) {
  .app-shell { display: block; min-height: 100dvh; }
  .sidebar { min-height: 100dvh; border-right: 0; }
  .app-shell[data-view='editor'] .sidebar { display: none; }
  .app-shell[data-view='list'] .workspace { display: none; }
  .sidebar-header { padding: 35px 24px 29px; }
  .sidebar-intro { margin: 28px 0 22px; }
  .list-heading { padding: 0 24px 12px; }
  .notes-list { padding: 13px 9px; }
  .sidebar-footer { padding: 18px 24px; }
  .workspace { min-height: 100dvh; }
  .mobile-toolbar { display: flex; align-items: center; justify-content: space-between; height: 65px; padding: 0 24px; border-bottom: 1px solid #ddd7ca; }
  .back-button { border: 0; padding: 6px 0; color: #a65339; background: transparent; font: 700 12px Arial, Helvetica, sans-serif; }
  .back-button span { margin-left: 6px; }
  .mobile-title { font-size: 14px; font-weight: 700; letter-spacing: -.04em; }
  .editor-empty { min-height: calc(100dvh - 65px); }
  .editor { min-height: calc(100dvh - 65px); padding: 18px 25px 25px; }
  .editor-paper { min-height: 400px; margin-top: 38px; }
  #note-content { min-height: 310px; font-size: 27px; }
  .editor-bottom span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
