@charset "UTF-8";
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: #fafafa;
  color: #222222;
  font-family: Georgia, Palatino, "Palatino Linotype", serif;
  font-size: 15px;
  line-height: 1.6;
}

#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.pane-divider {
  width: 1px;
  background: #dce0ea;
  flex-shrink: 0;
}

#pane-chat, #pane-preview, #pane-editor, #pane-notes {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow: hidden;
}

#pane-notes {
  width: 22%;
  min-width: 200px;
  max-width: 320px;
}

#pane-editor {
  width: 28%;
  min-width: 240px;
}

#pane-preview {
  flex: 1;
  background: #fdfdfd;
}

#pane-chat {
  width: 24%;
  min-width: 200px;
  max-width: 360px;
}

.pane-header {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid #d8d8d8;
  flex-shrink: 0;
  background: #ffffff;
}

.pane-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666666;
}

.app-title {
  font-family: Georgia, Palatino, "Palatino Linotype", serif;
  font-size: 20px;
  font-weight: bold;
  color: #4169E1;
  letter-spacing: -0.5px;
  flex: 1;
}

.btn-danger, .btn-secondary, .btn-primary {
  border-radius: 4px;
  padding: 6px 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: #4169E1;
  color: #ffffff;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: #2f50b8;
}

.btn-primary:disabled {
  background: #a0a8c0;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: #666666;
  border: 1px solid #d8d8d8;
  transition: background 0.15s;
}

.btn-secondary:hover {
  background: #e8edfc;
}

.btn-danger {
  background: #c0392b;
  color: #ffffff;
}

.btn-danger:hover {
  background: #a93226;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: #666666;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.12s;
}

.btn-icon:hover {
  background: #e8edfc;
  color: #4169E1;
}

.btn-mic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  border: 1px solid #d8d8d8;
  background: transparent;
  color: #666666;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.btn-mic:hover {
  background: #e8edfc;
  color: #4169E1;
  border-color: #4169E1;
}

.btn-mic.recording {
  background: #c0392b;
  color: #ffffff;
  border-color: #c0392b;
  animation: mic-pulse 1.2s ease-in-out infinite;
}

@keyframes mic-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.45);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(192, 57, 43, 0);
  }
}

.search-bar {
  padding: 10px 12px 6px;
  flex-shrink: 0;
}

#search-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  color: #222222;
  background: #fafafa;
  outline: none;
  transition: border-color 0.15s;
}

#search-input:focus {
  border-color: #4169E1;
}

.folder-tree {
  padding: 4px 8px;
  flex-shrink: 0;
}

.folder-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  color: #666666;
  user-select: none;
  transition: background 0.12s;
}

.folder-item:hover {
  background: #e8edfc;
  color: #4169E1;
}

.folder-item.active {
  background: #e8edfc;
  color: #4169E1;
  font-weight: 600;
}

.folder-item.open .folder-chevron {
  transform: rotate(90deg);
}

.folder-chevron {
  font-size: 10px;
  transition: transform 0.15s;
}

.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 12px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid #d8d8d8;
}

.tag-pill {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid #d8d8d8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  cursor: pointer;
  background: #ffffff;
  color: #666666;
  transition: background 0.12s, color 0.12s;
  user-select: none;
}

.tag-pill:hover {
  border-color: #4169E1;
  color: #4169E1;
}

.tag-pill.active {
  background: #4169E1;
  border-color: #4169E1;
  color: #ffffff;
}

.notes-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding: 6px 0;
}

.note-item {
  padding: 10px 14px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}

.note-item:hover {
  background: #e8edfc;
}

.note-item.active {
  background: #e8edfc;
  border-left-color: #4169E1;
}

.note-item.active .note-item-title {
  color: #4169E1;
}

.note-item-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #222222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-item-meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  color: #999999;
  margin-top: 2px;
}

.notes-empty {
  padding: 20px 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  color: #999999;
  text-align: center;
}

.editor-header {
  gap: 10px;
}

.editor-title-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: Georgia, Palatino, "Palatino Linotype", serif;
  font-size: 16px;
  font-weight: bold;
  color: #222222;
  background: transparent;
  padding: 0;
}

.editor-title-input::placeholder {
  color: #999999;
}

.editor-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-bottom: 1px solid #d8d8d8;
  flex-shrink: 0;
}

.meta-info {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  color: #999999;
}

.meta-sep {
  color: #999999;
  font-size: 11px;
}

.folder-select-wrap {
  position: relative;
}

.meta-select {
  border: none;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  color: #4169E1;
  cursor: pointer;
  outline: none;
  padding: 2px 4px;
}

.meta-input {
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  padding: 3px 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  color: #222222;
  outline: none;
  width: 140px;
}

.meta-input:focus {
  border-color: #4169E1;
}

.tag-editor {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-bottom: 1px solid #d8d8d8;
  flex-shrink: 0;
  min-height: 40px;
}

.tag-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e8edfc;
  color: #4169E1;
  border-radius: 999px;
  padding: 2px 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 500;
}

.tag-badge-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #4169E1;
  font-size: 13px;
  line-height: 1;
  padding: 0 0 0 2px;
  opacity: 0.6;
}

.tag-badge-remove:hover {
  opacity: 1;
}

.tag-input {
  border: none;
  outline: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  color: #222222;
  background: transparent;
  flex: 1;
  min-width: 80px;
  padding: 2px 0;
}

.tag-input::placeholder {
  color: #999999;
}

.tag-autocomplete {
  position: absolute;
  top: calc(100% + 2px);
  left: 12px;
  background: #ffffff;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  list-style: none;
  z-index: 100;
  min-width: 150px;
  max-height: 160px;
  overflow-y: auto;
}

.tag-autocomplete.hidden {
  display: none;
}

.tag-autocomplete li {
  padding: 6px 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  cursor: pointer;
  color: #222222;
}

.tag-autocomplete li:hover {
  background: #e8edfc;
  color: #4169E1;
}

.editor-textarea {
  flex: 1;
  resize: none;
  border: none;
  outline: none;
  padding: 16px;
  font-family: Georgia, Palatino, "Palatino Linotype", serif;
  font-size: 14px;
  line-height: 1.7;
  color: #222222;
  background: #ffffff;
  overflow-y: auto;
}

.editor-textarea::placeholder {
  color: #999999;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 88%;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  position: relative;
}

.chat-bubble.user {
  align-self: flex-end;
  background: #4169E1;
  color: #ffffff;
  border-bottom-right-radius: 3px;
}

.chat-bubble.user .chat-timestamp {
  color: rgba(255, 255, 255, 0.65);
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: #e8edfc;
  color: #222222;
  border-bottom-left-radius: 3px;
}

.chat-bubble-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  gap: 8px;
}

.chat-timestamp {
  font-size: 10px;
  color: #999999;
  opacity: 0.7;
}

.btn-restore {
  font-size: 11px;
  background: none;
  border: 1px solid #4169E1;
  border-radius: 3px;
  color: #4169E1;
  padding: 1px 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}

.btn-restore:hover {
  background: #4169E1;
  color: #ffffff;
}

.chat-thinking {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  flex-shrink: 0;
}

.chat-thinking.hidden {
  display: none;
}

.thinking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4169E1;
  animation: bounce 1s infinite;
}

.thinking-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.thinking-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

.thinking-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  color: #999999;
  margin-left: 4px;
}

.chat-input-wrap {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #d8d8d8;
  flex-shrink: 0;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  resize: none;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  padding: 7px 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  color: #222222;
  outline: none;
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color 0.15s;
}

.chat-input:focus {
  border-color: #4169E1;
}

.chat-empty {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  color: #999999;
  text-align: center;
  padding: 24px 12px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: #ffffff;
  border-radius: 8px;
  padding: 28px 32px;
  width: 380px;
  max-width: 95vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.modal-title {
  font-family: Georgia, Palatino, "Palatino Linotype", serif;
  font-size: 18px;
  color: #4169E1;
  margin-bottom: 18px;
}

.modal-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  color: #222222;
  margin-bottom: 20px;
  line-height: 1.5;
}

.modal-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  color: #666666;
}

.modal-input {
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  padding: 7px 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  color: #222222;
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}

.modal-input:focus {
  border-color: #4169E1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.hidden {
  display: none !important;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

.mention-menu {
  position: fixed;
  background: #ffffff;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  list-style: none;
  z-index: 600;
  min-width: 220px;
  max-height: 200px;
  overflow-y: auto;
}

.mention-menu.hidden {
  display: none;
}

.mention-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  cursor: pointer;
}

.mention-item:hover, .mention-item.active {
  background: #e8edfc;
}

.mention-name {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  color: #222222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mention-folder {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  color: #999999;
  white-space: nowrap;
  flex-shrink: 0;
}

.preview-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 32px;
  font-family: Georgia, Palatino, "Palatino Linotype", serif;
  font-size: 15px;
  line-height: 1.75;
  color: #222222;
}

.prose h1, .prose h2 {
  font-family: Georgia, Palatino, "Palatino Linotype", serif;
  color: #4169E1;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

.prose h1 {
  font-size: 1.7em;
}

.prose h2 {
  font-size: 1.35em;
}

.prose h3, .prose h4, .prose h5 {
  font-family: Georgia, Palatino, "Palatino Linotype", serif;
  color: #222222;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
}

.prose h3 {
  font-size: 1.15em;
}

.prose p {
  margin-bottom: 0.9em;
}

.prose ul, .prose ol {
  margin: 0.5em 0 0.9em 1.6em;
}

.prose li {
  margin-bottom: 0.25em;
}

.prose blockquote {
  border-left: 3px solid #4169E1;
  padding: 4px 16px;
  color: #666666;
  margin: 1em 0;
  font-style: italic;
}

.prose code {
  background: #f0f0f5;
  border-radius: 3px;
  padding: 1px 5px;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 0.88em;
  color: #3d3d3d;
}

.prose pre {
  background: #f0f0f5;
  border-radius: 4px;
  padding: 12px 16px;
  overflow-x: auto;
  margin: 0.8em 0;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose a {
  color: #4169E1;
  text-decoration: underline;
}

.prose hr {
  border: none;
  border-top: 1px solid #d8d8d8;
  margin: 1.5em 0;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}

.prose th, .prose td {
  border: 1px solid #d8d8d8;
  padding: 6px 12px;
  text-align: left;
}

.prose th {
  background: #e8edfc;
  color: #4169E1;
  font-weight: 600;
}

.prose .math-block {
  text-align: center;
  margin: 1.2em 0;
  overflow-x: auto;
}

.prose .math-error {
  color: #c0392b;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 0.88em;
}

#pane-mobile {
  display: none;
  flex-direction: column;
  flex: 1;
  background: #ffffff;
  overflow: hidden;
  position: relative;
}

.mobile-backdrop {
  display: none;
}

.mobile-btn-notes {
  display: none;
}

.mobile-chat-fab {
  display: none;
}

@media (max-width: 768px) {
  #pane-editor,
#pane-preview,
.pane-divider {
    display: none !important;
  }
  #pane-mobile {
    display: flex;
  }
  #pane-notes {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 400;
    max-height: 80vh;
    max-width: none;
    width: 100%;
    overflow-y: auto;
    transform: translateY(calc(-100% - 8px));
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.22);
  }
  #pane-notes.mobile-open {
    transform: translateY(0);
  }
  #pane-chat {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 400;
    height: 72vh;
    max-width: none;
    width: 100%;
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
  }
  #pane-chat.mobile-open {
    transform: translateY(0);
  }
  .mobile-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 390;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }
  .mobile-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-btn-notes {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    padding: 5px 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    color: #666666;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
  }
  .mobile-btn-notes:hover, .mobile-btn-notes.active {
    background: #e8edfc;
    color: #4169E1;
    border-color: #4169E1;
  }
  .mobile-chat-fab {
    display: flex;
    position: absolute;
    bottom: 20px;
    right: 16px;
    z-index: 150;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #4169E1;
    color: #ffffff;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(65, 105, 225, 0.45);
    transition: background 0.12s, transform 0.12s;
  }
  .mobile-chat-fab:hover {
    background: #2f50b8;
    transform: scale(1.06);
  }
  .mobile-chat-fab.chat-open {
    background: #666666;
  }
  .mobile-chat-fab.chat-open svg {
    display: none;
  }
  .mobile-chat-fab.chat-open::after {
    content: '✕';
    font-size: 20px;
    color: #ffffff;
    line-height: 1;
  }
}

.mobile-header {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid #d8d8d8;
  flex-shrink: 0;
  background: #ffffff;
}

.mobile-title-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: Georgia, Palatino, "Palatino Linotype", serif;
  font-size: 15px;
  font-weight: bold;
  color: #222222;
  background: transparent;
  min-width: 0;
}

.mobile-title-input::placeholder {
  color: #999999;
}

.mobile-sections {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px;
}

.ms-section {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #d8d8d8;
  position: relative;
  min-height: 48px;
}

.ms-content {
  flex: 1;
  padding: 14px 16px;
  min-width: 0;
  font-family: Georgia, Palatino, "Palatino Linotype", serif;
  font-size: 15px;
  line-height: 1.75;
  color: #222222;
}

.ms-content.prose h1, .ms-content.prose h2 {
  font-family: Georgia, Palatino, "Palatino Linotype", serif;
  color: #4169E1;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
  line-height: 1.3;
}

.ms-content.prose h1 {
  font-size: 1.6em;
}

.ms-content.prose h2 {
  font-size: 1.25em;
}

.ms-content.prose h3, .ms-content.prose h4, .ms-content.prose h5 {
  font-family: Georgia, Palatino, "Palatino Linotype", serif;
  color: #222222;
  margin-top: 1em;
  margin-bottom: 0.3em;
}

.ms-content.prose p {
  margin-bottom: 0.8em;
}

.ms-content.prose ul, .ms-content.prose ol {
  margin: 0.4em 0 0.8em 1.4em;
}

.ms-content.prose li {
  margin-bottom: 0.2em;
}

.ms-content.prose blockquote {
  border-left: 3px solid #4169E1;
  padding: 3px 14px;
  color: #666666;
  margin: 0.8em 0;
  font-style: italic;
}

.ms-content.prose code {
  background: #f0f0f5;
  border-radius: 3px;
  padding: 1px 4px;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 0.87em;
  color: #3d3d3d;
}

.ms-content.prose pre {
  background: #f0f0f5;
  border-radius: 4px;
  padding: 10px 14px;
  overflow-x: auto;
  margin: 0.7em 0;
}

.ms-content.prose pre code {
  background: none;
  padding: 0;
}

.ms-content.prose a {
  color: #4169E1;
  text-decoration: underline;
}

.ms-content.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.8em 0;
}

.ms-content.prose th, .ms-content.prose td {
  border: 1px solid #d8d8d8;
  padding: 5px 10px;
  text-align: left;
}

.ms-content.prose th {
  background: #e8edfc;
  color: #4169E1;
  font-weight: 600;
}

.ms-strip {
  width: 44px;
  flex-shrink: 0;
  background: rgba(65, 105, 225, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.12s;
  border-left: 2px solid rgba(65, 105, 225, 0.2);
}

.ms-strip:active {
  background: rgba(65, 105, 225, 0.22);
}

.ms-section.ms-editing > .ms-strip {
  background: #4169E1;
  border-left-color: #2f50b8;
  cursor: default;
}

.ms-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  padding: 0;
}

.ms-pencil {
  color: rgba(65, 105, 225, 0.5);
}

.ms-pencil:hover, .ms-strip:hover .ms-pencil {
  color: #4169E1;
}

.ms-discard {
  color: rgba(255, 255, 255, 0.75);
  font-size: 17px;
  line-height: 1;
}

.ms-discard:hover {
  color: #ffffff;
}

.ms-accept {
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  font-weight: bold;
}

.ms-accept:hover {
  color: rgba(255, 255, 255, 0.85);
}

.ms-mic {
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  width: 32px;
  height: 32px;
}

.ms-mic:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.7);
}

.ms-mic.recording {
  background: #c0392b;
  color: #ffffff;
  border-color: #c0392b;
  animation: mic-pulse 1.2s ease-in-out infinite;
}

.ms-textarea {
  display: block;
  width: 100%;
  border: none;
  outline: none;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 13px;
  line-height: 1.65;
  color: #222222;
  background: #e8edfc;
  resize: none;
  min-height: 60px;
  padding: 4px 0;
}

.ms-conflict-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.ms-conflict-dialog {
  background: #ffffff;
  border-radius: 8px;
  padding: 20px 22px;
  width: 88%;
  max-width: 320px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.ms-conflict-dialog p {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  color: #222222;
  margin-bottom: 18px;
  line-height: 1.5;
}

.ms-conflict-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
