/* flomo Web v5.26.101 视觉复刻：tokens、布局与组件取自官方产物 css/index.css。 */
:root {
  --black5: rgba(0, 0, 0, 0.05);
  --black8: rgba(0, 0, 0, 0.08);
  --black10: rgba(0, 0, 0, 0.1);
  --black20: rgba(0, 0, 0, 0.2);
  --black40: rgba(0, 0, 0, 0.4);
  --black60: rgba(0, 0, 0, 0.6);
  --white5: rgba(255, 255, 255, 0.05);
  --white10: rgba(255, 255, 255, 0.1);
  --white20: rgba(255, 255, 255, 0.2);
  --white60: rgba(255, 255, 255, 0.6);
  --white100: #fff;
  --gray5: #121212;
  --gray10: #202020;
  --gray20: #454545;
  --gray30: #6d6d6d;
  --gray60: #9d9d9d;
  --gray80: #d9d9d9;
  --gray90: #ebebeb;
  --gray99: #fafafa;
  --green40: #397354;
  --green50: #20824d;
  --green70: #30cf79;
  --blue50: #5783f7;
  --blue60: #2b88d8;
  --red50: #ff6369;
  --red60: #e5484d;

  --primary-background-color: #fafafa;
  --bodyBg: #fafafa;
  --backgrounds-primary: var(--white100);
  --active-background-color: var(--gray90);
  --editor-menu-bar-bg: #ffffff;
  --defaultBg: #ffffff;
  --hover-bg: var(--black5);
  --line-light: var(--black10);
  --line-regular: var(--black20);
  --text-emphasize: var(--gray5);
  --text-regular: var(--gray20);
  --text-subtle: var(--gray60);
  --memoContentColor: #323232;
  --editorActiveColor: #000000;
  --editorColor: #efefef;
  --focus-disabled: #cecece;
  --disabled-bg: var(--gray90);
  --siderColor: #323232;
  --tagColor: #5783f7;
  --tagBg: #eef3fe;
  --tagBgHover: var(--tagColor);
  --tagColorHover: var(--tagBg);
  --atColor: #6890f8;
  --mark-bg: #ffffb4;
  --green: #30cf79;
  --saveSvgPathColor: #ffffff;
  --destructive: var(--red60);
  --general-theme-primary: var(--green70);
  --heatgrid-day-bg: var(--gray90);
  --heatgrid-day-light: #d3ecdd;
  --heatgrid-day-green: #8ddeb5;
  --heatgrid-day-dark: #55bb8e;
  --blurd-border-color: #e8e8e8;
  --blurd-shadow-color: rgba(232, 232, 232, 0.2);
  --focused-shadow-bg: #dddddd;
  --popover-surface: #ffffff;
  --popover-border: var(--black8);
  --popover-backdrop-filter: saturate(180%) blur(18px);
  --card-resting-shadow: 0 0 4px var(--black5);
  --card-hover-shadow: 0 0 4px var(--black5);
  --popover-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);

  --corner-radius-large: 12px;
  --corner-radius-medium: 8px;
  --corner-radius-small: 3px;
  --corner-radius-xlarge: 18px;
  --corner-radius-full: 999px;
  --linewidth: 0.5px;
  --padding-medium: 16px;
  --memo-column-width: 640px;
  --memo-column-min-width: 360px;
  --home-content-gutter: 10px;
  --home-content-gutter-mobile: 20px;
  --home-content-gap: 10px;
  --home-scrollbar-gutter-offset: 5px;
  --layout-resizer-hit-width: 8px;
  --layout-resizer-line-width: 1px;
  --layout-resizer-inset: 16px;
  --memo-thumb-size: 110px;
  --memo-files-gap: 10px;
  --memo-inline-pill-padding-y: 3px;
  --memo-inline-pill-padding-x: 5px;
  --memo-inline-pill-radius: var(--corner-radius-medium);
  --memo-inline-pill-line-height: 16px;
  --menu-padding-medium: 4px;
  --menu-item-radius: 8px;
  --motion-fast: 120ms;
  --motion-normal: 180ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ui-text-xs: 12px;
  --ui-text-sm: 13px;
  --ui-text-md: 14px;
  --ui-text-lg: 16px;
  --ui-line-label: 16px;
  --ui-line-control: 20px;
  --ui-weight-regular: 400;
  --ui-weight-medium: 500;
  --ui-weight-semibold: 600;
}

html.font-13 {
  --memo-content-font-size: 13px;
  --memo-tag-font-size: 11px;
  --memo-padding: 15px;
  --memo-margin: 10px;
}
html.font-14 {
  --memo-content-font-size: 14px;
  --memo-tag-font-size: 12px;
  --memo-padding: 15px;
  --memo-margin: 10px;
}
html.font-15 {
  --memo-content-font-size: 15px;
  --memo-tag-font-size: 13px;
  --memo-padding: 15px;
  --memo-margin: 10px;
}
html.font-16 {
  --memo-content-font-size: 16px;
  --memo-tag-font-size: 14px;
  --memo-padding: 15px;
  --memo-margin: 10px;
}
html.line-height-sm { --memo-content-line-height: 1.6; }
html.line-height-md { --memo-content-line-height: 1.8; }
html.line-height-lg { --memo-content-line-height: 2; }

html[data-theme='dark'] {
  --primary-background-color: #121212;
  --bodyBg: #202124;
  --backgrounds-primary: var(--gray5);
  --active-background-color: var(--white5);
  --editor-menu-bar-bg: #202020;
  --defaultBg: #202020;
  --hover-bg: var(--white10);
  --line-light: var(--white10);
  --line-regular: var(--white20);
  --text-emphasize: var(--white100);
  --text-regular: var(--gray80);
  --text-subtle: var(--gray60);
  --memoContentColor: #d9d9d9;
  --editorActiveColor: #d9d9d9;
  --editorColor: rgba(255, 255, 255, 0.1);
  --focus-disabled: #364d40;
  --disabled-bg: var(--white10);
  --siderColor: var(--gray60);
  --tagColor: #2b88d8;
  --tagBg: #3a4359;
  --atColor: #99b5ff;
  --mark-bg: #595947;
  --green: #30cf79;
  --saveSvgPathColor: #d9d9d9;
  --destructive: var(--red50);
  --general-theme-primary: var(--green40);
  --heatgrid-day-bg: #3d3d3d;
  --heatgrid-day-light: #475446;
  --heatgrid-day-green: #5d795c;
  --heatgrid-day-dark: #79af77;
  --blurd-border-color: rgba(232, 232, 232, 0.2);
  --blurd-shadow-color: rgba(232, 232, 232, 0.2);
  --focused-shadow-bg: rgba(0, 0, 0, 0.2);
  --popover-surface: #454545;
  --popover-border: rgba(255, 255, 255, 0.12);
  --card-resting-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
  --card-hover-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
  --popover-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  width: 100%;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@font-face {
  font-family: 'BarlowF';
  src: url('../fonts/BarlowF-Regular.ttf') format('opentype');
}
@font-face {
  font-family: 'BarlowF';
  src: url('../fonts/BarlowF-SemiBold.ttf') format('opentype');
  font-weight: bold;
}
html, body { height: 100%; overflow: auto; min-width: 360px; }
body {
  font-family: "BarlowF", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif;
  background: var(--primary-background-color);
  color: var(--memoContentColor);
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
button {
  font: inherit;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
}
button:focus-visible, input:focus-visible, [contenteditable]:focus-visible { outline: none; }
::-webkit-scrollbar { width: 0 !important; height: 0 !important; }
::-webkit-scrollbar-thumb { background-color: rgba(170, 170, 170, 0.2); border-radius: 100px !important; }
::-webkit-scrollbar-track { background-color: transparent !important; }

.web-container {
  display: flex;
  flex: 1;
  width: min-content;
  height: calc(100vh);
  margin: 0 auto;
  flex-direction: row;
  max-width: 100%;
  min-width: 0;
}

.sidebar {
  position: relative;
  height: 100%;
  overflow-y: scroll;
  flex-shrink: 0;
  width: 280px;
  min-width: 216px;
  max-width: 312px;
  margin-left: 10px;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  margin: 10px 10px 6px;
}
.app-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  color: var(--text-subtle);
  border-radius: var(--corner-radius-medium);
}
.app-menu svg { width: 16px; height: 16px; }
.app-menu:hover { opacity: .8; color: var(--text-regular); }
.logo { display: inline-flex; color: var(--text-emphasize); }
.logo svg { width: 70px; height: 15px; }

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}
.nav-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--corner-radius-medium);
  font-size: var(--ui-text-md);
  color: var(--siderColor);
  transition: background-color var(--motion-normal) var(--ease-standard), color var(--motion-normal) var(--ease-standard);
}
.nav-entry:hover { background: var(--hover-bg); color: var(--text-emphasize); }
.nav-entry.active { background: var(--active-background-color); color: var(--text-emphasize); }
.entry-icon { display: inline-flex; width: 18px; height: 18px; color: var(--text-subtle); }
.entry-icon svg { width: 100%; height: 100%; }
.nav-entry:hover .entry-icon, .nav-entry.active .entry-icon { color: var(--text-emphasize); }
.entry-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-count { color: var(--text-subtle); font-size: var(--ui-text-xs); font-variant-numeric: tabular-nums; }

.tags-title {
  padding: 18px 16px 8px;
  font-size: var(--ui-text-sm);
  line-height: var(--ui-line-label);
  color: var(--text-subtle);
}
.allTagsTree { flex: 1 1 auto; min-height: 48px; padding: 0 4px 8px; }
.allTagsTree > .tree-node { margin-left: -8px; }
.tree-node { position: relative; }
.tree-children { margin-left: 42px; }
.tree-row {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  border-radius: var(--corner-radius-medium);
  padding: 0 6px;
  color: var(--siderColor);
  transition: background-color var(--motion-normal) var(--ease-standard), color var(--motion-normal) var(--ease-standard);
}
.tree-row:hover { background: var(--hover-bg); color: var(--text-emphasize); }
.tree-row.active { background: var(--active-background-color); color: var(--text-emphasize); }
.tree-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 2px;
  color: var(--text-subtle);
  transition: transform .3s ease;
}
.tree-caret svg { width: 16px; height: 16px; }
.tree-caret.expanded { transform: rotate(90deg); }
.tree-caret.empty { opacity: 0; pointer-events: none; }
.tree-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 2px;
  color: var(--siderColor);
}
.tree-icon svg { width: 16px; height: 16px; }
.tree-text {
  flex: 1;
  min-width: 0;
  height: 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: var(--ui-text-md);
}
.tree-count { margin-right: 6px; color: var(--text-subtle); font-size: var(--ui-text-xs); font-variant-numeric: tabular-nums; opacity: 0; }
.tree-row:hover .tree-count, .tree-row.active .tree-count { opacity: 1; }
.tree-more { display: none; margin-right: 4px; color: var(--text-subtle); font-weight: 700; line-height: 1; }
.tree-row:hover .tree-more { display: block; }
.tree-children.collapsed { display: none; }

.sidebar-footer { flex: 0 0 auto; padding: 12px 10px 14px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stat-value { display: block; font-size: 18px; font-weight: var(--ui-weight-semibold); color: var(--text-emphasize); line-height: 22px; font-variant-numeric: tabular-nums; }
.stat-label { display: block; margin-top: 2px; font-size: var(--ui-text-xs); line-height: var(--ui-line-label); color: var(--text-subtle); letter-spacing: .4px; }
.heatgrid {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
  height: 63px;
  margin: 14px 0 10px;
}
.heat-cell { background: var(--heatgrid-day-bg); border-radius: 2px; }
.heat-cell[data-level='1'] { background: var(--heatgrid-day-light); }
.heat-cell[data-level='2'] { background: var(--heatgrid-day-green); }
.heat-cell[data-level='3'] { background: var(--heatgrid-day-dark); }
.sidebar-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.action-item {
  height: 30px;
  padding: 0 8px;
  overflow: hidden;
  border-radius: var(--corner-radius-medium);
  color: var(--text-subtle);
  font-size: var(--ui-text-xs);
  transition: background-color var(--motion-normal) var(--ease-standard), color var(--motion-normal) var(--ease-standard);
}
.action-item:hover { background: var(--hover-bg); color: var(--text-emphasize); }

.sidebar-resizer {
  position: relative;
  flex: 0 0 var(--layout-resizer-hit-width);
  width: var(--layout-resizer-hit-width);
  height: calc(100% - 32px);
  margin: 16px 0;
  border-radius: 4px;
  cursor: col-resize;
}
.sidebar-resizer::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--layout-resizer-line-width);
  height: 100%;
  transform: translateX(-50%);
  background: var(--line-light);
  opacity: 0;
  transition: opacity 150ms cubic-bezier(.2, 0, 0, 1);
}
.sidebar-resizer:hover::after, body.resizing .sidebar-resizer::after { opacity: 1; }
body.resizing .sidebar-resizer::after { background: var(--general-theme-primary); }

.resizable-layout__main-rail { display: flex; flex: 0 0 auto; min-width: 0; }
.resizable-layout__main {
  flex: 1;
  overflow-y: hidden;
  width: var(--memo-column-width);
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px var(--home-content-gutter) 0;
}
.topbar-left { display: flex; align-items: center; min-width: 0; flex: 1; }
.mobile-menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 4px;
  color: var(--text-subtle);
  border-radius: var(--corner-radius-medium);
}
.mobile-menu svg { width: 16px; height: 16px; }
.mobile-menu:hover { background: var(--hover-bg); color: var(--text-emphasize); }
.breadcrumb-nav {
  display: flex;
  align-items: center;
  height: 36px;
  margin-left: -6px;
  color: var(--text-regular);
  font-size: var(--ui-text-md);
  white-space: nowrap;
  overflow: hidden;
}
.breadcrumb-nav > span {
  min-width: 0;
  height: 32px;
  padding: 6px;
  border-radius: var(--corner-radius-medium);
  overflow: hidden;
  text-overflow: ellipsis;
}
.breadcrumb-nav > span.clickable { cursor: pointer; }
.breadcrumb-nav > span.clickable:hover { background: var(--hover-bg); color: var(--text-emphasize); }
.breadcrumb-nav .sep { flex-shrink: 0; padding: 0 3px; color: var(--line-regular); }

.search-shell {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 280px;
  min-width: 160px;
  height: 36px;
}
.search-shell .search-icon {
  position: absolute;
  left: 10px;
  width: 16px;
  height: 16px;
  color: var(--text-subtle);
  pointer-events: none;
}
#search {
  width: 100%;
  height: 36px;
  padding: 0 34px 0 32px;
  border: 1px solid transparent;
  border-radius: var(--corner-radius-large);
  background: var(--gray90);
  color: var(--text-regular);
  font: inherit;
  font-size: var(--ui-text-md);
  font-variant-numeric: tabular-nums;
}
#search::placeholder { color: var(--text-subtle); }
#search:hover { border-color: var(--line-light); }
#search:focus { background: var(--backgrounds-primary); border-color: var(--line-light); color: var(--text-regular); }
html[data-theme='dark'] #search { background: #2e2e2e; }
html[data-theme='dark'] #search:focus { background: var(--backgrounds-primary); color: var(--text-regular); }
#clearSearch {
  position: absolute;
  right: 5px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--text-subtle);
  border-radius: var(--corner-radius-small);
}
#clearSearch.show { display: inline-flex; }
#clearSearch:hover { background: var(--hover-bg); color: var(--text-regular); }
#clearSearch svg { width: 16px; height: 16px; }

.memos {
  height: 600px;
  padding: 0 var(--home-content-gutter) var(--home-content-gutter);
  padding-right: calc(var(--home-content-gutter) - var(--home-scrollbar-gutter-offset));
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.memos::-webkit-scrollbar { width: 5px !important; height: 5px !important; background: transparent; }
.memos::-webkit-scrollbar-thumb { background: transparent; transition: background-color .3s linear; }
.memos:hover::-webkit-scrollbar-thumb { background: rgba(170, 170, 170, .2); }
.input { padding: var(--home-content-gutter); }
.memos-list { display: flex; flex-direction: column; gap: var(--home-content-gap); }
.list-enter { animation: memo-fade-in .2s ease-out; }
@keyframes memo-fade-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }
.list-end {
  display: none;
  padding: 20px 0;
  color: var(--text-subtle);
  font-size: var(--ui-text-xs);
  text-align: center;
}
.list-end.show { display: block; }

.input-box {
  position: relative;
  background: var(--editor-menu-bar-bg);
  border: 1px solid var(--blurd-border-color);
  border-radius: var(--corner-radius-large);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input-box:hover { border-color: #d3ecdd; }
html[data-theme='dark'] .input-box:hover { border: 1px solid var(--green); }
.input-box.focused { border-color: var(--green) !important; }
html[data-theme='dark'] .input-box.blurd { border-color: rgba(232, 232, 232, 0.2); }
.editor-content {
  padding: var(--padding-medium);
  background: var(--defaultBg);
  color: var(--memoContentColor);
  border-top-left-radius: var(--corner-radius-large);
  border-top-right-radius: var(--corner-radius-large);
}
.editor {
  min-height: 14px;
  max-height: calc(50vh);
  overflow-y: auto;
  font-size: var(--memo-content-font-size);
  line-height: var(--memo-content-line-height);
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  caret-color: currentColor;
}
.editor.editor-expanded {
  min-height: min(calc(90vh - 120px), 680px);
  max-height: min(calc(90vh - 120px), 680px);
}
.editor:empty::before {
  content: attr(data-placeholder);
  color: var(--text-subtle);
  pointer-events: none;
}
.editor .hashtag {
  display: inline-block;
  padding: var(--memo-inline-pill-padding-y) var(--memo-inline-pill-padding-x);
  border-radius: var(--memo-inline-pill-radius);
  background: var(--tagBg);
  color: var(--tagColor);
  font-size: var(--memo-tag-font-size);
  line-height: var(--memo-inline-pill-line-height);
  white-space: nowrap;
}
.editor .at-link { color: var(--atColor); }
.attached-files { display: none; flex-wrap: wrap; gap: var(--memo-files-gap); margin-top: 10px; }
.attached-files.has-files { display: flex; }
.attached-file { position: relative; }
.attached-file img { display: block; width: 110px; height: 110px; border-radius: var(--corner-radius-medium); object-fit: cover; outline: 1px solid rgba(0,0,0,.1); outline-offset: -1px; cursor: zoom-in; }
html[data-theme='dark'] .attached-file img { outline-color: rgba(255,255,255,.1); }
.attached-file .remove {
  position: absolute;
  top: 2px;
  right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: var(--white100);
  font-size: 12px;
}

.editor-menu-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  background: var(--editor-menu-bar-bg);
  border-bottom-left-radius: var(--corner-radius-large);
  border-bottom-right-radius: var(--corner-radius-large);
}
.editor-menu-bar .pin-left { position: absolute; left: 10px; bottom: 8px; height: 28px; display: flex; align-items: center; }
.menu-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0 1.5px;
  border-radius: var(--corner-radius-medium);
  color: var(--editorColor);
  transition: background-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard);
}
.menu-tool svg { width: 18px; height: 18px; }
.menu-tool:hover { background: var(--hover-bg); color: var(--editorActiveColor); }
.input-box.focused .menu-tool { color: var(--text-subtle); }
.input-box.focused .menu-tool:hover { color: var(--editorActiveColor); }
.editor-expand-wrap {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 40px;
  height: 40px;
}
.editor-expand-arc {
  position: absolute;
  top: 5px;
  right: 5px;
  color: var(--text-subtle);
  opacity: .5;
  pointer-events: none;
  transition: opacity .2s ease;
}
.editor-expand-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--text-subtle);
  border-radius: var(--corner-radius-medium);
  transition: color .2s ease, background-color .2s ease;
}
.editor-expand-btn:hover { background: var(--hover-bg); }
.editor-expand-btn .expand-icon .arrow1,
.editor-expand-btn .expand-icon .arrow2,
.editor-expand-btn .collapse-icon {
  opacity: 0;
  transition: opacity .2s ease;
}
.editor-expand-btn:hover .expand-icon .arrow1,
.editor-expand-btn:hover .expand-icon .arrow2,
.editor-expand-wrap.expanded .editor-expand-btn .collapse-icon {
  opacity: 1;
}
.editor-expand-wrap.expanded .editor-expand-arc,
.editor-expand-wrap.expanded .editor-expand-btn .expand-icon {
  display: none;
}
.editor-menu-bar .pin-right {
  position: absolute;
  right: 10px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 28px;
  line-height: 1;
}
.char-count {
  display: inline-flex;
  align-items: center;
  height: 28px;
  color: var(--text-subtle);
  font-size: var(--ui-text-sm);
  font-variant-numeric: tabular-nums;
}
.char-count.char-count--sent { color: var(--green); }
.cancel-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--corner-radius-medium);
  color: var(--text-subtle);
  font-size: var(--ui-text-sm);
  transition: background-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard);
}
.cancel-btn:hover { background: var(--hover-bg); color: var(--text-emphasize); }
.tray-send { position: relative; display: inline-block; width: 44px; height: 28px; transition: transform 150ms cubic-bezier(.2,0,0,1); }
.tray-send:active { transform: scale(.96); transition-duration: 100ms; }
.tray-send svg { position: absolute; inset: 0; display: block; transition: opacity 150ms cubic-bezier(.2,0,0,1), transform 150ms cubic-bezier(.2,0,0,1), filter 150ms cubic-bezier(.2,0,0,1); }
.tray-send .send-plane { color: var(--editorColor); }
.tray-send.submitable .send-plane { color: var(--green); }
.tray-send.submitable:hover .send-plane { color: #2bba6d; }
.tray-send .sent-icon { color: var(--green); opacity: 0; transform: scale(.25); filter: blur(4px); pointer-events: none; }
.tray-send.is-sent .sent-icon { opacity: 1; transform: scale(1); filter: blur(0); }
.tray-send.is-sent .send-plane { opacity: 0; transform: scale(.25); filter: blur(4px); pointer-events: none; }
@media (max-width: 640px) { .char-count:not(.char-count--sent) { display: none; } }
.tag-suggestions {
  position: absolute;
  z-index: 80;
  display: none;
  min-width: 220px;
  max-height: 240px;
  overflow-y: auto;
  padding: var(--menu-padding-medium);
  border: var(--linewidth) solid var(--popover-border);
  border-radius: var(--corner-radius-large);
  background: var(--popover-surface);
  box-shadow: var(--popover-shadow);
  backdrop-filter: var(--popover-backdrop-filter);
}
.tag-suggestions.show { display: block; }
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--menu-item-radius);
  font-size: var(--ui-text-md);
  color: var(--text-regular);
}
.suggestion-item.selected, .suggestion-item:hover { background: var(--hover-bg); color: var(--text-emphasize); }
.suggestion-item .count { margin-left: auto; color: var(--text-subtle); font-size: var(--ui-text-xs); }

.display {
  position: relative;
  overflow: hidden;
  padding: var(--memo-padding, 15px);
  border-radius: var(--corner-radius-large);
  background: var(--defaultBg);
  transition: background-color var(--motion-normal) var(--ease-standard), box-shadow var(--motion-normal) var(--ease-standard);
}
.display:hover { box-shadow: var(--card-hover-shadow); }
.display .header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 20px;
  margin-bottom: 10px;
}
.display .time {
  display: block;
  overflow: hidden;
  color: var(--text-subtle);
  font-size: var(--memo-tag-font-size);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: color var(--motion-normal) var(--ease-standard);
}
.display .time:hover { color: var(--text-regular); }
.display .tools { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: var(--ui-text-sm); }
.menu-trigger-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 4px;
  margin-right: -4px;
  border-radius: var(--corner-radius-medium);
  color: var(--text-subtle);
  transition: background-color var(--motion-normal) var(--ease-standard), color var(--motion-normal) var(--ease-standard);
}
.menu-trigger-content:hover, .opened .menu-trigger-content { background: var(--hover-bg); color: var(--text-regular); }
.trigger-icon { width: 16px; height: 16px; flex-shrink: 0; }
.tools-button { display: block; padding: 10px 0 10px 6px; color: var(--text-subtle); transition: color var(--motion-normal) var(--ease-standard); }
.tools-button:hover { color: var(--general-theme-primary); }
.tools-button svg { width: 14px; display: block; }
.display .mainContent { min-width: 0; }
.display .content {
  max-height: 160px;
  overflow: hidden;
  color: var(--memoContentColor);
  font-size: var(--memo-content-font-size);
  letter-spacing: .1px;
  line-height: var(--memo-content-line-height);
  word-break: break-word;
  overflow-wrap: break-word;
}
.display.all .content { max-height: none; overflow: visible; }
.display .tool { margin: 6px 0 0; }
.showBtn,
.hideBtn {
  display: inline-flex;
  align-items: center;
  max-width: max-content;
  margin-left: -6px;
  padding: var(--memo-inline-pill-padding-y) var(--memo-inline-pill-padding-x);
  color: var(--tagColor);
  background: transparent;
  border-radius: 4px;
  box-shadow: none;
  cursor: pointer;
  font-size: var(--memo-tag-font-size);
  line-height: var(--memo-inline-pill-line-height);
  transition: background-color var(--motion-normal) var(--ease-standard), color var(--motion-normal) var(--ease-standard);
}
.showBtn:hover,
.hideBtn:hover,
.showBtn:active,
.hideBtn:active { background: var(--tagBg); }
.display .content mark { padding: 0 1px; border-radius: 2px; background: var(--mark-bg); color: inherit; font-weight: 700; }
.display .content .hashtag {
  display: inline-block;
  margin-right: 2px;
  padding: var(--memo-inline-pill-padding-y) var(--memo-inline-pill-padding-x);
  border-radius: var(--memo-inline-pill-radius);
  background: var(--tagBg);
  color: var(--tagColor);
  font-size: var(--memo-tag-font-size);
  line-height: var(--memo-inline-pill-line-height);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--motion-normal) var(--ease-standard), color var(--motion-normal) var(--ease-standard);
}
.display .content .hashtag:hover { background: var(--tagBgHover); color: var(--tagColorHover); }
.display .content .at-link { color: var(--atColor); }
.files { display: flex; flex-wrap: wrap; gap: var(--memo-files-gap); margin-top: 10px; }
.memo-image-thumb-wrap { flex: 0 0 var(--memo-thumb-size); }
.memo-image-thumb-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--corner-radius-medium);
  outline: 1px solid rgba(0,0,0,.1);
  outline-offset: -1px;
  object-fit: cover;
  cursor: zoom-in;
  transition: filter .2s ease;
}
html[data-theme='dark'] .memo-image-thumb-wrap img { outline-color: rgba(255,255,255,.1); }
.memo-image-thumb-wrap img:hover { filter: brightness(.92); }
.empty-state { padding: 90px 0 40px; color: var(--text-subtle); text-align: center; font-size: var(--ui-text-md); line-height: 2.2; }

.base-menu {
  position: fixed;
  z-index: 5000;
  min-width: 240px;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  padding: var(--menu-padding-medium);
  border: var(--linewidth) solid var(--popover-border);
  border-radius: var(--corner-radius-large);
  background: var(--popover-surface);
  box-shadow: var(--popover-shadow);
  backdrop-filter: var(--popover-backdrop-filter);
}
.base-menu:not(.show) { display: none; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border-radius: var(--menu-item-radius);
  color: var(--text-regular);
  font-size: var(--ui-text-md);
  line-height: 24px;
  transition: background-color var(--motion-normal) var(--ease-standard), color var(--motion-normal) var(--ease-standard);
}
.menu-item:hover { background: var(--hover-bg); color: var(--text-emphasize); }
.menu-item.danger { color: var(--destructive); }
.menu-item.danger:hover { background: rgba(229,72,77,.08); color: var(--destructive); }
.menu-divider { height: 1px; margin: 1.5px 0; background: var(--line-light); }
.menu-group { display: flex; flex-direction: column; gap: 2px; padding: var(--menu-padding-medium); }
.menu-footer-meta {
  display: flex;
  flex-direction: column;
  padding: var(--menu-padding-medium) 12px;
  color: var(--text-subtle);
  font-size: var(--ui-text-xs);
  line-height: 24px;
  cursor: default;
}
.menu-icon { width: 16px; height: 16px; color: currentColor; }

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--black40);
  backdrop-filter: blur(6px) saturate(140%);
}
.modal-mask.show { display: flex; }
.modal {
  width: min(520px, calc(100vw - 40px));
  padding: 24px;
  border: var(--linewidth) solid var(--popover-border);
  border-radius: var(--corner-radius-xlarge);
  background: var(--popover-surface);
  box-shadow: var(--popover-shadow);
}
.modal h3 { margin-bottom: 16px; color: var(--text-emphasize); font-size: var(--ui-text-lg); font-weight: var(--ui-weight-medium); }
.review-card { min-height: 96px; margin-bottom: 16px; padding: 16px; border-radius: var(--corner-radius-large); background: var(--primary-background-color); color: var(--memoContentColor); font-size: var(--memo-content-font-size); line-height: var(--memo-content-line-height); }
.review-card .header { display: flex; align-items: center; justify-content: space-between; height: 20px; margin-bottom: 10px; }
.btn-row { display: flex; justify-content: flex-end; gap: 8px; }
.ghost-btn { min-width: 64px; height: 36px; padding: 0 16px; border-radius: var(--corner-radius-medium); color: var(--text-regular); font-size: var(--ui-text-md); }
.ghost-btn:hover { background: var(--hover-bg); color: var(--text-emphasize); }
.primary-btn { min-width: 64px; height: 36px; padding: 0 16px; border-radius: var(--corner-radius-medium); background: var(--general-theme-primary); color: var(--white100); font-size: var(--ui-text-md); }
.primary-btn:hover { filter: brightness(.96); }

#lightbox { position: fixed; inset: 0; z-index: 7000; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.82); cursor: zoom-out; }
#lightbox.show { display: flex; }
#lightbox img { max-width: 92vw; max-height: 92vh; border-radius: var(--corner-radius-medium); }
.snackbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 9999;
  width: min(480px, calc(100vw - 32px));
  border: var(--linewidth) solid var(--white10);
  border-radius: var(--corner-radius-large);
  background: var(--black60);
  box-shadow: var(--popover-shadow);
  backdrop-filter: var(--popover-backdrop-filter);
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.snackbar.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
html[data-theme='dark'] .snackbar { background: var(--white10); border-color: var(--white20); }
.snackbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 8px 8px 8px 16px; }
.snackbar-message { flex: 1; min-width: 0; }
.snackbar-message p { overflow: hidden; color: var(--white100); font-size: 15px; line-height: 24px; text-overflow: ellipsis; white-space: nowrap; }
.snackbar-close {
  min-width: 32px;
  min-height: 32px;
  padding: 10px;
  border-radius: var(--corner-radius-medium);
  color: var(--green70);
  font-size: 15px;
  font-weight: var(--ui-weight-semibold);
  line-height: 16px;
}
.snackbar-close:hover { background: var(--white10); }

@media (max-width: 640px) {
  .web-container { width: 100%; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 6100;
    width: min(300px, 80%);
    max-width: none;
    margin: 0;
    padding: 0 10px;
    background: #fafafa;
    box-shadow: var(--popover-shadow);
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  html[data-theme='dark'] .sidebar { background: #202020; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-resizer { display: none; }
  .resizable-layout__main { width: 100%; }
  .topbar { padding: 10px var(--home-content-gutter-mobile) 0; }
  .mobile-menu { display: inline-flex; }
  .memos { height: auto; padding: 0 var(--home-content-gutter-mobile) var(--home-content-gutter); padding-right: var(--home-content-gutter-mobile); scrollbar-gutter: auto; }
  .memo-image-thumb-wrap { flex: 0 0 calc(30% - 4px); }
}
@media (min-width: 641px) and (max-width: 880px) {
  .web-container { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .list-enter, .tray-send, .tray-send svg, .sidebar { transition: none !important; animation: none !important; }
}
