:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none; color-scheme: light;
  --page: #f6f2ed; --surface: #fffcf8; --ink: #292d31; --muted: #74706c; --line: #e7ddd3;
  --hover: #f4ebe3; --accent: #ae4e37; --accent-hover: #993e2b; --accent-soft: #f6e5db; --on-accent: #fff;
  --selection: #e8c7b980; --success: #39775d; --success-soft: #eaf2eb; --error: #aa3f33;
  --code: #f0e9e0; --highlight: #f6df9c; --lock: rgb(246 242 237 / 45%); --shadow: 0 18px 60px rgb(67 46 29 / 8%);
  --code-keyword: #854f9d; --code-string: #376b48; --code-number: #a14e20; --code-property: #286d87;
  color: var(--ink); background: var(--page);
}
:root[data-theme="dark"] {
  color-scheme: dark; --page: #191a1d; --surface: #222326; --ink: #e7e8e9; --muted: #ada59e; --line: #3a3532;
  --hover: #322c28; --accent: #e9a185; --accent-hover: #f0b398; --accent-soft: #442e25; --on-accent: #281a14;
  --selection: #ad765780; --success: #93c9ad; --success-soft: #26372e; --error: #efa297;
  --code: #302c29; --highlight: #57472a; --lock: rgb(25 26 29 / 45%); --shadow: 0 18px 60px rgb(0 0 0 / 20%);
  --code-keyword: #d9a7ec; --code-string: #a4cca9; --code-number: #efb187; --code-property: #94c9de;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark; --page: #191a1d; --surface: #222326; --ink: #e7e8e9; --muted: #ada59e; --line: #3a3532;
    --hover: #322c28; --accent: #e9a185; --accent-hover: #f0b398; --accent-soft: #442e25; --on-accent: #281a14;
    --selection: #ad765780; --success: #93c9ad; --success-soft: #26372e; --error: #efa297;
    --code: #302c29; --highlight: #57472a; --lock: rgb(25 26 29 / 45%); --shadow: 0 18px 60px rgb(0 0 0 / 20%);
    --code-keyword: #d9a7ec; --code-string: #a4cca9; --code-number: #efb187; --code-property: #94c9de;
  }
}
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
[hidden] { display: none !important; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 80px; padding: 18px 28px; flex: 0 0 auto; }
.brand { color: var(--accent); display: flex; border: 0; padding: 0; background: transparent; border-radius: 8px; }
.brand-mark { display: block; width: 39px; height: 39px; background: currentColor; -webkit-mask: url('/logo.png') center / contain no-repeat; mask: url('/logo.png') center / contain no-repeat; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.connection { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; margin-right: 12px; padding: 8px 11px; border-radius: 30px; white-space: nowrap; }
.connection[data-state="online"] { color: var(--success); background: var(--success-soft); }
.connection::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.connection[data-state="online"]::before { background: var(--success); }
.connection[data-state="error"]::before { background: var(--error); }
.icon-button { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.icon-button:hover:not(:disabled) { color: var(--ink); background: var(--hover); }
#sync[data-state="pending"] { color: var(--accent); }
#sync[data-state="failed"] { color: var(--error); }
.sync-badge { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; border-radius: 9px; padding: 0 4px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
#sync[data-state="failed"] .sync-badge { background: var(--error); }
.sync-control { position: relative; }
.sync-panel { position: absolute; z-index: 10; top: 49px; right: 0; width: 280px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.sync-panel h2 { font-size: 14px; margin: 0 0 12px; }
.sync-panel p { font-size: 13px; line-height: 1.6; margin: 0; }
.sync-panel dl { margin: 16px 0 0; font-size: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.sync-panel dl > div { display: flex; justify-content: space-between; padding: 4px 0; }
.sync-panel dt, .sync-panel .sync-last { color: var(--muted); }
.sync-panel dd { margin: 0; font-variant-numeric: tabular-nums; }
.sync-panel .sync-last { font-size: 11px; margin-top: 15px; }
.workspace { min-height: 0; flex: 1; display: flex; padding: 0 24px 24px; gap: 18px; }
.editor-pane { display: flex; flex: 1; flex-direction: column; min-height: 0; min-width: 0; }
.brand-area { display: flex; align-items: center; gap: 12px; }
.draft-sidebar { flex: 0 0 230px; min-height: 0; display: flex; flex-direction: column; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.draft-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 8px 10px; }
.draft-heading h2 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.draft-list { min-height: 0; flex: 1; overflow-y: auto; }
.draft-item { display: flex; width: 100%; flex-direction: column; gap: 7px; margin-bottom: 6px; padding: 14px 12px; border: 1px solid transparent; border-radius: 10px; text-align: left; color: var(--ink); background: transparent; }
.draft-item:hover:not(:disabled) { background: var(--hover); }
.draft-item[aria-pressed="true"] { border-color: var(--line); background: var(--accent-soft); }
.draft-item strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-preview { font-size: 12px; color: var(--muted); line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.draft-item small { font-size: 10px; color: var(--accent-hover); }
.draft-sidebar-actions { display: flex; justify-content: space-between; gap: 8px; padding: 12px 2px 0; border-top: 1px solid var(--line); }
.draft-sidebar-actions button, .text-button { border: 0; border-radius: 6px; padding: 8px; background: transparent; color: var(--muted); font-size: 11px; }
.draft-sidebar-actions button:hover:not(:disabled), .text-button:hover { color: var(--accent); background: var(--accent-soft); }
#draft-status { margin: 0 0 3px; }
#draft-status:empty { display: none; }
.vault-card { width: min(100%, 380px); max-height: calc(100dvh - 120px); overflow-y: auto; margin-top: 0; padding: 4px; }
.vault-card h2 { margin: 0 0 12px; font-size: 21px; }
.vault-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }
#vault-form, #vault-recovery-form { display: flex; flex-direction: column; gap: 12px; }
.vault-input, .recovery-code { width: 100%; padding: 15px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); font: inherit; font-size: 14px; }
.recovery-code { resize: none; font-family: "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.recovery-check { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.vault-message { min-height: 1.6em; }
@media (min-width: 861px) { #draft-toggle { display: none; } }
@media (max-width: 860px) {
  .draft-sidebar { display: none; position: fixed; z-index: 18; inset: 82px auto 24px 24px; width: min(300px, calc(100vw - 48px)); box-shadow: var(--shadow); }
  .draft-list-open .draft-sidebar { display: flex; }
  .brand-area { gap: 5px; }
}
.writing-area { width: min(100%, 980px); min-height: 0; margin: 0 auto; padding: 12px 40px 0; flex: 1; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; }
.format-toolbar { display: flex; align-items: center; gap: 3px; padding: 5px 3px 13px; margin-bottom: 16px; border-bottom: 1px solid var(--line); overflow-x: auto; flex: 0 0 auto; scrollbar-width: thin; }
.format-toolbar button { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: var(--muted); background: transparent; border: 0; border-radius: 7px; font-size: 15px; }
.format-toolbar button:hover:not(:disabled), .format-toolbar button[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); }
.format-toolbar .icon { width: 18px; height: 18px; }
.format-toolbar .heading-trigger { width: auto; display: flex; gap: 5px; padding: 0 8px; font-size: 12px; }
.heading-trigger .icon { width: 14px; height: 14px; }
.heading-menu { position: fixed; z-index: 15; width: 224px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.heading-menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 8px 10px; color: var(--ink); background: transparent; border: 0; border-radius: 7px; text-align: left; font-size: 13px; }
.heading-menu button:hover, .heading-menu button:focus-visible { color: var(--accent); background: var(--accent-soft); outline: none; }
.heading-menu button > span:first-child { width: 24px; color: var(--muted); font-size: 11px; font-weight: 600; }
.heading-menu button[data-format="heading-1"] { font-size: 19px; font-weight: 650; }
.heading-menu button[data-format="heading-2"] { font-size: 17px; font-weight: 650; }
.heading-menu button[data-format="heading-3"] { font-size: 15px; font-weight: 650; }
.heading-menu button[data-format="paragraph"] { border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; margin-top: 4px; }
.recent-tags { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; padding-bottom: 18px; min-width: 0; }
.recent-label { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.recent-tag-list { display: flex; gap: 6px; min-width: 0; padding: 3px; overflow-x: auto; scrollbar-width: thin; }
.recent-tag { display: inline-flex; align-items: center; flex: 0 0 auto; background: var(--accent-soft); border-radius: 6px; }
.recent-tag button { min-height: 27px; padding: 3px 6px 3px 8px; color: var(--accent-hover); background: transparent; border: 0; border-radius: 6px; font-size: 11px; }
.recent-tag button:hover:not(:disabled) { background: var(--selection); }
.recent-tag .remove-tag { padding: 0 7px 1px 4px; font-size: 16px; }
.toolbar-divider { height: 18px; width: 1px; background: var(--line); flex: 0 0 auto; margin: 0 5px; }
.underline-symbol { text-decoration: underline; text-underline-offset: 3px; }
.highlight-symbol { background: var(--highlight); border-radius: 3px; padding: 0 3px; }
.cm-tooltip.selection-tools { display: flex; align-items: center; gap: 2px; padding: 5px; max-width: calc(100vw - 24px); overflow-x: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgb(0 0 0 / 14%); }
.selection-tools button { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); font-size: 15px; }
.selection-tools button:hover, .selection-tools button:focus-visible { color: var(--accent); background: var(--accent-soft); }
.selection-tools .icon { width: 18px; height: 18px; }
.selection-tools .magic-button { color: var(--accent); background: var(--accent-soft); margin-left: 3px; }
.ai-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 26px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.ai-dialog::backdrop { background: rgb(0 0 0 / 30%); backdrop-filter: blur(4px); }
.ai-dialog h2 { margin: 0 0 18px; font-size: 19px; }
.ai-selection { margin: 0 0 20px; padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--accent-soft); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-dialog label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 600; }
.ai-dialog textarea { display: block; width: 100%; resize: vertical; min-height: 100px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--page); font: inherit; font-size: 14px; }
.ai-dialog textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ai-dialog p { font-size: 12px; line-height: 1.6; color: var(--muted); }
#ai-message:empty { display: none; }
.ai-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
#ai-cancel { border: 0; background: transparent; border-radius: 8px; color: var(--muted); padding: 10px 14px; font-size: 13px; }
#ai-cancel:hover { background: var(--hover); color: var(--ink); }
.markdown-editor { flex: 1; min-height: 0; }
.cm-editor { height: 100%; font-size: 17px; }
.cm-editor.cm-focused { outline: none; }
.cm-editor .cm-scroller { font-family: inherit; line-height: 1.85; scrollbar-width: thin; }
.cm-editor .cm-content { padding: 0 0 80px; min-height: 100%; caret-color: var(--ink); }
.cm-editor .cm-line { padding: 0; }
.cm-editor .note-title { font-size: clamp(30px, 4vw, 40px); font-weight: 650; line-height: 1.4; letter-spacing: -.04em; padding-bottom: 20px; }
.cm-editor .note-title .md-heading-1 { font-size: inherit; line-height: inherit; }
.cm-title-placeholder { color: var(--muted); opacity: .55; pointer-events: none; }
.cm-editor .cm-cursor { border-left-color: var(--ink); }
.cm-editor .cm-selectionBackground, .cm-editor.cm-focused .cm-selectionBackground, .cm-editor ::selection { background: var(--selection); }
.cm-editor .md-heading-1 { font-size: 1.8em; line-height: 1.4; font-weight: 650; letter-spacing: -.035em; }
.cm-editor .md-heading-2 { font-size: 1.5em; line-height: 1.5; font-weight: 650; letter-spacing: -.025em; }
.cm-editor .md-heading-3 { font-size: 1.25em; line-height: 1.6; font-weight: 650; }
.cm-editor .md-heading-4, .cm-editor .md-heading-5, .cm-editor .md-heading-6 { font-size: 1.1em; font-weight: 650; }
.cm-editor .md-strong { font-weight: 700; }
.cm-editor .md-emphasis { font-style: italic; }
.cm-editor .md-strikethrough { text-decoration: line-through; }
.cm-editor .md-link, .cm-editor .md-url { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cm-editor .md-code { font-family: "SFMono-Regular", Consolas, monospace; font-size: .87em; background: var(--code); border-radius: 3px; }
.cm-editor .note-code { background: var(--code); font-family: "SFMono-Regular", Consolas, monospace; font-size: .87em; line-height: 1.8; padding: 2px 16px; border-left: 3px solid var(--line); }
.cm-editor .note-code .md-code { font: inherit; background: transparent; }
.cm-editor .note-code-fence { color: var(--muted); font-size: .75em; padding-block: 5px; }
.cm-editor .code-keyword { color: var(--code-keyword); }
.cm-editor .code-string { color: var(--code-string); }
.cm-editor .code-number { color: var(--code-number); }
.cm-editor .code-property, .cm-editor .code-function { color: var(--code-property); }
.cm-editor .code-comment { color: var(--muted); font-style: italic; }
.cm-editor .note-quote { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 3px 16px; color: var(--muted); }
.cm-editor .note-list, .cm-editor .note-task { padding-left: 12px; }
.note-list-marker { display: inline-block; color: var(--accent); min-width: 22px; font-weight: 600; user-select: none; }
.note-checkbox { width: 15px; height: 15px; margin: 0 5px 0 0; vertical-align: -1px; accent-color: var(--accent); cursor: pointer; }
.note-checkbox:disabled { cursor: default; }
.cm-editor .note-task-done { color: var(--muted); }
.note-separator { height: 2px; margin: 24px 0; border-radius: 2px; background: linear-gradient(90deg, var(--line), var(--accent) 50%, var(--line)); opacity: .65; }
.cm-editor .note-rule { position: relative; padding: 8px 0 18px; font-family: "SFMono-Regular", Consolas, monospace; font-size: .75em; color: var(--muted); }
.cm-editor .note-rule::after { content: ""; position: absolute; bottom: 8px; left: 0; right: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--line), var(--accent) 50%, var(--line)); opacity: .65; pointer-events: none; }
.cm-editor .md-quote { color: var(--muted); }
.cm-editor .md-marker { color: var(--muted); }
.cm-editor .bear-tag { color: var(--accent-hover); background: var(--accent-soft); border-radius: 5px; padding: 1px 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.cm-editor .bear-underline { text-decoration: underline; text-underline-offset: 3px; }
.cm-editor .bear-highlight { background: var(--highlight); border-radius: 3px; }
.editor-footer { width: min(100%, 980px); margin: 0 auto; padding: 16px 40px 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex: 0 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 16px 16px; }
.editor-state { min-width: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.footer-actions { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; }
.markdown-toggle { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 4px 0; background: transparent; border: 0; border-radius: 5px; color: var(--muted); font-size: 11px; }
.toggle-track { position: relative; display: block; width: 26px; height: 16px; border-radius: 20px; background: var(--line); }
.toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.markdown-toggle[aria-pressed="true"] .toggle-track { background: var(--accent); }
.markdown-toggle[aria-pressed="true"] .toggle-track::after { left: 13px; background: var(--on-accent); }
#save-status { margin: 0 0 3px; }
#save-status:empty { display: none; }
#word-count { font-variant-numeric: tabular-nums; }
.save-button { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; min-height: 42px; padding: 10px 20px; border: 0; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 600; }
.save-button:hover:not(:disabled) { background: var(--accent-hover); }
.save-button .icon { width: 17px; height: 17px; }
.is-locked .workspace { filter: blur(9px); opacity: .55; pointer-events: none; user-select: none; }
.is-locked #mac-status, .is-locked #sync, .is-locked #logout { opacity: .25; }
.is-checking #mac-status, .is-checking #sync, .is-checking #logout { visibility: hidden; }
.is-checking .workspace { opacity: .65; pointer-events: none; }
.lock-screen { position: fixed; z-index: 20; inset: 80px 0 0; display: grid; place-items: center; padding: 24px; background: var(--lock); pointer-events: none; }
.unlock-card { width: min(100%, 340px); pointer-events: auto; margin-top: -80px; }
#login-form { display: flex; flex-direction: column; gap: 12px; }
#password { width: 100%; height: 54px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); font-size: 15px; }
#password::placeholder { color: var(--muted); }
.unlock-button { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 12px 18px; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 600; }
.unlock-button:hover:not(:disabled) { background: var(--accent-hover); }
#login-message { min-height: 1.6em; margin: 14px 4px 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.error { color: var(--error) !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 680px) {
  .topbar { min-height: 72px; padding: 14px 16px; gap: 12px; }
  .brand-mark { width: 34px; height: 34px; }
  .topbar-actions { gap: 2px; }
  .connection { font-size: 11px; margin-right: 2px; max-width: 110px; padding: 6px 8px; white-space: normal; line-height: 1.4; }
  .icon-button { width: 42px; height: 42px; }
  .workspace { padding: 0 12px 12px; }
  .writing-area { padding: 8px 20px 0; }
  .format-toolbar { margin-bottom: 12px; }
  .format-toolbar button { width: 40px; height: 40px; }
  .recent-tags { gap: 6px; padding-bottom: 14px; }
  .recent-label { max-width: 50px; line-height: 1.4; }
  .cm-editor .note-title { font-size: 30px; }
  .cm-editor { font-size: 16px; }
  .editor-footer { padding: 12px 20px 16px; gap: 10px; }
  .footer-actions { gap: 12px; }
  .markdown-toggle { flex-direction: column; gap: 3px; font-size: 10px; }
  .save-button { padding: 10px 14px; }
  .sync-panel { right: -88px; width: min(280px, calc(100vw - 32px)); }
  .lock-screen { top: 72px; }
  .unlock-card { margin-top: -72px; }
}
@media (prefers-reduced-motion: no-preference) {
  .icon-button, .save-button { transition: background .15s, color .15s, opacity .15s; }
  #sync[aria-busy="true"] .icon { animation: spin 1s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
}

/* Attachments stay separate from Markdown until the Mac imports them into Bear. */
.writing-area { position: relative; }
.attachments { flex: 0 0 auto; border-top: 1px solid var(--line); padding: 12px 0; max-height: min(180px, 22vh); overflow-y: auto; }
.attachment-summary { margin: 0 0 9px; color: var(--muted); font-size: 11px; }
.attachment-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: 8px; }
.attachment-card { display: flex; gap: 10px; align-items: center; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); }
.attachment-preview, .attachment-kind { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 6px; }
.attachment-preview { object-fit: cover; }
.attachment-kind { display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); font-size: 10px; font-weight: 650; }
.attachment-details { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.attachment-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-size { color: var(--muted); font-size: 10px; }
.attachment-remove { flex: 0 0 auto; width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 20px; }
.attachment-remove:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.drop-hint { position: absolute; z-index: 16; inset: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed var(--accent); border-radius: 12px; background: var(--surface); color: var(--accent); pointer-events: none; }
.drop-hint span { font-size: 20px; font-weight: 600; }
.drop-hint small { color: var(--muted); }
@media (max-width: 360px) {
  .topbar { padding: 12px; gap: 6px; }
  .brand-area { gap: 2px; }
  .topbar-actions .icon-button, #draft-toggle { width: 36px; }
  .connection { max-width: 82px; margin-right: 0; font-size: 10px; padding: 5px 6px; }
}
