﻿:root {
  --bg: #ffffff;
  --panel: #fbfbfa;
  --line: #ececeb;
  --text: #37352f;
  --muted: #787774;
  --hover: #f1f1ef;
  --accent: #0b6bcb;
  --doc-max-width: 820px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Avenir Next", "SF Pro Text", "PingFang SC", "Noto Sans SC", sans-serif;
}

body {
  display: grid;
  grid-template-rows: 54px 1fr auto 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 1px solid var(--line);
  padding: 0 14px;
  gap: 10px;
}

.brand {
  font-size: 28px;
  font-weight: 600;
  color: var(--muted);
}

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 4px;
}

.field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

select,
button {
  height: 30px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 6px;
  padding: 0 10px;
  font-size: 12px;
}

select:hover,
button:hover {
  background: var(--hover);
  border-color: var(--line);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 4px;
  margin-left: auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #e7e6e3;
  background: #fff;
}

.icon-btn .material-symbols-rounded {
  font-size: 18px;
  line-height: 1;
  color: #6d6b67;
}

#shareBtn {
  font-weight: 500;
}

#favoriteBtn,
#moreBtn {
  width: 32px;
  min-width: 32px;
  justify-content: center;
  padding: 0;
}

.notion-more-menu {
  position: fixed;
  right: 14px;
  top: 56px;
  width: min(92vw, 350px);
  max-height: min(76vh, 760px);
  border: 1px solid #e8e7e4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.18);
  z-index: 90;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.import-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 17, 22, 0.28);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.import-panel {
  width: min(96vw, 940px);
  max-height: min(90vh, 780px);
  overflow: auto;
  border: 1px solid #e3e2df;
  border-radius: 14px;
  background: #fff;
  padding: 18px;
}

.history-panel {
  width: min(92vw, 760px);
  min-height: 360px;
  max-height: min(86vh, 760px);
}

.history-list {
  margin-top: 8px;
  max-height: min(70vh, 620px);
  overflow: auto;
  display: grid;
  gap: 8px;
}

.history-toolbar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-layout {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 1fr);
  gap: 12px;
  align-items: start;
}

.history-empty {
  border: 1px dashed #e2e0db;
  border-radius: 12px;
  color: #8f8d88;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.history-item {
  border: 1px solid #e7e5e0;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}

.history-item.is-active {
  border-color: #8db8ff;
  box-shadow: 0 0 0 1px rgba(89, 134, 230, 0.16);
}

.history-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.history-time {
  font-size: 13px;
  color: #34312c;
  font-weight: 600;
}

.history-date {
  font-size: 12px;
  color: #9a9792;
}

.history-page {
  margin-top: 6px;
  font-size: 14px;
  color: #2f2d29;
}

.history-note {
  margin-top: 4px;
  font-size: 12px;
  color: #9a9792;
}

.history-actions {
  margin-top: 8px;
}

.history-actions button {
  height: 30px;
  border: 1px solid #bfd8ff;
  border-radius: 8px;
  background: #eef5ff;
  color: #1f64c0;
  padding: 0 12px;
  font-size: 12px;
}

.history-preview {
  border: 1px solid #e7e5e0;
  border-radius: 12px;
  background: #fff;
  min-height: 220px;
  max-height: min(68vh, 620px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.history-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #efeeea;
}

.history-restore-btn {
  height: 30px;
  border: 1px solid #bbd4ff;
  border-radius: 8px;
  background: #eaf2ff;
  color: #1f64c0;
  font-size: 12px;
  padding: 0 10px;
}

.history-diff {
  overflow: auto;
  padding: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.history-diff-line {
  padding: 4px 8px;
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.history-diff-line.add {
  background: #eaf8ef;
  border-left: 3px solid #31a768;
}

.history-diff-line.del {
  background: #fdeeee;
  border-left: 3px solid #cf4f4f;
}

@media (max-width: 980px) {
  .history-layout {
    grid-template-columns: 1fr;
  }
}

.import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.import-title {
  font-size: 22px;
  font-weight: 600;
  color: #2e2b26;
}

.import-sub {
  margin-top: 4px;
  font-size: 14px;
  color: #77756f;
}

.import-drop-zone {
  margin-top: 14px;
  min-height: 212px;
  border: 1px dashed #3b82f6;
  border-radius: 12px;
  background: #f7fbff;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 10px;
  padding: 16px;
}

.import-drop-zone.is-dragover {
  background: #edf6ff;
  border-color: #2a71d8;
}

.import-drop-zone > .material-symbols-rounded {
  justify-self: center;
  font-size: 32px;
  color: #7ba5db;
}

.import-drop-title {
  font-size: 28px;
  font-weight: 600;
  color: #2f2d29;
}

.import-drop-sub {
  font-size: 22px;
  color: #7e7b76;
}

.import-drop-sub button {
  height: auto;
  border: 0;
  background: transparent;
  color: #1677e8;
  font-size: inherit;
  padding: 0;
}

.import-drop-tip {
  font-size: 19px;
  color: #9a9792;
}

.import-base-title {
  margin-top: 22px;
  font-size: 30px;
  font-weight: 600;
  color: #2d2a25;
}

.import-cards {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.create-panel .import-base-title {
  margin-top: 18px;
}

.create-cards {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.import-card {
  min-height: 112px;
  border: 1px solid #e5e4e1;
  border-radius: 10px;
  background: #fff;
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-areas:
    "icon main"
    "sub sub";
  align-content: center;
  gap: 8px 10px;
  text-align: left;
  padding: 10px 12px;
}

.import-card .material-symbols-rounded {
  grid-area: icon;
  font-size: 20px;
  color: #6f6c67;
}

.import-card-main {
  grid-area: main;
  font-size: 15px;
  font-weight: 600;
  color: #2f2d29;
}

.import-card-sub {
  grid-area: sub;
  font-size: 12px;
  color: #88857f;
}

.import-card:hover {
  border-color: #d7d5d1;
  background: #fafaf8;
}

.menu-search-wrap {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid #ecebea;
}

.menu-config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid #ecebea;
}

.menu-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  font-size: 12px;
  color: #8d8a86;
}

.menu-field select {
  width: 100%;
  height: 30px;
  border: 1px solid #e2e1de;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  color: #38352f;
}

.menu-search-wrap .material-symbols-rounded {
  font-size: 18px;
  color: #a2a09c;
}

#moreMenuSearch {
  width: 100%;
  border: 0;
  outline: none;
  font-size: 14px;
  color: #37352f;
}

#moreMenuSearch::placeholder {
  color: #aaa8a3;
}

.menu-list {
  overflow: auto;
  padding: 8px 6px;
}

.menu-group {
  border-top: 1px solid #f0efed;
  padding-top: 8px;
  margin-top: 8px;
}

.menu-group:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.menu-item {
  min-height: 34px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  cursor: pointer;
  color: #37352f;
  font-size: 14px;
}

.menu-item:hover {
  background: #f2f2f0;
}

.menu-item .icon {
  font-family: "Material Symbols Rounded";
  font-size: 18px;
  color: #73716d;
}

.menu-item .hint {
  font-size: 12px;
  color: #9c9a96;
}

.menu-item .dev {
  color: #b28a39;
  font-size: 12px;
}

.menu-toggle {
  width: 36px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #d9d8d5;
  background: #efefed;
  position: relative;
}

.menu-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform .15s ease;
}

.menu-toggle.on {
  background: #dbeeff;
  border-color: #9fc9f2;
}

.menu-toggle.on::after {
  transform: translateX(14px);
}

.menu-meta {
  border-top: 1px solid #ecebea;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  color: #9d9b97;
}

body.notion-small-text .tiptap-content {
  font-size: 14px;
  line-height: 1.62;
}

body.notion-full-width .tiptap-content {
  --doc-max-width: min(90vw, 1440px);
}

.workspace {
  display: grid;
  grid-template-columns: 304px 1fr;
  min-height: 0;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #f7f7f5;
  padding: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.sidebar-account {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.workspace-btn {
  width: 100%;
  min-height: 36px;
  border: 1px solid #e2e1de;
  border-radius: 10px;
  background: #fff;
  display: grid;
  grid-template-columns: 20px 1fr 16px;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #2f2d29;
}

.workspace-icon {
  font-size: 18px;
  color: #77736e;
}

.login-btn {
  min-width: 62px;
  height: 36px;
  border: 1px solid #dad9d5;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
}

.workspace-menu {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 52px;
  z-index: 80;
  background: #fff;
  border: 1px solid #e4e3e0;
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.16);
  padding: 10px;
}

.workspace-menu-head {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.workspace-menu-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f0efec;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #6d6963;
}

.workspace-menu-title {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 600;
}

.workspace-menu-sub {
  font-size: 13px;
  color: #7f7d78;
}

.workspace-menu-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.workspace-menu-btn {
  height: 30px;
  border: 1px solid #e2e1dd;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #4d4a45;
}

.workspace-menu-list {
  margin: 0;
  padding: 8px 0 0;
  list-style: none;
  border-top: 1px solid #ecebe8;
}

.workspace-menu-list li {
  min-height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 14px;
  color: #44413c;
  cursor: pointer;
}

.workspace-menu-list li:hover {
  background: #f3f3f1;
}

.workspace-menu-list li.active {
  font-weight: 600;
}

.sidebar-quick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.quick-item {
  height: 36px;
  min-width: 36px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #64615c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  padding: 0 9px;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, padding .16s ease;
}

.quick-item.is-active {
  background: #ececea;
  border-color: #e2e1de;
  color: #2f2d29;
  padding: 0 12px;
}

.quick-item .material-symbols-rounded {
  font-size: 18px;
}

.quick-item .quick-label {
  display: none;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1;
}

.quick-item.is-active .quick-label {
  display: inline;
}

.sidebar-section {
  padding: 0 4px 8px;
}

.sidebar-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.sidebar-panel {
  min-height: 100%;
}

.sidebar-title {
  font-size: 13px;
  color: #8b8884;
  margin: 8px 8px 6px;
  font-weight: 600;
}

.page-list,
.outline-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-list li {
  font-size: 14px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  color: #3c3934;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.page-list li::before {
  content: "description";
  font-family: "Material Symbols Rounded";
  font-size: 16px;
  color: #a09f9c;
  line-height: 1;
}

.page-list li.is-active {
  background: #ebebe9;
}

.page-list li:hover {
  background: #efefed;
}

.page-list li .label {
  font-size: 14px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-delete-btn {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #9a9995;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}

.page-delete-btn .material-symbols-rounded {
  font-size: 16px;
  line-height: 1;
}

.page-list li:hover .page-delete-btn,
.page-list li:focus-within .page-delete-btn {
  opacity: 1;
  pointer-events: auto;
}

.page-delete-btn:hover {
  background: #f3e8e8;
  color: #be3b35;
}

.outline-list li {
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  gap: 8px;
  align-items: center;
}

.outline-list li:hover {
  background: var(--hover);
}

.outline-list li::before {
  content: "chevron_right";
  font-family: "Material Symbols Rounded";
  font-size: 14px;
  color: #b0afac;
  line-height: 1;
}

.outline-list .lvl-1 { padding-left: 8px; }
.outline-list .lvl-2 { padding-left: 20px; }
.outline-list .lvl-3 { padding-left: 32px; }
.outline-list .lvl-4 { padding-left: 44px; }
.outline-list .lvl-5 { padding-left: 56px; }
.outline-list .lvl-6 { padding-left: 68px; }

.empty {
  color: #8e8b86;
  font-size: 12px;
  margin: 6px 8px;
}

.list-add-btn {
  width: 100%;
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #76736e;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  padding: 0 8px;
  font-size: 14px;
}

.list-add-btn .material-symbols-rounded {
  font-size: 16px;
}

.list-add-btn:hover {
  background: #efefed;
}

.sidebar-invite {
  margin: 8px 6px 6px;
  padding: 10px 12px;
  border: 1px solid #e3e2de;
  border-radius: 12px;
  background: #fff;
  flex: 0 0 auto;
}

.invite-title {
  font-size: 15px;
  font-weight: 600;
  color: #2f2d28;
}

.invite-desc {
  font-size: 13px;
  color: #85837f;
  margin-top: 2px;
}

.editor-area {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

#editorHost {
  height: 100%;
  background: #fff;
}

/* TipTap shell */
.tiptap-container {
  height: 100%;
  overflow: auto;
  padding: 18px 26px 96px;
}

.tiptap-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(4px);
}

.tiptap-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}

.tiptap-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 6px;
  padding-right: 6px;
  border-right: 1px solid var(--line);
}

.tiptap-toolbar-group:last-child {
  margin-right: 0;
  padding-right: 0;
  border-right: 0;
}

.tiptap-toolbar-btn,
.tiptap-inline-btn,
.tiptap-toolbar-select {
  height: 30px;
  min-width: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1;
}

.tiptap-toolbar-btn:hover,
.tiptap-inline-btn:hover,
.tiptap-toolbar-select:hover,
.tiptap-toolbar-btn.is-active,
.tiptap-inline-btn.is-active {
  background: var(--hover);
  border-color: var(--line);
  color: var(--text);
}

.tiptap-toolbar-btn:disabled,
.tiptap-inline-btn:disabled,
.tiptap-toolbar-select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Hide native file picker control and keep toolbar visual consistency */
.tiptap-image-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

.tiptap-toolbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tiptap-toolbar-icon .material-symbols-rounded {
  font-size: 18px;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 520, "GRAD" 0, "opsz" 20;
}

.tiptap-toolbar-label {
  font-size: 12px;
  color: inherit;
}

.tiptap-toolbar-select-wrap {
  display: inline-flex;
  align-items: center;
}

.tiptap-toolbar-select {
  min-width: 92px;
  appearance: none;
}

.tiptap-toolbar-spacer {
  flex: 1 1 auto;
}

.tiptap-inline-menu {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.08);
}

.tiptap-bubble-menu.tiptap-notion-bubble {
  display: block !important;
  align-items: initial !important;
  gap: 0 !important;
  width: 196px !important;
  min-width: 196px !important;
  max-width: 196px !important;
  max-height: min(70vh, 520px);
  overflow: auto;
  border: 1px solid #dfddd8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.14);
  padding: 6px;
  pointer-events: none;
  box-sizing: border-box;
}

.tiptap-bubble-menu.tiptap-notion-bubble > * {
  pointer-events: auto;
}

.tnb-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
}

.tnb-btn {
  height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #625f5a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.tnb-btn .material-symbols-rounded {
  font-size: 19px;
}

.tnb-btn:hover {
  background: #f3f3f1;
  border-color: #e4e2dd;
}

.tnb-btn.is-active {
  background: #edf4ff;
  border-color: #c6dcff;
  color: #2267c5;
}

.tnb-divider {
  height: 1px;
  background: #ecebe8;
  margin: 8px 0;
}

.tnb-comment {
  width: 100%;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  color: #3f3c36;
  font-size: 14px;
  padding: 0 8px;
}

.tnb-comment:hover {
  background: #f3f3f1;
}

.tnb-comment .material-symbols-rounded {
  font-size: 18px;
  color: #6d6b66;
}

.tnb-comment-compose {
  margin-top: 6px;
  border-top: 1px solid #ecebe8;
  padding-top: 8px;
}

.tnb-comment-input {
  width: 100%;
  min-height: 58px;
  border: 1px solid #e1dfda;
  border-radius: 8px;
  resize: vertical;
  outline: none;
  font-size: 13px;
  color: #38352f;
  padding: 8px;
  line-height: 1.5;
}

.tnb-comment-input:focus {
  border-color: #b9d5fb;
  box-shadow: 0 0 0 2px rgba(47, 140, 255, 0.12);
}

.tnb-comment-actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.tnb-comment-cancel,
.tnb-comment-submit {
  height: 28px;
  border: 1px solid #e1dfda;
  border-radius: 8px;
  background: #fff;
  color: #4f4c47;
  font-size: 12px;
  padding: 0 10px;
}

.tnb-comment-submit {
  background: #eef5ff;
  border-color: #bfdaff;
  color: #1f64c0;
}

.tnb-comment-list {
  margin-top: 8px;
  border-top: 1px solid #ecebe8;
  padding-top: 8px;
  max-height: 180px;
  overflow: auto;
}

.tnb-comment-empty {
  font-size: 12px;
  color: #9a9792;
  padding: 4px 2px;
}

.tnb-comment-item {
  border: 1px solid #ebe9e4;
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 6px;
  background: #fff;
}

.tnb-comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tnb-comment-author {
  font-size: 12px;
  font-weight: 600;
  color: #3f3c36;
}

.tnb-comment-time {
  font-size: 11px;
  color: #9b9893;
}

.tnb-comment-text {
  margin-top: 4px;
  font-size: 13px;
  color: #2f2d29;
  line-height: 1.45;
}

.tnb-comment-quote {
  margin-top: 4px;
  font-size: 12px;
  color: #76736d;
  background: #f7f6f3;
  border-radius: 6px;
  padding: 4px 6px;
}

.tnb-comment-delete {
  margin-top: 5px;
  height: 24px;
  border: 1px solid #e2e0db;
  border-radius: 6px;
  background: #fff;
  color: #8a877f;
  font-size: 11px;
  padding: 0 8px;
}

.tnb-ai {
  margin-top: 6px;
  border-top: 1px solid #ecebe8;
  padding-top: 6px;
}

.tnb-ai-title {
  font-size: 13px;
  color: #87847f;
  margin: 2px 4px 6px;
}

.tnb-ai-item {
  width: 100%;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #2f2d29;
  font-size: 15px;
  text-align: left;
  padding: 0 8px;
}

.tnb-ai-item:hover {
  background: #f3f3f1;
}

.tnb-ai-main {
  width: 100%;
  min-height: 34px;
  border: 1px solid #e4e2dd;
  border-radius: 9px;
  background: #fafaf8;
  color: #5e5b56;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  gap: 8px;
  box-sizing: border-box;
}

.tnb-ai-main-input {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  height: 30px;
  border: 0;
  background: transparent;
  color: #5e5b56;
  font-size: 16px;
  outline: none;
}

.tnb-ai-main-input::placeholder {
  color: #8f8c86;
}

.tnb-ai-main span {
  font-size: 12px;
  color: #a19f9a;
  flex: 0 0 auto;
}

.tiptap-comment-thread {
  position: fixed;
  z-index: 92;
  width: min(92vw, 360px);
  max-height: min(72vh, 460px);
  overflow: auto;
  border: 1px solid #e1dfda;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.16);
  padding: 10px;
}

.tct-head {
  display: grid;
  grid-template-columns: 18px 1fr 22px;
  align-items: center;
  gap: 6px;
  color: #3d3a35;
  font-size: 14px;
  font-weight: 600;
}

.tct-head .material-symbols-rounded {
  font-size: 17px;
  color: #7b7873;
}

.tct-close {
  height: 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #96938e;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

.tct-close:hover {
  background: #f2f2f0;
}

.tct-quote {
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff9df;
  border: 1px solid #f0df98;
  color: #5f4b14;
  font-size: 13px;
  line-height: 1.4;
}

.tct-input {
  margin-top: 8px;
  width: 100%;
  min-height: 60px;
  border: 1px solid #e2e0db;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
  outline: none;
  resize: vertical;
}

.tct-input:focus {
  border-color: #b9d5fb;
  box-shadow: 0 0 0 2px rgba(47, 140, 255, 0.12);
}

.tct-actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
}

.tct-add {
  height: 28px;
  border: 1px solid #bed7ff;
  border-radius: 8px;
  background: #eef5ff;
  color: #1f64c0;
  padding: 0 12px;
  font-size: 12px;
}

.tct-list {
  margin-top: 8px;
  border-top: 1px solid #ecebe8;
  padding-top: 8px;
}

.tct-empty {
  font-size: 12px;
  color: #9b9893;
}

.tct-item {
  border: 1px solid #ebe9e4;
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 6px;
}

.tct-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tct-author {
  font-size: 12px;
  font-weight: 600;
}

.tct-time {
  font-size: 11px;
  color: #9b9893;
}

.tct-text {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
}

.tct-delete {
  margin-top: 5px;
  height: 24px;
  border: 1px solid #e2e0db;
  border-radius: 6px;
  background: #fff;
  color: #87847f;
  font-size: 11px;
  padding: 0 8px;
}

.tiptap-comment-rail {
  position: absolute;
  top: 0;
  right: 16px;
  width: min(34vw, 340px);
  height: 100%;
  overflow: auto;
  z-index: 60;
  pointer-events: none;
}

.tcr-list {
  position: relative;
  min-height: 100%;
  pointer-events: auto;
}

.tcr-card {
  position: absolute;
  left: 0;
  right: 0;
  border: 1px solid #e6e4df;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(16, 24, 40, 0.06);
  padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.tcr-card.is-active {
  border-color: #9cc4f5;
  box-shadow: 0 0 0 2px rgba(47, 140, 255, 0.2), 0 10px 24px rgba(16, 24, 40, 0.12);
}

.tcr-card.is-resolved {
  opacity: 0.7;
}

.tcr-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6f6c67;
  font-size: 13px;
}

.tcr-avatar {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #f2f1ee;
  border: 1px solid #e3e1dc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #7a7671;
}

.tcr-author {
  color: #3f3c36;
  font-weight: 600;
}

.tcr-time {
  color: #9a9792;
}

.tcr-text {
  margin-top: 7px;
  font-size: 16px;
  color: #2f2d29;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.tcr-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tcr-actions button {
  height: 26px;
  border: 1px solid #e2e0db;
  border-radius: 8px;
  background: #fff;
  color: #66635e;
  font-size: 12px;
  padding: 0 8px;
}

.tcr-actions button:hover {
  background: #f4f4f2;
}

.tcr-replies {
  margin-top: 8px;
  border-top: 1px solid #eeece8;
  padding-top: 8px;
}

.tcr-reply {
  padding: 6px 0;
  border-bottom: 1px dashed #efeeeb;
  font-size: 12px;
  color: #4b4842;
}

.tcr-reply:last-child {
  border-bottom: 0;
}

.tcr-reply-author {
  font-weight: 600;
  color: #34312c;
  margin-right: 6px;
}

.tcr-reply-time {
  color: #9b9893;
  font-size: 11px;
}

.tcr-attachments {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tcr-attach-item {
  height: 24px;
  border-radius: 999px;
  border: 1px solid #e2e0db;
  background: #f7f6f3;
  color: #5f5c56;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
}

.tiptap-comment-highlight-layer {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
}

.tch-seg {
  position: fixed;
  background: rgba(255, 221, 79, 0.55);
  border-bottom: 2px solid rgba(220, 172, 0, 0.85);
  border-radius: 2px;
  pointer-events: none;
}

.tch-seg.is-active {
  background: rgba(255, 198, 46, 0.68);
  border-bottom-color: rgba(183, 126, 0, 0.95);
  box-shadow: 0 0 0 1px rgba(255, 198, 46, 0.35);
}

.tiptap-bubble-menu,
.tiptap-floating-menu {
  z-index: 30;
}

.tiptap-floating-menu {
  display: none !important;
}

.tiptap-popover-wrap {
  position: relative;
}

.tiptap-popover {
  min-width: 220px;
  max-width: min(92vw, 360px);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.12);
  display: none;
}

.tiptap-popover-title {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.tiptap-emoji-popover {
  min-width: 280px;
  max-width: min(92vw, 360px);
}

.tiptap-emoji-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tiptap-emoji-tab {
  height: 26px;
  border-radius: 999px;
  border: 1px solid #e3e1dc;
  background: #fff;
  color: #6d6a64;
  font-size: 12px;
  padding: 0 10px;
}

.tiptap-emoji-tab:hover {
  background: #f3f3f1;
}

.tiptap-emoji-tab.is-active {
  background: #eef4ff;
  border-color: #c7dcff;
  color: #1d5fb6;
}

.tiptap-emoji-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
}

.tiptap-emoji-btn {
  height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.tiptap-emoji-btn:hover {
  background: #f3f3f1;
  border-color: #e2e0db;
}

.tiptap-popover-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--text);
  background: #fff;
}

.tiptap-popover-input:focus {
  outline: none;
  border-color: #b8d7f5;
  box-shadow: 0 0 0 2px rgba(11, 107, 203, 0.12);
}

.tiptap-popover-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tiptap-popover-btn {
  height: 30px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 7px;
  padding: 0 10px;
  font-size: 12px;
}

.tiptap-popover-btn:hover {
  background: var(--hover);
}

.tiptap-popover-btn.danger {
  color: #b42318;
  border-color: #f1d6d2;
  background: #fff7f6;
}

.tiptap-popover-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.tiptap-popover-portal {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.tiptap-popover-portal.is-open {
  pointer-events: auto;
}

.tiptap-popover-portal .tiptap-popover {
  position: fixed;
  margin: 0;
  pointer-events: auto;
  display: none;
}

.tiptap-popover-portal.is-open .tiptap-popover {
  display: block;
}

.tiptap-popover-wrap.is-open > .tiptap-popover {
  display: none !important;
}

.tiptap-link-wrap .tiptap-link-popover {
  display: none;
}

.tiptap-link-wrap.is-open .tiptap-link-popover {
  display: block;
}

.tiptap-content .ProseMirror,
.tiptap-content {
  outline: none;
}

.tiptap-content {
  max-width: none;
  width: 100%;
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.tiptap-content .ProseMirror,
.tiptap-content.ProseMirror {
  width: 100%;
  padding: 12px 26px 0;
}

.tiptap-content .ProseMirror > *,
.tiptap-content.ProseMirror > * {
  max-width: var(--doc-max-width);
  margin-left: auto;
  margin-right: auto;
}

.tiptap-content .ProseMirror [data-type="mention"],
.tiptap-content.ProseMirror [data-type="mention"],
.tiptap-content .ProseMirror .mention,
.tiptap-content.ProseMirror .mention {
  display: inline-block;
  border-radius: 6px;
  background: #f2f2f0;
  color: #4b4944;
  padding: 0 6px;
  cursor: pointer;
}

/* Keep image blocks aligned with text column and prevent left drift/overflow */
.tiptap-content .ProseMirror img,
.tiptap-content.ProseMirror img,
.tiptap-content .ProseMirror .image,
.tiptap-content.ProseMirror .image {
  display: block;
  max-width: min(100%, var(--doc-max-width));
  height: auto;
  margin: 10px auto;
}

.tiptap-content h1 {
  font-size: 40px;
  margin: 18px 0 12px;
}

.tiptap-content h1.ignis-title-empty {
  position: relative;
}

.tiptap-content h1.ignis-title-empty::before {
  content: attr(data-title-placeholder);
  color: #d2d0cb;
  pointer-events: none;
  position: absolute;
  left: 0;
  top: 0;
}

.tiptap-content .ProseMirror .is-empty::before {
  content: attr(data-placeholder);
  color: #b7b4ae;
  pointer-events: none;
  position: absolute;
  left: 0;
  top: 0;
  line-height: inherit;
  white-space: nowrap;
}

.tiptap-content .ProseMirror .is-editor-empty::before,
.tiptap-content.ProseMirror .is-editor-empty::before {
  content: attr(data-placeholder);
  color: #b7b4ae;
  pointer-events: none;
  position: absolute;
  left: 0;
  top: 0;
  line-height: inherit;
  white-space: nowrap;
}

.tiptap-content .ProseMirror .is-empty,
.tiptap-content .ProseMirror .is-editor-empty,
.tiptap-content.ProseMirror .is-empty,
.tiptap-content.ProseMirror .is-editor-empty {
  position: relative;
}

.tiptap-content .ProseMirror h1.is-empty,
.tiptap-content .ProseMirror h1.is-editor-empty,
.tiptap-content.ProseMirror h1.is-empty,
.tiptap-content.ProseMirror h1.is-editor-empty {
  min-height: 1.25em;
}

.tiptap-content .ProseMirror p.is-empty,
.tiptap-content .ProseMirror p.is-editor-empty,
.tiptap-content.ProseMirror p.is-empty,
.tiptap-content.ProseMirror p.is-editor-empty {
  min-height: 1.75em;
}

.tiptap-content h2 {
  font-size: 28px;
  margin-top: 24px;
}

.tiptap-content blockquote {
  margin-left: 0;
  border-left: 3px solid #cfd6e8;
  background: #f7f9ff;
  border-radius: 8px;
  padding: 10px 12px;
  color: #4e5565;
}

.tiptap-content details {
  max-width: var(--doc-max-width);
  margin: 10px auto;
  border: 1px solid #e4e2dd;
  border-radius: 10px;
  background: #fbfbfa;
  padding: 6px 10px;
}

.tiptap-content details > summary {
  cursor: pointer;
  color: #3a3833;
  font-weight: 600;
  outline: none;
  user-select: none;
}

.tiptap-content details > *:not(summary) {
  margin-top: 8px;
}

.tiptap-content table {
  width: 100%;
  max-width: var(--doc-max-width);
  margin: 12px auto;
  border-collapse: collapse;
  border: 1px solid #d7d3cb;
  background: #fff;
}

.tiptap-content th,
.tiptap-content td {
  border: 1px solid #dedad2;
  padding: 8px 10px;
  vertical-align: top;
  min-width: 96px;
}

.tiptap-content thead th {
  background: #f5f3ef;
  color: #2d2c29;
  font-weight: 600;
}

.tiptap-content details {
  border-color: #cfc8bb;
  background: #fcfbf8;
}

.tiptap-content details > summary {
  background: #f5f2eb;
  border: 1px solid #ddd5c8;
  border-radius: 8px;
  padding: 6px 10px;
}

.tiptap-content blockquote {
  border-left-width: 4px;
  border-left-color: #5b9cf6;
  background: #eef5ff;
  color: #1e2a3a;
}

.tiptap-drag-handle {
  width: 28px;
  height: 28px;
  border: 1px solid #e5e3de;
  border-radius: 6px;
  background: #fff;
  color: #8e8b86;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
  opacity: 0.9;
  transform: translateX(-12px);
}

.tiptap-drag-handle .material-symbols-rounded {
  font-size: 18px;
  line-height: 1;
}

.tiptap-drag-handle:hover {
  color: #5f5b56;
  border-color: #cfcac2;
  background: #f7f6f3;
}

.tiptap-dragging .tiptap-drag-handle {
  cursor: grabbing;
}

.ignis-dropcursor {
  background: #2f8cff !important;
  border-radius: 3px;
  box-shadow: 0 0 0 2px rgba(47, 140, 255, 0.22);
}

.ignis-dropcursor.prosemirror-dropcursor-block {
  height: 4px !important;
}

.problems {
  border-top: 1px solid var(--line);
  background: #fff;
  max-height: 220px;
  overflow: auto;
}

.problems-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}

#problemsList {
  list-style: none;
  padding: 0;
  margin: 0;
}

#problemsList li {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #f3f3f2;
  cursor: pointer;
  font-size: 12px;
}

#problemsList li:hover {
  background: var(--hover);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  border-radius: 999px;
  font-size: 11px;
  padding: 0 8px;
}

.badge.error {
  background: #ffe7e7;
  color: #a61919;
}

.badge.warning {
  background: #fff2dd;
  color: #8c5200;
}

.loc {
  color: var(--muted);
  font-family: Consolas, monospace;
}

.statusbar {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

body.notion-empty-line-mode .tiptap-floating-menu,
body.notion-empty-line-mode .tiptap-bubble-menu {
  display: none !important;
}

.notion-line-hint {
  position: fixed;
  z-index: 60;
  max-width: min(92vw, 560px);
  height: 34px;
  border-radius: 8px;
  border: 1px solid #ebeae8;
  background: #fff;
  color: #8a8883;
  font-size: 16px;
  line-height: 34px;
  padding: 0 12px;
  pointer-events: none;
  box-shadow: 0 3px 12px rgba(16, 24, 40, 0.06);
}

.notion-ai-panel {
  position: fixed;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(92vw, 840px);
  min-height: 52px;
  border-radius: 12px;
  border: 1px solid #e3e2df;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12);
  padding: 8px 10px;
}

.notion-ai-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #e8e7e4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #73706b;
  background: #fafaf9;
}

.notion-ai-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: 0;
  background: transparent;
  color: #37352f;
  font-size: 24px;
  outline: none;
}

.notion-ai-input::placeholder {
  color: #9f9d98;
}

.notion-ai-send {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #e0dfdc;
  background: #fff;
  color: #8b8984;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.notion-ai-send:hover {
  background: #f3f3f1;
}

.notion-slash-panel {
  position: fixed;
  z-index: 70;
  width: min(92vw, 360px);
  max-height: min(68vh, 520px);
  border-radius: 12px;
  border: 1px solid #e6e5e3;
  background: #fff;
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notion-slash-search {
  height: 40px;
  border: 0;
  border-bottom: 1px solid #ecebea;
  padding: 0 12px;
  font-size: 15px;
  color: #37352f;
  outline: none;
}

.notion-slash-search::placeholder {
  color: #aaa8a3;
}

.notion-slash-list {
  list-style: none;
  margin: 0;
  padding: 8px 6px;
  overflow: auto;
}

.notion-slash-list li {
  min-height: 34px;
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  color: #3a3832;
  cursor: pointer;
}

.notion-slash-list li:hover,
.notion-slash-list li.is-active {
  background: #f2f2f0;
}

.notion-slash-list li .hint {
  color: #9f9d98;
  font-size: 12px;
}

.notion-slash-list li.empty {
  color: #9f9d98;
  cursor: default;
}

.notion-slash-foot {
  border-top: 1px solid #ecebea;
  min-height: 34px;
  font-size: 13px;
  color: #8f8d89;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.notion-at-panel {
  position: fixed;
  z-index: 70;
  width: min(92vw, 420px);
  max-height: min(70vh, 560px);
  border-radius: 12px;
  border: 1px solid #e6e5e3;
  background: #fff;
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notion-at-search {
  height: 40px;
  border: 0;
  border-bottom: 1px solid #ecebea;
  padding: 0 12px;
  font-size: 15px;
  color: #37352f;
  outline: none;
}

.notion-at-search::placeholder {
  color: #aaa8a3;
}

.notion-at-list {
  overflow: auto;
  padding: 8px 8px 10px;
}

.notion-at-group {
  border-bottom: 1px solid #f0efed;
  padding: 6px 0 8px;
}

.notion-at-group:last-child {
  border-bottom: 0;
}

.notion-at-group-title {
  font-size: 12px;
  color: #9b9993;
  line-height: 20px;
  padding: 0 8px;
  margin-bottom: 2px;
}

.notion-at-item {
  min-height: 34px;
  border-radius: 8px;
  padding: 6px 8px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #3a3832;
  cursor: pointer;
}

.notion-at-item:hover,
.notion-at-item.is-active {
  background: #f2f2f0;
}

.notion-at-icon {
  width: 20px;
  text-align: center;
  font-size: 14px;
  opacity: 0.9;
}

.notion-at-main {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notion-at-sub {
  color: #9f9d98;
  font-size: 12px;
  white-space: nowrap;
}

.notion-at-empty {
  color: #9f9d98;
  font-size: 13px;
  padding: 8px 10px;
}

.notion-at-foot {
  border-top: 1px solid #ecebea;
  min-height: 34px;
  font-size: 13px;
  color: #8f8d89;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.notion-mention-menu {
  position: fixed;
  z-index: 75;
  min-width: 220px;
  max-width: min(92vw, 280px);
  border: 1px solid #e5e3df;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);
  overflow: hidden;
}

.notion-mention-menu-head {
  min-height: 36px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #efeeec;
  color: #3a3832;
  font-size: 13px;
}

.notion-mention-menu-head .icon {
  width: 18px;
  text-align: center;
}

.notion-mention-menu-actions {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notion-mention-menu-actions button {
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3a3832;
  font-size: 13px;
  text-align: left;
  padding: 0 10px;
}

.notion-mention-menu-actions button:hover {
  background: #f3f3f1;
}

.hidden {
  display: none !important;
}

/* Keep action chrome non-selectable for cleaner UX */
.topbar,
.top-actions,
.notion-more-menu,
.sidebar,
.sidebar-quick,
.workspace-menu,
.import-panel,
.tiptap-toolbar,
.tiptap-inline-menu,
.notion-line-hint,
.notion-ai-panel,
.notion-slash-panel,
.notion-at-panel,
.notion-mention-menu,
.problems-head {
  -webkit-user-select: none;
  user-select: none;
}

/* But preserve selection in editable/input areas */
input,
textarea,
select,
.tiptap-content,
.tiptap-content .ProseMirror,
#editorHost {
  -webkit-user-select: text;
  user-select: text;
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .tiptap-container {
    padding: 14px 12px 86px;
  }

  .tiptap-content {
    max-width: 100%;
    font-size: 15px;
  }

  .import-cards {
    grid-template-columns: 1fr 1fr;
  }

  .create-cards {
    grid-template-columns: 1fr 1fr;
  }

  .import-drop-title {
    font-size: 20px;
  }

  .import-drop-sub {
    font-size: 16px;
  }

  .import-drop-tip {
    font-size: 14px;
  }

  .import-base-title {
    font-size: 20px;
  }
}



