:root { color-scheme: light; --paper: #faf9f6; --sidebar: #f1f0eb; --ink: #30322e; --muted: #90918a; --line: #e5e4dd; --accent: #b85736; --green: #7e9674; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button, input, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button:disabled { opacity: .5; cursor: default; }
[hidden] { display: none !important; }
svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.app { display: grid; grid-template-columns: 276px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { height: 100dvh; position: sticky; top: 0; background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 34px 19px 18px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 9px; font-size: 25px; font-weight: 650; letter-spacing: -1.1px; }
.brand-mark { color: var(--accent); }
.brand-mark svg { width: 26px; height: 26px; stroke-width: 1.7; }
.brand-dot { color: var(--accent); }
.edition { font-size: 10px; margin: 2px 0 0 auto; padding: 4px 6px; border: 1px solid #dcded4; border-radius: 4px; color: #82887b; letter-spacing: .2px; font-weight: 400; }
.sidebar-intro { font-size: 11px; color: #92948b; padding: 12px 9px 34px; }
.new-note { display: flex; align-items: center; gap: 10px; background: var(--ink); border: 1px solid var(--ink); border-radius: 7px; color: #fcfcfa; font-size: 12px; font-weight: 550; min-height: 43px; padding: 10px 13px; transition: background .15s, transform .15s; }
.new-note:hover { background: #464941; }
.new-note:active { transform: translateY(1px); }
.new-note svg { width: 17px; height: 17px; }
.new-hint { margin-left: auto; color: #b9bcb1; border: 1px solid #606258; width: 19px; text-align: center; height: 19px; border-radius: 3px; font-weight: 400; }
.list-heading { display: flex; justify-content: space-between; padding: 33px 11px 13px; font-size: 9px; letter-spacing: 1.35px; color: #919488; }
#note-count { letter-spacing: 0; }
.note-list { flex: 1; min-height: 0; overflow-y: auto; padding: 2px; margin: 0 -2px; scrollbar-width: thin; }
.note-card { text-align: left; display: block; position: relative; width: 100%; border: 1px solid transparent; border-radius: 6px; background: transparent; padding: 17px 13px 15px; margin-bottom: 6px; transition: background .15s; }
.note-card:hover { background: #e9e9e2; }
.note-card.active { background: #fffefa; border-color: #e4e2d8; box-shadow: 0 2px 3px #30322e03; }
.note-card.active::before { content: ''; position: absolute; top: 19px; bottom: 19px; left: -1px; width: 2px; background: var(--accent); border-radius: 2px; }
.note-card-title { display: block; font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.note-card-preview { display: block; font-size: 11px; line-height: 1.6; height: 18px; margin: 8px 0 13px; color: #92938b; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.note-card-date { font-size: 9px; color: #a0a196; }
.note-card.active .note-card-date { color: var(--accent); opacity: .8; }
.list-empty { font-size: 12px; padding: 15px 11px; color: var(--muted); }
.sidebar-bottom { padding: 16px 9px 0; }
.small-caption { color: #a0a297; font-family: Georgia, serif; font-style: italic; font-size: 11px; }
.sidebar-bottom-row { display: flex; align-items: center; gap: 6px; border-top: 1px solid #e0e1d8; margin-top: 18px; padding-top: 13px; }
.local-dot, .status-dot { width: 5px; height: 5px; background: var(--green); border-radius: 50%; flex: none; }
.local-dot.error { background: var(--accent); }
#local-status { font-size: 9px; color: #94968b; }
.menu-wrap { position: relative; margin-left: auto; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; width: 32px; height: 32px; border-radius: 5px; color: #999b92; }
.icon-button:hover { background: #e9e8e1; color: var(--ink); }
.icon-button svg { width: 17px; height: 17px; }
.menu { position: absolute; z-index: 5; bottom: 40px; left: -192px; background: #fffefa; padding: 6px; min-width: 253px; border: 1px solid var(--line); box-shadow: 0 8px 35px #36382b13; border-radius: 9px; }
.menu button { border: none; background: none; border-radius: 5px; padding: 12px 9px; width: 100%; display: flex; align-items: center; text-align: left; gap: 10px; font-size: 11px; }
.menu button:hover { background: var(--sidebar); }
.menu svg { width: 16px; height: 16px; color: #7d8375; }
.workspace { min-width: 0; min-height: 100dvh; display: flex; flex-direction: column; }
.workspace-header { min-height: 78px; padding: 0 39px; border-bottom: 1px solid #ecebe6; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.breadcrumb { display: flex; align-items: center; gap: 12px; font-size: 11px; min-width: 0; color: #93958c; }
.breadcrumb svg { width: 14px; height: 14px; color: #999b90; }
.breadcrumb-slash { color: #c5c6bd; padding: 0 2px; }
#breadcrumb-title { color: #74776d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.sync-status { display: flex; align-items: center; gap: 7px; color: #909789; font-size: 10px; flex-shrink: 0; }
.sync-status[data-state="offline"], .sync-status[data-state="error"] { color: #a48457; }
.sync-status[data-state="offline"] .status-dot, .sync-status[data-state="error"] .status-dot { background: #c1a16e; }
.sync-status[data-state="syncing"] .status-dot { animation: blink 1.5s infinite; }
.back-button { display: none; background: transparent; border: 0; padding: 10px 0; gap: 7px; align-items: center; font-size: 12px; }
.editor-layout { padding: 0 50px; display: flex; flex: 1; }
.editor { max-width: 720px; width: 100%; margin: 0 auto; padding-top: 64px; display: flex; flex-direction: column; }
.editor-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
#note-date { color: #95998b; letter-spacing: 1.6px; font-size: 9px; text-transform: uppercase; }
.delete-button { opacity: .65; }
.delete-button:hover { color: var(--accent); opacity: 1; background: #f1e9e1; }
.note-title { display: block; width: 100%; background: transparent; border: 0; padding: 0; color: #33392e; font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 3.2vw, 45px); letter-spacing: -1.6px; line-height: 1.35; font-weight: 400; }
.note-title::placeholder { color: #454b3e; opacity: 1; }
.note-title:focus { outline: 0; }
.editor-tools { display: flex; align-items: center; gap: 12px; padding: 28px 0 25px; border-bottom: 1px solid var(--line); }
.timestamp-button { display: flex; align-items: center; gap: 8px; border: 1px solid #e8d9cb; background: #f5ede4; color: #a86a41; padding: 8px 10px; border-radius: 5px; font-size: 10px; transition: background .15s; }
.timestamp-button:hover { background: #eee0d0; }
.timestamp-button svg { width: 14px; height: 14px; }
.live-time { padding-left: 9px; margin-left: 2px; border-left: 1px solid #e2d2c0; font-variant-numeric: tabular-nums; letter-spacing: .2px; font-size: 10px; }
.shortcut { color: #b8b9af; font-size: 9px; }
.writing-area { display: flex; flex: 1; min-height: 350px; padding-top: 27px; }
.note-body { display: block; border: 0; outline: none; resize: none; background: transparent; color: #474c40; width: 100%; min-height: 350px; padding: 0; font-size: 15px; line-height: 1.95; overflow-y: hidden; caret-color: var(--accent); }
.note-body::placeholder { color: #b4b7ab; }
.editor-footer { border-top: 1px solid var(--line); margin-top: 30px; padding: 19px 0 24px; display: flex; justify-content: space-between; gap: 15px; color: #a2a799; font-size: 9px; }
.footer-tip { display: flex; align-items: center; gap: 5px; }
.footer-tip svg { width: 12px; height: 12px; stroke-width: 1.4; }
.empty-state { margin: auto; padding: 60px 25px; text-align: center; }
.empty-icon { color: #b6bdaa; background: #f0f1e9; border-radius: 16px; padding: 15px; width: fit-content; margin: 0 auto 28px; transform: rotate(-7deg); }
.empty-icon svg { width: 31px; height: 31px; }
.empty-state h1 { font: 36px Georgia, serif; letter-spacing: -.9px; }
.empty-state p { color: var(--muted); font-size: 13px; line-height: 1.9; }
.empty-state .new-note { margin: 27px auto 0; }
.fatal-state { max-width: 500px; margin: auto; padding: 30px; }
.fatal-state h1 { font-size: 24px; }
.fatal-state p { line-height: 1.7; }
.toast { display: flex; align-items: center; gap: 18px; position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 10; background: #363d30; color: #f5f7ef; border-radius: 8px; padding: 13px 17px; box-shadow: 0 4px 24px #222b201c; font-size: 12px; max-width: calc(100vw - 32px); }
.toast button { background: transparent; border: 0; color: #efc69b; padding: 6px 0; font-size: 12px; }
.toast .toast-close { color: #b1b8a9; font-size: 18px; margin-left: auto; }
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); padding: 29px; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 25px 80px #28302025; }
dialog::backdrop { background: #22291d38; backdrop-filter: blur(3px); }
.dialog-top { display: flex; justify-content: space-between; align-items: center; }
.dialog-icon { color: var(--accent); background: #f3e7dc; padding: 10px; border-radius: 10px; }
dialog h2 { font: 31px Georgia, serif; margin: 23px 0 12px; letter-spacing: -.8px; }
dialog p { font-size: 13px; color: #868c7c; line-height: 1.7; }
dialog label { display: block; margin: 25px 0 10px; font-size: 9px; letter-spacing: 1px; color: #939b88; }
#private-link { width: 100%; border: 1px solid #dedfd5; border-radius: 6px; background: #f0f1e9; padding: 11px 10px; color: #7b846c; font-size: 11px; }
dialog .link-warning { font-size: 11px; margin: 13px 0 23px; }
dialog .new-note { width: 100%; justify-content: center; }
@keyframes blink { 50% { opacity: .3; } }
@media (min-width: 1450px) { .editor { max-width: 790px; padding-top: 85px; } }
@media (max-width: 1050px) { .app { grid-template-columns: 242px minmax(0, 1fr); } .sidebar { padding-left: 14px; padding-right: 14px; } .editor-layout { padding: 0 35px; } .workspace-header { padding: 0 28px; } .breadcrumb { gap: 8px; } #breadcrumb-title { max-width: 155px; } .brand { font-size: 23px; gap: 8px; } .edition { font-size: 8px; } }
@media (max-width: 700px) {
  .app { display: block; }
  .sidebar { width: 100%; padding: 25px 22px 15px; height: 100dvh; }
  .brand { font-size: 29px; padding: 0; }
  .edition { font-size: 10px; }
  .sidebar-intro { padding-left: 0; font-size: 12px; }
  .new-note { min-height: 46px; font-size: 13px; }
  .list-heading { font-size: 10px; }
  .note-card { padding: 20px 15px; }
  .note-card-title { font-size: 15px; }
  .note-card-preview { font-size: 13px; height: 21px; }
  .note-card-date { font-size: 11px; }
  .workspace { display: none; }
  .app.mobile-editor .sidebar { display: none; }
  .app.mobile-editor .workspace { display: flex; }
  .back-button { display: flex; min-height: 44px; }
  .workspace-header { min-height: 65px; padding: 0 23px; position: sticky; top: 0; background: var(--paper); z-index: 2; }
  .breadcrumb { display: none; }
  .sync-status { font-size: 9px; }
  .editor-layout { padding: 0 25px; }
  .editor { padding-top: 32px; }
  .editor-meta { margin-bottom: 17px; }
  .note-title { font-size: 35px; letter-spacing: -1px; }
  .editor-tools { padding-top: 23px; padding-bottom: 22px; }
  .timestamp-button { padding: 11px 12px; font-size: 12px; min-height: 42px; }
  .timestamp-button svg { width: 16px; height: 16px; }
  .live-time { font-size: 11px; }
  .shortcut { display: none; }
  .note-body { font-size: 16px; min-height: 280px; }
  .writing-area { min-height: 280px; }
  .editor-footer { font-size: 9px; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .toast { width: max-content; bottom: 18px; }
  .icon-button { width: 40px; height: 40px; }
  .menu { left: auto; right: 0; bottom: 45px; }
  #local-status { font-size: 11px; }
  .small-caption { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
