:root {
  color-scheme: light;
  --bg: #f1f3f8;
  --surface: #ffffff;
  --surface-soft: #e9ecf3;
  --surface-hover: #dfe4ee;
  --text: #181b29;
  --muted: #5e6477;
  --border: #d4d9e4;
  --brand: #6f5cff;
  --brand-strong: #5946f2;
  --brand-soft: #eae6ff;
  --danger: #d83c4d;
  --danger-soft: #fff0f2;
  --success: #1f9d67;
  --shadow: 0 18px 50px rgba(39, 42, 60, .12);
  --topbar-h: 68px;
  --sidebar-w: 232px;
  --list-w: 340px;
  --editor-max: 760px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11131a;
  --surface: #181b25;
  --surface-soft: #202431;
  --surface-hover: #292e3d;
  --text: #f2f3f7;
  --muted: #989daf;
  --border: #2d3242;
  --brand: #8b7cff;
  --brand-strong: #9b8fff;
  --brand-soft: #2a264d;
  --danger: #ff6878;
  --danger-soft: #3b2228;
  --success: #47cc90;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { overflow: hidden; }
button, input, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.mobile-only { display: none !important; }

.app-shell { min-height: 100vh; }
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 30;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: calc(var(--sidebar-w) - 18px); }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg, var(--brand), #9e7cff); color: white; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 35%, transparent); }
.brand-mark svg { width: 24px; height: 24px; stroke-width: 2; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 17px; letter-spacing: -.02em; }
.brand-copy small { color: var(--muted); margin-top: 4px; font-size: 11px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.topbar-menus { display: flex; align-items: center; gap: 2px; }
.top-menu-button { height: 38px; display: inline-flex; align-items: center; gap: 4px; padding: 0 9px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 650; }
.top-menu-button:hover, .top-menu-button[aria-expanded="true"] { background: var(--surface-soft); color: var(--text); }
.top-menu-button svg { width: 14px; height: 14px; stroke-width: 2; }

.button, .icon-button, .avatar-button, .mini-icon-button, .text-button { border: 0; cursor: pointer; transition: .18s ease; }
.button { min-height: 40px; padding: 0 15px; border-radius: 11px; background: var(--surface-soft); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; }
.button:hover { background: var(--surface-hover); transform: translateY(-1px); }
.button.primary { background: var(--brand); color: white; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 24%, transparent); }
.button.primary:hover { background: var(--brand-strong); }
.button.danger { background: var(--danger); color: white; }
.button svg { width: 18px; height: 18px; stroke-width: 2.2; }
.icon-button { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: transparent; }
.icon-button:hover, .icon-button.active { background: var(--surface-soft); color: var(--brand); }
.icon-button.small { width: 34px; height: 34px; }
.icon-button.danger-hover:hover { color: var(--danger); background: var(--danger-soft); }
.avatar-button { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-size: 12px; font-weight: 800; }
.avatar-button:hover { transform: scale(1.04); }
.mini-icon-button { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: transparent; color: var(--muted); }
.mini-icon-button:hover { background: var(--surface-hover); color: var(--text); }
.text-button { padding: 0; background: transparent; color: var(--muted); font-size: 12px; }
.text-button:hover { color: var(--brand); }
.moon-icon { display: none; }
html[data-theme="dark"] .sun-icon { display: none; }
html[data-theme="dark"] .moon-icon { display: block; }

.workspace { height: calc(100vh - var(--topbar-h)); display: grid; grid-template-columns: var(--sidebar-w) var(--list-w) minmax(0, 1fr); }
.sidebar, .note-list-panel, .editor-panel { min-width: 0; min-height: 0; }
.sidebar { border-right: 1px solid var(--border); background: var(--surface); padding: 18px 14px 14px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.sidebar-search { height: 40px; border: 1px solid transparent; background: var(--surface-soft); border-radius: 11px; display: flex; align-items: center; gap: 8px; padding: 0 10px; color: var(--muted); }
.sidebar-search:focus-within { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.sidebar-search svg { width: 17px; height: 17px; }
.sidebar-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.sidebar-search input::placeholder { color: var(--muted); }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; padding: 1px 5px; border-radius: 5px; font-size: 10px; color: var(--muted); background: var(--surface); }
.nav-list { display: grid; gap: 4px; }
.nav-item { width: 100%; height: 40px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 6px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; color: var(--muted); font-weight: 650; }
.nav-item:hover { background: var(--surface-soft); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-strong); }
.nav-icon { display: grid; place-items: center; }
.nav-icon svg { width: 18px; height: 18px; }
.nav-count { min-width: 24px; padding: 2px 6px; text-align: center; border-radius: 999px; font-size: 11px; background: color-mix(in srgb, currentColor 10%, transparent); }
.sidebar-section { min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; color: var(--muted); text-transform: uppercase; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.tag-filter-list { overflow: auto; display: grid; gap: 4px; padding-right: 2px; }
.tag-filter { height: 36px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 9px; padding: 0 9px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.tag-filter:hover, .tag-filter.active { background: var(--surface-soft); color: var(--text); }
.tag-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tag-color, var(--brand)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tag-color, var(--brand)) 14%, transparent); }
.tag-filter span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.tag-filter small { color: var(--muted); }
.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); }
.privacy-badge { flex-basis: 100%; display: flex; align-items: center; gap: 9px; padding: 9px; border-radius: 10px; background: color-mix(in srgb, var(--success) 9%, var(--surface)); color: var(--success); margin-bottom: 5px; }
.privacy-badge svg { width: 18px; height: 18px; }
.privacy-badge div { display: grid; }
.privacy-badge strong { font-size: 11px; }
.privacy-badge small { font-size: 10px; color: var(--muted); }

.note-list-panel { border-right: 1px solid var(--border); background: var(--bg); display: flex; flex-direction: column; }
.list-header { height: 82px; padding: 18px 18px 13px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--border); }
.list-header h1 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.list-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.list-header-actions { display: flex; gap: 4px; }
.note-list { overflow: auto; padding: 10px; display: grid; align-content: start; gap: 7px; }
.note-card { position: relative; width: 100%; border: 1px solid transparent; border-radius: 13px; background: transparent; padding: 14px; cursor: pointer; text-align: left; transition: .16s ease; }
.note-card:hover { background: var(--surface); border-color: var(--border); }
.note-card.active { background: var(--surface); border-color: color-mix(in srgb, var(--brand) 38%, var(--border)); box-shadow: 0 8px 24px rgba(34, 36, 54, .1); }
.note-card[data-color] { --note-accent: transparent; }
.note-card[data-color="violet"], .editor-view[data-note-color="violet"] { --note-accent: #7a68f5; }
.note-card[data-color="blue"], .editor-view[data-note-color="blue"] { --note-accent: #3d83e8; }
.note-card[data-color="green"], .editor-view[data-note-color="green"] { --note-accent: #2aa879; }
.note-card[data-color="yellow"], .editor-view[data-note-color="yellow"] { --note-accent: #d7a51c; }
.note-card[data-color="orange"], .editor-view[data-note-color="orange"] { --note-accent: #e77932; }
.note-card[data-color="pink"], .editor-view[data-note-color="pink"] { --note-accent: #df5f9b; }
.note-card[data-color="red"], .editor-view[data-note-color="red"] { --note-accent: #d9535f; }
.note-card:not([data-color="none"]) { border-left: 4px solid var(--note-accent); padding-left: 11px; background: color-mix(in srgb, var(--note-accent) 5%, transparent); }
.note-card:not([data-color="none"]).active { background: color-mix(in srgb, var(--note-accent) 8%, var(--surface)); }
.editor-view:not([data-note-color="none"]) .editor-header { box-shadow: inset 4px 0 var(--note-accent); }
.note-card-top { display: flex; align-items: center; gap: 8px; }
.note-card-title { margin: 0; font-size: 14px; font-weight: 780; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; }
.note-card-pin { color: var(--brand); display: grid; }
.note-card-pin svg { width: 14px; height: 14px; }
.note-card-preview { margin: 7px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.45; height: 34px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.note-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.note-card-date { color: var(--muted); font-size: 10px; }
.note-card-tags { display: flex; gap: 4px; min-width: 0; overflow: hidden; }
.mini-tag { max-width: 90px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-radius: 999px; padding: 3px 7px; background: var(--brand-soft); color: var(--brand-strong); font-size: 9px; font-weight: 700; }
.list-empty { padding: 54px 20px; text-align: center; color: var(--muted); }
.list-empty svg { width: 48px; height: 48px; opacity: .55; margin-bottom: 10px; }
.list-empty h3 { color: var(--text); font-size: 15px; margin: 0 0 6px; }
.list-empty p { margin: 0; font-size: 12px; line-height: 1.5; }

.editor-panel { background: var(--surface); position: relative; }
.empty-state { height: 100%; display: grid; place-items: center; align-content: center; padding: 30px; text-align: center; }
.empty-state h2 { margin: 18px 0 7px; font-size: 23px; letter-spacing: -.03em; }
.empty-state p { max-width: 380px; margin: 0 0 22px; color: var(--muted); line-height: 1.55; }
.empty-illustration { width: 150px; height: 150px; color: var(--brand); }
.empty-illustration svg { width: 100%; height: 100%; stroke-width: 1.6; }
.empty-illustration svg > path:first-child { fill: var(--brand-soft); }
.empty-illustration circle { fill: var(--surface); }
.editor-view { height: 100%; display: grid; grid-template-rows: auto auto 1fr auto; }
.editor-header { min-height: 56px; padding: 8px 18px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.save-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 12%, transparent); }
.save-status.saving .status-dot { background: #e6a23c; }
.editor-actions { margin-left: auto; display: flex; align-items: center; gap: 3px; }
.format-toolbar { height: 45px; padding: 5px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 3px; overflow-x: auto; }
.format-toolbar button { width: 33px; height: 33px; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.format-toolbar button:hover, .format-toolbar button.active { background: var(--surface-soft); color: var(--brand); }
.format-toolbar button svg { width: 18px; height: 18px; }
.toolbar-divider { width: 1px; height: 20px; background: var(--border); margin: 0 4px; flex: 0 0 auto; }
.editor-scroll { overflow: auto; padding: 34px 36px 80px; }
.editor-scroll > * { width: min(100%, var(--editor-max)); margin-left: auto; margin-right: auto; }
html[data-editor-width="wide"] { --editor-max: 1040px; }
.note-title-input { display: block; border: 0; outline: 0; background: transparent; color: var(--text); font-size: clamp(28px, 3vw, 40px); font-weight: 780; letter-spacing: -.045em; line-height: 1.15; padding: 0; margin-bottom: 16px; }
.note-title-input::placeholder { color: color-mix(in srgb, var(--muted) 50%, transparent); }
.tag-editor { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 32px; margin-bottom: 22px; }
.active-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.active-tag { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); font-size: 11px; font-weight: 700; }
.active-tag button { border: 0; background: transparent; padding: 0; width: 15px; height: 15px; display: grid; place-items: center; cursor: pointer; color: inherit; opacity: .65; }
.active-tag button:hover { opacity: 1; }
.active-tag svg { width: 12px; height: 12px; stroke-width: 2.4; }
.tag-editor > input { min-width: 90px; width: 120px; border: 0; outline: 0; background: transparent; color: var(--muted); font-size: 12px; }
.note-content { min-height: 50vh; outline: none; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.note-content:empty::before { content: attr(data-placeholder); color: color-mix(in srgb, var(--muted) 52%, transparent); pointer-events: none; }
.note-content p { margin: 0 0 1em; }
.note-content h1, .note-content h2, .note-content h3 { line-height: 1.25; margin: 1.3em 0 .5em; letter-spacing: -.025em; }
.note-content a { color: var(--brand); }
.note-content blockquote { margin: 1em 0; padding-left: 16px; border-left: 3px solid var(--brand); color: var(--muted); }
.note-content ul, .note-content ol { padding-left: 1.5em; }
.note-content .checklist { list-style: none; padding-left: 0; }
.note-content .checklist li { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; }
.note-content .checklist input { margin-top: 6px; accent-color: var(--brand); }
.editor-footer { height: 38px; padding: 0 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; }
.editor-counts { display: inline-flex; align-items: center; gap: 7px; }

.menu-popover { position: fixed; z-index: 100; width: 210px; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.menu-popover button { width: 100%; height: 36px; border: 0; border-radius: 8px; background: transparent; text-align: left; padding: 0 10px; cursor: pointer; font-size: 12px; }
.menu-popover button:hover { background: var(--surface-soft); }
.danger-text { color: var(--danger); }

.app-menu { width: 235px; }
.app-menu button { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; height: 40px; }
.app-menu button svg { width: 18px; height: 18px; color: var(--muted); }
.app-menu button kbd { justify-self: end; font-size: 9px; }
.help-menu button { display: flex; grid-template-columns: none; font-size: 14px; padding-inline: 10px; }
.help-menu button span { flex: 1; }
.help-menu button + button { margin-top: 1px; }
.color-menu { width: 190px; }
.color-menu button { display: flex; align-items: center; gap: 10px; }
.color-menu button.active { background: var(--surface-soft); font-weight: 750; }
.color-swatch { width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--text) 12%, transparent); box-shadow: inset 0 0 0 2px var(--surface); }
.color-swatch.none { background: linear-gradient(135deg, transparent 43%, var(--danger) 44% 56%, transparent 57%); border-color: var(--border); }
.color-swatch.violet { background: #7a68f5; }.color-swatch.blue { background: #3d83e8; }.color-swatch.green { background: #2aa879; }.color-swatch.yellow { background: #d7a51c; }.color-swatch.orange { background: #e77932; }.color-swatch.pink { background: #df5f9b; }.color-swatch.red { background: #d9535f; }
.dialog { width: min(520px, calc(100vw - 28px)); border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); padding: 0; box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(16, 18, 28, .42); backdrop-filter: blur(3px); }
.dialog form { padding: 22px; }
.dialog-header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.dialog h2 { margin: 0; font-size: 21px; }
.dialog p { color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
.setting-row { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--border); }
.setting-row div { display: grid; gap: 4px; }
.setting-row strong { font-size: 13px; }
.setting-row small { color: var(--muted); font-size: 11px; }
.setting-row select { min-width: 170px; height: 38px; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; background: var(--surface-soft); color: var(--text); outline: 0; }
.setting-row select:focus { border-color: var(--brand); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.compact-dialog { width: min(420px, calc(100vw - 28px)); }

.info-dialog { width: min(650px, calc(100vw - 28px)); }
.info-dialog-body { margin-top: 16px; max-height: min(62vh, 560px); overflow: auto; padding-right: 3px; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.guide-grid article { padding: 15px; border: 1px solid var(--border); border-radius: 13px; background: var(--bg); }
.guide-grid article strong { font-size: 13px; }
.guide-grid article p { font-size: 12px; margin-top: 7px; }
.help-callout { margin-top: 12px; padding: 14px; border-radius: 13px; background: color-mix(in srgb, var(--success) 9%, var(--surface)); color: var(--success); }
.help-callout p { font-size: 12px; color: var(--muted); }
.shortcut-list { display: grid; gap: 2px; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.shortcut-list > div { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 13px; background: var(--surface); border-bottom: 1px solid var(--border); }
.shortcut-list > div:last-child { border-bottom: 0; }
.shortcut-list span { font-size: 13px; }
.shortcut-list kbd { min-width: 132px; text-align: center; font-size: 11px; }
.install-steps { display: grid; gap: 10px; }
.install-steps p { padding: 13px 14px; margin: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); font-size: 13px; }
.about-mark { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); margin-bottom: 16px; }
.about-mark > div { display: grid; gap: 3px; }
.about-mark strong { font-size: 17px; }.about-mark small { color: var(--muted); }
.field-label { display: block; margin: 18px 0 7px; font-size: 12px; font-weight: 750; }
.bug-dialog { width: min(760px, calc(100vw - 28px)); }
.bug-intro { margin: 18px 0 18px !important; font-size: 14px; color: var(--text); }
.bug-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.bug-card-stack { display: grid; gap: 10px; align-items: stretch; }
.bug-card-label { font-size: 12px; font-weight: 800; }
.bug-link-value { color: var(--brand); font-weight: 700; text-decoration: none; }
.bug-link-value:hover { text-decoration: underline; }
.bug-report-preview { width: 100%; min-height: 240px; resize: vertical; border: 0; outline: 0; background: transparent; color: var(--text); font: 500 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.button.link-button { background: transparent; color: #00c8f8; box-shadow: none; }
.button.link-button:hover { background: color-mix(in srgb, #00c8f8 10%, var(--surface)); color: #00d8ff; }
.split-actions { justify-content: space-between; align-items: center; }
.split-actions-3 { gap: 12px; flex-wrap: wrap; }
.split-actions-3 .button:first-child { margin-right: auto; }
.toast-region { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: grid; gap: 8px; }
.toast { max-width: 340px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-size: 12px; animation: toast-in .2s ease both; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: 0 0 auto; }
.toast.error::before { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1080px) {
  :root { --sidebar-w: 210px; --list-w: 310px; }
  .brand-copy small { display: none; }
}

@media (max-width: 840px) {
  .mobile-only { display: grid !important; }
  .topbar { padding: 0 12px; gap: 8px; }
  .brand { min-width: 0; }
  .brand-copy small { display: none; }
  .topbar-menus { margin-left: 2px; }
  .top-menu-button { padding-inline: 7px; font-size: 12px; }
  .topbar .button.primary span { display: none; }
  .topbar .button.primary { width: 40px; padding: 0; }
  .workspace { display: block; position: relative; }
  .sidebar { position: fixed; z-index: 60; inset: var(--topbar-h) auto 0 0; width: min(280px, 86vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .note-list-panel { position: absolute; inset: 0; width: 100%; border-right: 0; z-index: 5; }
  .note-list-panel.mobile-hidden { display: none; }
  .editor-panel { position: absolute; inset: 0; z-index: 10; }
  .editor-panel.mobile-hidden { display: none; }
  .editor-scroll { padding: 28px 22px 70px; }
  .list-header { height: 72px; padding-top: 14px; }
}

@media (max-width: 520px) {
  .brand-copy { display: none; }
  .brand-mark { width: 36px; height: 36px; }
  .top-menu-button svg { display: none; }
  .top-menu-button { padding-inline: 6px; font-size: 11px; }
  .topbar-actions { gap: 2px; }
  .editor-header { padding: 7px 8px; }
  .editor-actions { gap: 0; }
  .editor-actions .icon-button { width: 36px; height: 36px; }
  .format-toolbar { padding-inline: 10px; }
  .editor-scroll { padding: 24px 18px 68px; }
  .note-title-input { font-size: 30px; }
  .setting-row { align-items: flex-start; flex-direction: column; padding: 14px 0; gap: 10px; }
  .setting-row select { width: 100%; }
  .guide-grid { grid-template-columns: 1fr; }
  .split-actions { flex-direction: column-reverse; }
  .split-actions .button { width: 100%; }
}


.bug-card-stack { align-items: stretch; }
.bug-report-preview {
  display: block;
  width: 100%;
  min-height: 260px;
  max-height: 320px;
  overflow: auto;
  margin: 0;
  padding: 0;
  white-space: pre-wrap;
  word-break: break-word;
  resize: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 500 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.bug-report-preview:focus { outline: none; }
.split-actions-3 .button { min-width: 170px; }
@media (max-width: 680px) {
  .bug-card { align-items: flex-start; flex-direction: column; }
  .split-actions-3 { flex-direction: column; align-items: stretch; }
  .split-actions-3 .button,
  .split-actions-3 .button:first-child { width: 100%; margin-right: 0; }
}
