.ProseMirror {
  scroll-behavior: smooth !important;
  color: #202124;
  background: #fff;
  caret-color: currentColor;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}

/* ページレイアウトモードだけ適用 */
.page-layout .ProseMirror {
  padding: 48px 56px !important;
  min-height: 1056px;
}

.collaborative-editor-container * {
  scroll-behavior: smooth !important;
}

.ProseMirror p {
  margin: 0;
  line-height: 1.0;
}

.ProseMirror p + p {
  margin-top: 0.25em;
}

.ProseMirror p:last-child {
  margin-bottom: 0;
}

.ProseMirror p.is-empty,
.ProseMirror p:has(br:only-child) {
  min-height: 1.5em;
}

/* Table styling with black borders */
.ProseMirror table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 1rem 0 !important;
  background: #fff !important;
  border: 1px solid #b5bbc4 !important;
  table-layout: auto !important;
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
}

.ProseMirror table th,
.ProseMirror table td {
  padding: 8px 6px !important;
  min-width: 80px !important;
  max-width: none !important;
  vertical-align: top !important;
  height: auto !important;
}

.ProseMirror table tr {
  height: auto !important;
  min-height: 0 !important;
}
.ProseMirror table th {
  font-weight: 600 !important;
  color: #3c4043 !important;
}

.ProseMirror table .selectedCell {
  position: relative !important;
  background-image: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.ProseMirror table .selectedCell::after {
  content: none !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  border: none !important;
}

.ProseMirror a {
  color: #1a73e8 !important;
  text-decoration: underline !important;
}

/* Images */
.ProseMirror img {
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  transition: box-shadow .2s ease, border-color .2s ease !important;
}

.ProseMirror img:hover,
.ProseMirror img.ProseMirror-selectednode {
  border-color: #1a73e8 !important;
  box-shadow: 0 0 0 2px rgba(26,115,232,.15) !important;
}

/* Highlight */
.ProseMirror mark[data-color] {
  padding: 2px 0 !important;
  border-radius: 2px !important;
}

.ProseMirror .highlight {
  padding: 2px 0 !important;
  border-radius: 2px !important;
}

/* Toolbar helpers */
.color-picker-container {
  position: relative !important;
  z-index: 100000 !important;
}

.color-picker-dropdown {
  position: absolute !important;
  z-index: 99999 !important;
  background: white !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  min-width: 200px !important;
  top: 100% !important;
  left: 0 !important;
  margin-top: 4px !important;
  padding: 12px !important;
}

.color-picker-native-input {
  width: 44px !important;
  height: 36px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  cursor: pointer !important;
}

.color-picker-native-input::-moz-color-swatch {
  -webkit-appearance: auto !important;
  appearance: auto !important;
}

.editor-toolbar {
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin;
  position: relative !important;
  z-index: 100000 !important;;
}

/* fullscreen中はツールバーの横スクロールよりプルダウン表示を優先する */
.collaborative-editor-fullscreen .editor-toolbar,
.fullscreen .editor-toolbar,
body:fullscreen .editor-toolbar {
  overflow-x: visible !important;
  overflow-y: visible !important;
}

.editor-toolbar > div {
  min-width: max-content !important;
}

/* Fullscreen時にカラーパレットやプルダウンが背面に隠れないようにする */
.color-picker-dropdown,
.toolbar-dropdown,
.font-color-palette,
.font-size-dropdown,
.font-family-dropdown,
.editor-dropdown-menu,
[data-radix-popper-content-wrapper],
.tippy-box {
  z-index: 100001 !important;
}

/* TOC */
.toc-button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  font-weight: 400 !important; /* ← ここ追加 */
}

.toc-button:hover {
  transform: translateX(3px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toc-button:active {
  transform: translateX(1px);
}

.toc-button.active {
  transform: translateX(4px);
  box-shadow: 0 4px 8px rgba(214, 190, 155, 0.3);
}

.toc-button.active::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.2s ease-in-out;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Typography */
.ProseMirror h1 {
  font-size: 2rem !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
  margin: 1.6rem 0 0.9rem !important;
  color: #202124 !important;
}

.ProseMirror h2 {
  font-size: 1.5rem !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  margin: 1.35rem 0 0.8rem !important;
  color: #202124 !important;
}

.ProseMirror h3 {
  font-size: 1.25rem !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  margin: 1.15rem 0 0.7rem !important;
  color: #202124 !important;
}

.ProseMirror h4 {
  font-size: 1.1rem !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  margin: 1rem 0 0.6rem !important;
  color: #202124 !important;
}

.ProseMirror h5,
.ProseMirror h6 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
  margin: 0.9rem 0 0.55rem !important;
  color: #202124 !important;
}

.ProseMirror ul,
.ProseMirror ol {
  margin: 0.85rem 0 !important;
  padding-left: 2rem !important;
}

.ProseMirror ul[data-list-style-type="disc"] {
  list-style-type: disc !important;
}

.ProseMirror ul[data-list-style-type="circle"] {
  list-style-type: circle !important;
}

.ProseMirror ul[data-list-style-type="square"] {
  list-style-type: square !important;
}

.ProseMirror ol[data-list-style-type="decimal"] {
  list-style-type: decimal !important;
}

.ProseMirror ol[data-list-style-type="lower-alpha"] {
  list-style-type: lower-alpha !important;
}

.ProseMirror ol[data-list-style-type="upper-alpha"] {
  list-style-type: upper-alpha !important;
}

.ProseMirror ol[data-list-style-type="lower-roman"] {
  list-style-type: lower-roman !important;
}

.ProseMirror ol[data-list-style-type="upper-roman"] {
  list-style-type: upper-roman !important;
}

.ProseMirror ul[data-type="taskList"] {
  list-style: none !important;
  padding-left: 0.6rem !important;
  margin: 0.85rem 0 !important;
}

.ProseMirror ul[data-type="taskList"] li {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.7rem !important;
/*  margin: 0.45rem 0 !important; */
}

.ProseMirror ul[data-type="taskList"] li > label {
  margin-top: 0.22rem !important;
  flex: 0 0 auto !important;
}

.ProseMirror ul[data-type="taskList"] li > label input {
  width: 16px !important;
  height: 16px !important;
  appearance: none !important;
  -webkit-appearance: none !important;

  width: 16px !important;
  height: 16px !important;

  border: 1px solid #5f6368 !important;
  border-radius: 3px !important;
  background: #fff !important;

  position: relative !important;
  cursor: pointer !important;
}

.ProseMirror ul[data-type="taskList"] li > label input:checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #5f6368;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ProseMirror ul[data-type="taskList"] li > div {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.ProseMirror ul[data-type="taskList"] li[data-checked="true"] > div {
  color: #5f6368 !important;
  text-decoration: line-through !important;
}
.ProseMirror ul[data-list-style-type="disc"] {
  list-style-type: disc !important;
}

.ProseMirror ul[data-list-style-type="circle"] {
  list-style-type: circle !important;
}

.ProseMirror ul[data-list-style-type="square"] {
  list-style-type: square !important;
}

.ProseMirror ol[data-list-style-type="decimal"] {
  list-style-type: decimal !important;
}

.ProseMirror ol[data-list-style-type="lower-alpha"] {
  list-style-type: lower-alpha !important;
}

.ProseMirror ol[data-list-style-type="upper-alpha"] {
  list-style-type: upper-alpha !important;
}

.ProseMirror ol[data-list-style-type="lower-roman"] {
  list-style-type: lower-roman !important;
}

.ProseMirror ol[data-list-style-type="upper-roman"] {
  list-style-type: upper-roman !important;
}

.ProseMirror li {
  line-height: 1.35 !important;
  margin: 0.08rem 0 !important;
}

.ProseMirror li > p {
  margin: 0 !important;
}
/*
.ProseMirror ul li::marker,
.ProseMirror ol li::marker {
  color: #5f6368 !important;
}

.ProseMirror ol li::marker {
  font-variant-numeric: tabular-nums !important;
  font-weight: 500 !important;
}
*/
.ProseMirror ul li::marker,
.ProseMirror ol li::marker {
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}

.ProseMirror li[style]::marker {
  font-family: inherit !important;
  font-size: inherit !important;
  color: inherit !important;
}


.ProseMirror ol ol,
.ProseMirror ul ol {
  margin-left: 1.5rem !important;
  padding-left: 1.25rem !important;
}

.ProseMirror ul ul,
.ProseMirror ol ul {
  margin-left: 0 !important;
  padding-left: 1.5rem !important;
}

.ProseMirror ul ul ul,
.ProseMirror ul ul ol,
.ProseMirror ul ol ul,
.ProseMirror ol ul ul,
.ProseMirror ol ol ul,
.ProseMirror ol ol ol {
  padding-left: 1.35rem !important;
}

.ProseMirror ul[data-type="taskList"] li > label input {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  accent-color: #1a73e8 !important;
  cursor: pointer !important;
  display: block !important;
  flex: 0 0 18px !important;
}

.ProseMirror ul[data-type="taskList"] li > label {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  flex: 0 0 18px !important;
  width: 18px !important;
  min-width: 18px !important;
  margin-top: 0.0em !important;
  line-height: 1 !important;
}

.ProseMirror ul[data-type="taskList"] li > div > p:first-child,
.ProseMirror ul[data-type="taskList"] li > div > div:first-child,
.ProseMirror ul[data-type="taskList"] li > div {
  margin-top: 0 !important;
}

.ProseMirror ul[data-type="taskList"] li > div {
  line-height: 1.72 !important;
}

.ProseMirror ul[data-type="taskList"] li > div > p {
  margin: 0 !important;
}

.ProseMirror ul[data-type="taskList"] li[data-checked="true"] > div {
  opacity: 0.92 !important;
}

.ProseMirror ul ul,
.ProseMirror ul ol,
.ProseMirror ol ul,
.ProseMirror ol ol {
  margin-top: 0.35rem !important;
  margin-bottom: 0.35rem !important;
}

.ProseMirror ul[data-type="taskList"] li[data-checked="true"] > div > p,
.ProseMirror ul[data-type="taskList"] li[data-checked="true"] > div {
  color: #5f6368 !important;
  text-decoration: line-through !important;
}

.ProseMirror blockquote {
  margin: 1rem 0 !important;
  padding: 0.75rem 1rem !important;
  border-left: 3px solid #dadce0 !important;
  background: #f8f9fa !important;
  color: #3c4043 !important;
  font-style: normal !important;
  border-radius: 0 4px 4px 0 !important;
}

.ProseMirror hr {
  border: 0 !important;
  border-top: 1px solid #b5bbc4 !important;
  margin: 1.25rem 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.ProseMirror code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: 0.9rem !important;
  background: #f1f3f4 !important;
  color: #b31412 !important;
  padding: 0.12rem 0.3rem !important;
  border-radius: 4px !important;
}

.ProseMirror pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: 0.9rem !important;
  background: #f8f9fa !important;
  color: #202124 !important;
  border: 1px solid #dadce0 !important;
  padding: 1rem !important;
  border-radius: 8px !important;
  margin: 1rem 0 !important;
  overflow-x: auto !important;
}

/* Drag */
.editor-drag-active {
  border: 2px dashed #3b82f6 !important;
  background-color: rgba(59, 130, 246, 0.05) !important;
}

.drag-overlay {
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Context menu unified buttons */
.context-menu-btn {
  min-height: 36px !important;
  border-radius: 8px !important;
  border: 1px solid #dfe3e7 !important;
  background: #ffffff !important;
  color: #3c4043 !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  transition:
	background-color 0.15s ease,
	border-color 0.15s ease,
	color 0.15s ease,
	box-shadow 0.15s ease !important;
}

.context-menu-btn:hover {
  background: #f1f3f4 !important;
  border-color: #d0d7de !important;
}

.context-menu-btn:disabled {
  background: #f8f9fa !important;
  color: #9aa0a6 !important;
  border-color: #eceff1 !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

.context-menu-btn-active {
  background: #e8f0fe !important;
  color: #1a73e8 !important;
  border-color: #aecbfa !important;
}

.context-menu-btn-danger {
  color: #d93025 !important;
}

.context-menu-btn-danger:hover {
  background: #fce8e6 !important;
  border-color: #f6c7c3 !important;
}

.context-menu-btn-danger:disabled {
  color: #e6b8b3 !important;
}

/* Table resize UX */
.ProseMirror .tableWrapper {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  margin: 1rem 0 !important;
  padding-bottom: 2px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: block !important;
  box-sizing: border-box !important;
}

.ProseMirror table {
  min-width: 100% !important;
  max-width: none !important;
}

.ProseMirror table th,
.ProseMirror table td {
  position: relative !important;
}
.ProseMirror td,
.ProseMirror th {
  word-break: normal !important;
  overflow-wrap: normal !important;
  white-space: normal !important;
}

.ProseMirror .column-resize-handle {
  position: absolute !important;
  top: -1px !important;
  right: -4px !important;
  bottom: -1px !important;
  width: 4px !important;
  background: #1a73e8 !important;
  border-radius: 9999px !important;
  opacity: 0 !important;
  transition: opacity 0.15s ease !important;
  pointer-events: auto !important;
  z-index: 5 !important;
}


.ProseMirror.resize-cursor {
  cursor: col-resize !important;
}

.ProseMirror.resize-cursor * {
  cursor: col-resize !important;
}
 
/* 行リサイズ中/ホバー中は、列リサイズ用カーソル指定より強く上書きする */
.ProseMirror.row-resize-active {
  cursor: row-resize !important;
}

.ProseMirror.row-resize-active * {
  cursor: row-resize !important;
}

/* 列側の .resize-cursor が残っていても、行側を優先 */
.ProseMirror.resize-cursor.row-resize-active,
.ProseMirror.resize-cursor.row-resize-active * {
  cursor: row-resize !important;
}

body.row-resize-active,
body.row-resize-active * {
  cursor: row-resize !important;
}

body.row-resize-active .ProseMirror .column-resize-handle,
.ProseMirror.row-resize-active .column-resize-handle {
  opacity: 0 !important;
  pointer-events: none !important;
}

tr[data-row-resize-hover="true"] .column-resize-handle,
tr[data-row-resize-dragging="true"] .column-resize-handle {
  opacity: 0 !important;
  pointer-events: none !important;
}


/* Toolbar unified styles */
.toolbar-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 0.5rem !important;
  padding: 0.5rem 0.75rem !important;
  width: max-content !important;
  min-width: 100% !important;
  white-space: nowrap !important;
}

.toolbar-segment {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  padding: 0.5rem 0.625rem !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 0.5rem !important;
  background: #f8f9fa !important;
}

.toolbar-segment-label {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #5f6368 !important;
}

.toolbar-btn {
  height: 2.25rem !important;
  border-radius: 0.375rem !important;
  border: 1px solid #dadce0 !important;
  background: #fff !important;
  color: #3c4043 !important;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease !important;
}

.toolbar-btn:hover {
  background: #f1f3f4 !important;
}

.toolbar-btn-active {
  background: #e8f0fe !important;
  color: #1a73e8 !important;
  border-color: #aecbfa !important;
}

.toolbar-btn-danger {
  background: #ef4444 !important;
  color: #fff !important;
  border-color: #ef4444 !important;
}

.toolbar-btn-danger:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}

.toolbar-btn-warn {
  background: #f59e0b !important;
  color: #fff !important;
  border-color: #f59e0b !important;
}

.toolbar-btn-warn:hover {
  background: #d97706 !important;
  border-color: #d97706 !important;
}

.toolbar-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.375rem !important;
  padding: 0.375rem 0.625rem !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 9999px !important;
  background: #fff !important;
  color: #5f6368 !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}

tr[data-row-resize-dragging="true"] > td,
tr[data-row-resize-dragging="true"] > th {
  background-image: none !important;
}
tr[data-row-resize-hover="true"] > td,
tr[data-row-resize-hover="true"] > th {
  position: relative;
}

tr[data-row-resize-hover="true"] > td::after,
tr[data-row-resize-hover="true"] > th::after {
  content: none !important;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  border-bottom: none !important;
  pointer-events: none;
}

tr[data-row-resize-dragging="true"] > td,
tr[data-row-resize-dragging="true"] > th,
tr[data-row-resize-dragging="true"] > td::before,
tr[data-row-resize-dragging="true"] > th::before,
tr[data-row-resize-dragging="true"] > td::after,
tr[data-row-resize-dragging="true"] > th::after {
  background-image: none !important;
  box-shadow: none !important;
}

tr[data-row-resize-dragging="true"] > td::before,
tr[data-row-resize-dragging="true"] > th::before {
  content: none !important;
}

tr[data-row-resize-dragging="true"][data-row-resize-hover="true"] > td::after,
tr[data-row-resize-dragging="true"][data-row-resize-hover="true"] > th::after {
  content: none !important;
}

tr[data-row-resize-dragging="true"] > td,
tr[data-row-resize-dragging="true"] > th {
  position: relative;;
}

tr[data-row-resize-dragging="true"] > td::after,
tr[data-row-resize-dragging="true"] > th::after {
  content: none !important;
}


.ProseMirror ul[data-type="taskList"] {
  list-style: none !important;
  padding-left: 0.6rem !important;
  margin: 0.85rem 0 !important;
}

.ProseMirror ul[data-type="taskList"] li {
  display: flex !important;
  align-items: center !important;
  gap: 0.7rem !important;
  margin: 0.2rem 0 !important;
  line-height: 1.72 !important;
}

.ProseMirror ol[data-list-style-type="decimal"],
.ProseMirror ol[data-list-style-type="lower-alpha"],
.ProseMirror ol[data-list-style-type="upper-alpha"],
.ProseMirror ol[data-list-style-type="lower-roman"],
.ProseMirror ol[data-list-style-type="upper-roman"],
.ProseMirror ol:not([data-list-style-type]) {
  counter-reset: editor-ordered-list !important;
  list-style: none !important;
  list-style-position: outside !important;
  margin-left: 0 !important;
  padding-left: 1.5em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] > li,
.ProseMirror ol[data-list-style-type="lower-alpha"] > li,
.ProseMirror ol[data-list-style-type="upper-alpha"] > li,
.ProseMirror ol[data-list-style-type="lower-roman"] > li,
.ProseMirror ol[data-list-style-type="upper-roman"] > li,
.ProseMirror ol:not([data-list-style-type]) > li {
  counter-increment: editor-ordered-list !important;
  position: relative !important;
  padding-left: 1.5em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] > li::before,
.ProseMirror ol:not([data-list-style-type]) > li::before {
  content: counter(editor-ordered-list, decimal) "." !important;
}

.ProseMirror ol[data-list-style-type="lower-alpha"] > li::before {
  content: counter(editor-ordered-list, lower-alpha) "." !important;
}

.ProseMirror ol[data-list-style-type="upper-alpha"] > li::before {
  content: counter(editor-ordered-list, upper-alpha) "." !important;
}

.ProseMirror ol[data-list-style-type="lower-roman"] > li::before {
  content: counter(editor-ordered-list, lower-roman) "." !important;
}

.ProseMirror ol[data-list-style-type="upper-roman"] > li::before {
  content: counter(editor-ordered-list, upper-roman) "." !important;
}

.ProseMirror ol[data-list-style-type="decimal"] > li::before,
.ProseMirror ol[data-list-style-type="lower-alpha"] > li::before,
.ProseMirror ol[data-list-style-type="upper-alpha"] > li::before,
.ProseMirror ol[data-list-style-type="lower-roman"] > li::before,
.ProseMirror ol[data-list-style-type="upper-roman"] > li::before,
.ProseMirror ol:not([data-list-style-type]) > li::before {
  position: absolute !important;
  left: 0 !important;
  min-width: 1.5em !important;
  text-align: left !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}

/* ===== Google Docs風：ネストごとに番号タイプ変更 ===== */

/* 1階層（decimal） */
.ProseMirror ol > li::before {
  content: counter(editor-ordered-list, decimal) "." !important;
}

/* 2階層（alpha） */
.ProseMirror ol ol > li::before {
  content: counter(editor-ordered-list, lower-alpha) "." !important;
}

/* 3階層（roman） */
.ProseMirror ol ol ol > li::before {
  content: counter(editor-ordered-list, lower-roman) "." !important;
}

/* 4階層（decimal） */
.ProseMirror ol ol ol ol > li::before {
  content: counter(editor-ordered-list, decimal) "." !important;
}

/* 5階層（alpha） */
.ProseMirror ol ol ol ol ol > li::before {
  content: counter(editor-ordered-list, lower-alpha) "." !important;
}

/* 6階層（roman） */
.ProseMirror ol ol ol ol ol ol > li::before {
  content: counter(editor-ordered-list, lower-roman) "." !important;
}

/* 7階層（decimal） */
.ProseMirror ol ol ol ol ol ol ol > li::before {
  content: counter(editor-ordered-list, decimal) "." !important;
}

/* 8階層（alpha） */
.ProseMirror ol ol ol ol ol ol ol ol > li::before {
  content: counter(editor-ordered-list, lower-alpha) "." !important;
}

/* 9階層（roman） */
.ProseMirror ol ol ol ol ol ol ol ol ol > li::before {
  content: counter(editor-ordered-list, lower-roman) "." !important;
}

/* ===== Google Docs風：data-list-style-type より強いネスト優先指定 ===== */

.ProseMirror ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type])) > li::before {
  content: counter(editor-ordered-list, lower-alpha) "." !important;
}

.ProseMirror ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type])) > li::before {
  content: counter(editor-ordered-list, lower-roman) "." !important;
}

.ProseMirror ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type])) > li::before {
  content: counter(editor-ordered-list, decimal) "." !important;
}

.ProseMirror ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type])) > li::before {
  content: counter(editor-ordered-list, lower-alpha) "." !important;
}

.ProseMirror ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type])) > li::before {
  content: counter(editor-ordered-list, lower-roman) "." !important;
}

.ProseMirror ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type])) > li::before {
  content: counter(editor-ordered-list, decimal) "." !important;
}

.ProseMirror ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type])) > li::before {
  content: counter(editor-ordered-list, lower-alpha) "." !important;
}

.ProseMirror ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type]))
  ol:is([data-list-style-type], :not([data-list-style-type])) > li::before {
  content: counter(editor-ordered-list, lower-roman) "." !important;
}

/* decimal: 3桁以上だけ本文開始位置を段階的に広げる */
.ProseMirror ol[data-list-style-type="decimal"] > li:nth-child(n+100),
.ProseMirror ol:not([data-list-style-type]) > li:nth-child(n+100) {
  padding-left: 2.4em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] > li:nth-child(n+100)::before,
.ProseMirror ol:not([data-list-style-type]) > li:nth-child(n+100)::before {
  min-width: 2.1em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] > li:nth-child(n+1000),
.ProseMirror ol:not([data-list-style-type]) > li:nth-child(n+1000) {
  padding-left: 3.1em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] > li:nth-child(n+1000)::before,
.ProseMirror ol:not([data-list-style-type]) > li:nth-child(n+1000)::before {
  min-width: 2.8em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] > li:nth-child(n+10000),
.ProseMirror ol:not([data-list-style-type]) > li:nth-child(n+10000) {
  padding-left: 3.8em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] > li:nth-child(n+10000)::before,
.ProseMirror ol:not([data-list-style-type]) > li:nth-child(n+10000)::before {
  min-width: 3.5em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] > li:nth-child(n+100000),
.ProseMirror ol:not([data-list-style-type]) > li:nth-child(n+100000) {
  padding-left: 4.5em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] > li:nth-child(n+100000)::before,
.ProseMirror ol:not([data-list-style-type]) > li:nth-child(n+100000)::before {
  min-width: 4.2em !important;
}

/* alpha: z の次の aa 以降だけ広げる */
.ProseMirror ol[data-list-style-type="lower-alpha"] > li:nth-child(n+27),
.ProseMirror ol[data-list-style-type="upper-alpha"] > li:nth-child(n+27) {
  padding-left: 2.2em !important;
}

.ProseMirror ol[data-list-style-type="lower-alpha"] > li:nth-child(n+27)::before,
.ProseMirror ol[data-list-style-type="upper-alpha"] > li:nth-child(n+27)::before {
  min-width: 1.9em !important;
}

/* alpha: aaa 以降 */
.ProseMirror ol[data-list-style-type="lower-alpha"] > li:nth-child(n+703),
.ProseMirror ol[data-list-style-type="upper-alpha"] > li:nth-child(n+703) {
  padding-left: 2.9em !important;
}

.ProseMirror ol[data-list-style-type="lower-alpha"] > li:nth-child(n+703)::before,
.ProseMirror ol[data-list-style-type="upper-alpha"] > li:nth-child(n+703)::before {
  min-width: 2.6em !important;
}

/* roman: 100以上でも無理に段階拡張しない。本文位置を固定してGoogle Docs風に寄せる */
.ProseMirror ol[data-list-style-type="lower-roman"] > li,
.ProseMirror ol[data-list-style-type="upper-roman"] > li {
  padding-left: 4.2em !important;
}

.ProseMirror ol[data-list-style-type="lower-roman"] > li::before,
.ProseMirror ol[data-list-style-type="upper-roman"] > li::before {
  min-width: 3.9em !important;
}

.ProseMirror ol[data-list-style-type="lower-roman"] > li,
.ProseMirror ol[data-list-style-type="upper-roman"] > li,
.ProseMirror ol[data-list-style-type="lower-roman"] ol > li,
.ProseMirror ol[data-list-style-type="upper-roman"] ol > li {
  padding-left: 4.2em !important;
}

.ProseMirror ol[data-list-style-type="lower-roman"] > li::before,
.ProseMirror ol[data-list-style-type="upper-roman"] > li::before,
.ProseMirror ol[data-list-style-type="lower-roman"] ol > li::before,
.ProseMirror ol[data-list-style-type="upper-roman"] ol > li::before {
  min-width: 3.9em !important;
}

/* ===== Google Docs風: ネストordered listのインデント ===== */
.ProseMirror ol ol {
  margin-top: 0.35rem !important;
  margin-bottom: 0.35rem !important;
  margin-left: 0 !important;
  padding-left: 1.5em !important;
}

/* ===== Google Docs風: ネスト番号リストのインデント ===== */

.ProseMirror ol[data-list-style-type="decimal"] ol[data-list-style-type="decimal"],
.ProseMirror ol[data-list-style-type="decimal"] ol:not([data-list-style-type]),
.ProseMirror ol:not([data-list-style-type]) ol[data-list-style-type="decimal"],
.ProseMirror ol:not([data-list-style-type]) ol:not([data-list-style-type]) {
  margin-top: 0.35rem !important;
  margin-bottom: 0.35rem !important;
  margin-left: 0 !important;
  padding-left: 1.5em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] ol[data-list-style-type="decimal"] > li,
.ProseMirror ol[data-list-style-type="decimal"] ol:not([data-list-style-type]) > li,
.ProseMirror ol:not([data-list-style-type]) ol[data-list-style-type="decimal"] > li,
.ProseMirror ol:not([data-list-style-type]) ol:not([data-list-style-type]) > li {
  padding-left: 1.5em !important;
}

/* ===== decimal のみネスト時の桁拡張を適用 ===== */
.ProseMirror ol[data-list-style-type="decimal"] ol[data-list-style-type="decimal"] > li:nth-child(n+100),
.ProseMirror ol:not([data-list-style-type]) ol:not([data-list-style-type]) > li:nth-child(n+100) {
  padding-left: 2.4em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] ol[data-list-style-type="decimal"] > li:nth-child(n+100)::before,
.ProseMirror ol:not([data-list-style-type]) ol:not([data-list-style-type]) > li:nth-child(n+100)::before {
  min-width: 2.1em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] ol[data-list-style-type="decimal"] > li:nth-child(n+1000),
.ProseMirror ol:not([data-list-style-type]) ol:not([data-list-style-type]) > li:nth-child(n+1000) {
  padding-left: 3.1em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] ol[data-list-style-type="decimal"] > li:nth-child(n+1000)::before,
.ProseMirror ol:not([data-list-style-type]) ol:not([data-list-style-type]) > li:nth-child(n+1000)::before {
  min-width: 2.8em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] ol[data-list-style-type="decimal"] > li:nth-child(n+10000),
.ProseMirror ol:not([data-list-style-type]) ol:not([data-list-style-type]) > li:nth-child(n+10000) {
  padding-left: 3.8em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] ol[data-list-style-type="decimal"] > li:nth-child(n+10000)::before,
.ProseMirror ol:not([data-list-style-type]) ol:not([data-list-style-type]) > li:nth-child(n+10000)::before {
  min-width: 3.5em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] ol[data-list-style-type="decimal"] > li:nth-child(n+100000),
.ProseMirror ol:not([data-list-style-type]) ol:not([data-list-style-type]) > li:nth-child(n+100000) {
  padding-left: 4.5em !important;
}

.ProseMirror ol[data-list-style-type="decimal"] ol[data-list-style-type="decimal"] > li:nth-child(n+100000)::before,
.ProseMirror ol:not([data-list-style-type]) ol:not([data-list-style-type]) > li:nth-child(n+100000)::before {
  min-width: 4.2em !important;
}



.ProseMirror ul:not([data-type="taskList"]) {
  list-style-position: outside !important;
  margin-left: 0 !important;
  padding-left: 2rem !important;
}

.ProseMirror ol > li,
.ProseMirror ul:not([data-type="taskList"]) > li {
  display: list-item !important;
}

.ProseMirror ul[data-type="taskList"] li > label {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  flex: 0 0 18px !important;
  width: 18px !important;
  min-width: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  margin-top: 0 !important;
}

.ProseMirror ul[data-type="taskList"] li > label input {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  display: block !important;
  flex: 0 0 18px !important;
}

.ProseMirror ul[data-type="taskList"] li > div,
.ProseMirror ul[data-type="taskList"] li > p {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.72 !important;
}

.ProseMirror ul[data-type="taskList"] li > div > p {
  margin: 0 !important;
  line-height: 1.72 !important;
}

.ProseMirror ul[data-type="taskList"] li[data-checked="true"] > div,
.ProseMirror ul[data-type="taskList"] li[data-checked="true"] > div > p,
.ProseMirror ul[data-type="taskList"] li[data-checked="true"] > p {
  color: #5f6368 !important;
  text-decoration: line-through !important;
}


.ProseMirror ul:not([data-type="taskList"]) > li,
.ProseMirror ol:not([data-type="taskList"]) > li {
  line-height: 1.35 !important;
  margin: 0.08rem 0 !important;
}

.ProseMirror ul:not([data-type="taskList"]) > li > p,
.ProseMirror ol:not([data-type="taskList"]) > li > p {
  margin: 0 !important;
  line-height: 1.35 !important;
}


.ProseMirror .column-resize-handle,
.ProseMirror .row-resize-handle,
.ProseMirror .table-row-resize-handle,
.ProseMirror [data-row-resize-handle],
.ProseMirror [data-table-resize-handle] {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.ProseMirror .column-resize-handle,
.ProseMirror .row-resize-handle,
.ProseMirror .table-row-resize-handle,
.ProseMirror [data-row-resize-handle],
.ProseMirror [data-table-resize-handle] {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.ProseMirror table,
.ProseMirror td,
.ProseMirror th {
  touch-action: manipulation;
}

.ProseMirror table:hover .column-resize-handle,
.ProseMirror .selectedCell .column-resize-handle,
.ProseMirror .column-resize-handle:hover {
  opacity: 1 !important;
}

.ProseMirror.touch-column-resize-active .column-resize-handle {
  opacity: 1 !important;
}


 /* ===== Table styles ===== */
 
.ProseMirror table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  margin: 16px 0;
}

.ProseMirror td,
.ProseMirror th {
  border: 1px solid #d1d5db;
  padding: 8px 6px !important;
  vertical-align: top;
  min-width: 1em;
  max-width: none !important;
  height: auto !important;
}

.ProseMirror td > p,
.ProseMirror th > p {
  margin: 0 !important;
  line-height: 1.35 !important;
  min-height: 1.35em !important;
}




/* 閲覧画面でブラウザ標準の ol marker と独自 ::before 番号が二重表示されるのを防ぐ */
.ProseMirror ol,
.ProseMirror ol li {
  list-style: none !important;
}

.ProseMirror ol li::marker {
  content: "" !important;
}


/* ===== ol / ul の左端位置を統一 ===== */

.ProseMirror ol,
.ProseMirror ul:not([data-type="taskList"]) {
  margin-left: 0 !important;
  padding-left: 1.5em !important;
}

.ProseMirror ol ol,
.ProseMirror ol ul:not([data-type="taskList"]),
.ProseMirror ul:not([data-type="taskList"]) ol,
.ProseMirror ul:not([data-type="taskList"]) ul:not([data-type="taskList"]) {
  margin-left: 0 !important;
  padding-left: 1.5em !important;
}

.ProseMirror ol ol ol,
.ProseMirror ol ol ul:not([data-type="taskList"]),
.ProseMirror ol ul:not([data-type="taskList"]) ol,
.ProseMirror ol ul:not([data-type="taskList"]) ul:not([data-type="taskList"]),
.ProseMirror ul:not([data-type="taskList"]) ol ol,
.ProseMirror ul:not([data-type="taskList"]) ol ul:not([data-type="taskList"]),
.ProseMirror ul:not([data-type="taskList"]) ul:not([data-type="taskList"]) ol,
.ProseMirror ul:not([data-type="taskList"]) ul:not([data-type="taskList"]) ul:not([data-type="taskList"]) {
  margin-left: 0 !important;
  padding-left: 1.5em !important;
}



.ProseMirror ul:not([data-type="taskList"]) {
  list-style: none !important;
  list-style-position: outside !important;
}


.ProseMirror ul:not([data-type="taskList"]) > li {
  position: relative !important;
  padding-left: 1.5em !important;
}

.ProseMirror ul:not([data-type="taskList"]) > li::before {
  content: "•" !important;
  position: absolute !important;
  left: 0 !important;
  min-width: 1.5em !important;
  text-align: left !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}

.ProseMirror ul[data-list-style-type="circle"]:not([data-type="taskList"]) > li::before {
  content: "○" !important;
}

.ProseMirror ul[data-list-style-type="square"]:not([data-type="taskList"]) > li::before {
  content: "▪" !important;
}



/* ===== Google Docs風：ul ネスト9階層 ===== */

/* 2階層 */
.ProseMirror ul ul:not([data-type="taskList"]) > li::before {
  content: "○" !important;
}

/* 3階層 */
.ProseMirror ul ul ul:not([data-type="taskList"]) > li::before {
  content: "▪" !important;
}

/* 4階層 */
.ProseMirror ul ul ul ul:not([data-type="taskList"]) > li::before {
  content: "•" !important;
}

/* 5階層 */
.ProseMirror ul ul ul ul ul:not([data-type="taskList"]) > li::before {
  content: "○" !important;
}

/* 6階層 */
.ProseMirror ul ul ul ul ul ul:not([data-type="taskList"]) > li::before {
  content: "▪" !important;
}

/* 7階層 */
.ProseMirror ul ul ul ul ul ul ul:not([data-type="taskList"]) > li::before {
  content: "•" !important;
}

/* 8階層 */
.ProseMirror ul ul ul ul ul ul ul ul:not([data-type="taskList"]) > li::before {
  content: "○" !important;
}

/* 9階層 */
.ProseMirror ul ul ul ul ul ul ul ul ul:not([data-type="taskList"]) > li::before {
  content: "▪" !important;
}


/* 保存状態はボタン風の背景・枠を使わず、文字だけ表示する */
.editor-save-status-text {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  height: auto !important;
  border-radius: 0 !important;

  /* 「全画面」ボタンと同じ文字色に統一 */
  color: #3c4043 !important;
}

/* 内部のspanやiconもすべて同じ色にする */
.editor-save-status-text * {
  color: #3c4043 !important;
}



/* ===== ol / ul / taskList の本文開始位置を統一 ===== */

.ProseMirror {
  --editor-list-text-start: 3em;
  --editor-task-checkbox-size: 14px;
  --editor-task-gap: 0.5em;
}

.ProseMirror ul[data-type="taskList"] {
  margin-left: 0 !important;
  padding-left: calc(
	var(--editor-list-text-start)
	- var(--editor-task-checkbox-size)
	- var(--editor-task-gap)
  ) !important;
}

.ProseMirror ul[data-type="taskList"] li {
  gap: var(--editor-task-gap) !important;
}

.ProseMirror ul[data-type="taskList"] li > label {
  flex: 0 0 var(--editor-task-checkbox-size) !important;
  width: var(--editor-task-checkbox-size) !important;
  min-width: var(--editor-task-checkbox-size) !important;
}

.ProseMirror ul[data-type="taskList"] li > label input {
  width: var(--editor-task-checkbox-size) !important;
  height: var(--editor-task-checkbox-size) !important;
  flex: 0 0 var(--editor-task-checkbox-size) !important;
}


/* ===== チェックしても取り消し線を付けないチェックリスト ===== */
.ProseMirror ul[data-type="taskList"][data-task-list-variant="plain"] li[data-checked="true"] > div,
.ProseMirror ul[data-type="taskList"][data-task-list-variant="plain"] li[data-checked="true"] > div > p,
.ProseMirror ul[data-type="taskList"][data-task-list-variant="plain"] li[data-checked="true"] > p,
.ProseMirror ul[data-type="taskList"][data-task-list-variant="plain"] li[data-checked="true"] > div,
.ProseMirror ul[data-type="taskList"][data-task-list-variant="plain"] li[data-checked="true"] > div > p,
.ProseMirror ul[data-type="taskList"][data-task-list-variant="plain"] li[data-checked="true"] > p {
  color: inherit !important;
  text-decoration: none !important;
  opacity: 1 !important;
}




/* 閲覧画面のチェックマークが枠から下にはみ出るのを防ぐ */
.ProseMirror ul[data-type="taskList"] li > label input {
  position: relative !important;
  overflow: hidden !important;
}

.ProseMirror ul[data-type="taskList"] li > label input:checked::after {
  content: "" !important;
  position: absolute !important;
  left: 4px !important;
  top: 1px !important;
  width: 4px !important;
  height: 8px !important;
  border: solid #5f6368 !important;
  border-width: 0 1.8px 1.8px 0 !important;
  transform: translateY(1px) rotate(45deg) !important;
  box-sizing: border-box !important;
}




/* ===== 箇条書き / 番号付き箇条書き / チェックリストの本文開始位置を統一 ===== */
.ProseMirror {
  --editor-list-text-start: 2.85em;
  --editor-list-marker-width: 1.35em;
  --editor-task-checkbox-size: 14px;
  --editor-task-gap: 0.5em;
}

/* 通常の箇条書き */
.ProseMirror ul:not([data-type="taskList"]) {
  margin-left: 0 !important;
  padding-left: calc(
	var(--editor-list-text-start) - var(--editor-list-marker-width)
  ) !important;
}

.ProseMirror ul:not([data-type="taskList"]) > li {
  padding-left: var(--editor-list-marker-width) !important;
}

.ProseMirror ul:not([data-type="taskList"]) > li::before {
  left: 0 !important;
  min-width: var(--editor-list-marker-width) !important;
}

/* 番号付きリスト decimal / alpha の本文開始位置を箇条書きに合わせる */
.ProseMirror ol:not([data-list-style-type]),
.ProseMirror ol[data-list-style-type="decimal"],
.ProseMirror ol[data-list-style-type="lower-alpha"],
.ProseMirror ol[data-list-style-type="upper-alpha"] {
  margin-left: 0 !important;
  padding-left: calc(
	var(--editor-list-text-start) - var(--editor-list-marker-width)
  ) !important;
}

.ProseMirror ol:not([data-list-style-type]) > li,
.ProseMirror ol[data-list-style-type="decimal"] > li,
.ProseMirror ol[data-list-style-type="lower-alpha"] > li,
.ProseMirror ol[data-list-style-type="upper-alpha"] > li {
  padding-left: var(--editor-list-marker-width) !important;
}

.ProseMirror ol:not([data-list-style-type]) > li::before,
.ProseMirror ol[data-list-style-type="decimal"] > li::before,
.ProseMirror ol[data-list-style-type="lower-alpha"] > li::before,
.ProseMirror ol[data-list-style-type="upper-alpha"] > li::before {
  left: 0 !important;
  min-width: var(--editor-list-marker-width) !important;
}

/* チェックリストの本文開始位置も同じ基準に合わせる */
.ProseMirror ul[data-type="taskList"] {
  margin-left: 0 !important;
  padding-left: calc(
	var(--editor-list-text-start)
	- var(--editor-task-checkbox-size)
	- var(--editor-task-gap)
  ) !important;
}

.ProseMirror ul[data-type="taskList"] li {
  gap: var(--editor-task-gap) !important;
}



/* ===== 閲覧ページ：番号付きリスト全体の左ズレ補正 ===== */
.view-content ol:not([data-list-style-type]),
.view-content ol[data-list-style-type="decimal"],
.view-content ol[data-list-style-type="lower-alpha"],
.view-content ol[data-list-style-type="upper-alpha"] {
  margin-left: -0.5em !important;
}


/* ===== p の上下マージンを完全一致 ===== */
.ProseMirror p,
.view-content p {
  margin-top: 0.5em !important;
  margin-bottom: 0.5em !important;
}

.view-content,
.view-content *{
	font-size: 16px;
}

/* リスト */
.ProseMirror ul,
.ProseMirror ol,
.view-content ul,
.view-content ol {
}

.view-content p:empty::before {
  content: "\00a0";
  display: inline-block;
  min-height: 1em;
}
.view-content p:has(br:only-child)::before {
  content: "\00a0";
}


/* ===== 閲覧ページ：リストマーカーを編集ページと同じ見た目に統一 ===== */
.view-content ul:not([data-type="taskList"]) {
  list-style: none;
}

.view-content ul:not([data-type="taskList"]) > li {
  position: relative;
  padding-left: 1.2em;
}

/* ●（1階層目） */
.view-content ul > li::before {
  content: "•";
  position: absolute;
  left: 0;
  font-size: 0.75em; /* ← サイズ調整ポイント */
  top: 0.2em;
}

/* ・（2階層目） */
.view-content ul:not([data-type="taskList"]) > li::before {
  content: "・";
  font-size: 0.65em;
}

/* □（3階層目） */
.view-content ul ul ul > li::before {
  content: "□";
  font-size: 0.7em;
}

/* ===== 番号付きリストのサイズを編集ページに合わせる ===== */
.view-content ol {
  font-size: 0.95em; /* 少し小さくする */
}


/* ===== 閲覧ページ：チェックリストには箇条書きマーカーを出さない ===== */
.view-content ul[data-type="taskList"] > li::before,
.view-content ul[data-type="taskList"] ul > li::before,
.view-content ul[data-type="taskList"] ul ul > li::before {
  content: none !important;
  display: none !important;
}

.view-content strong,
.view-content em,
.view-content u,
.view-content span,
.view-content mark,
.view-content s{
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}


/* ===== 閲覧画面：表だけ横スクロール ===== */
.view-content .tableWrapper {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  min-width: 0 !important;
  display: block !important;
  box-sizing: border-box !important;
}
.view-content strong{
	font-weight: bold;
}
.view-content table {
  table-layout: auto !important;
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
}

.view-content td,
.view-content th {
  max-width: none !important;
  word-break: normal !important;
 overflow-wrap: normal !important;
}