.ontone-editing [contenteditable="plaintext-only"],
.ontone-editing a[data-link] {
  outline: 1px dashed rgb(255 226 195 / 68%);
  outline-offset: 2px;
  cursor: text;
}

.ontone-editing a[data-link] { cursor: pointer; }

.ontone-editing [contenteditable="plaintext-only"]:focus-visible,
.ontone-editing a[data-link]:focus-visible {
  outline: 2px solid #ff824d;
}

.ontone-editor-bar,
.ontone-link-editor {
  box-sizing: border-box;
  color: #f6f2eb;
  background: #211e1b;
  font: 400 14px/1.4 system-ui, sans-serif;
  letter-spacing: normal;
  text-align: left;
}

.ontone-editor-bar {
  position: fixed;
  z-index: 2000;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  border: 1px solid #776b61;
  border-radius: 10px;
  box-shadow: 0 8px 30px #0006;
}

.ontone-editor-hint {
  max-width: 200px;
  padding: 0 4px;
  font-size: 12px;
}

.ontone-editor-bar button,
.ontone-editor-bar a,
.ontone-link-editor button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid #8b7b6d;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.ontone-editor-bar [data-save],
.ontone-link-editor [type="submit"] {
  color: #21160d;
  background: #ff8d5e;
  border-color: #ff8d5e;
  font-weight: 650;
}

.ontone-link-editor {
  position: fixed;
  inset: 0;
  width: min(400px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 22px;
  border: 1px solid #776b61;
  border-radius: 12px;
}

.ontone-link-editor:not([open]) { display: none; }
.ontone-link-editor::backdrop { background: rgb(0 0 0 / 62%); }
.ontone-link-editor form { display: grid; gap: 12px; margin: 0; }
.ontone-link-editor h2 { margin: 0; color: inherit; font: 600 20px/1.2 system-ui, sans-serif; }
.ontone-link-editor label { display: grid; gap: 5px; }
.ontone-link-editor input {
  box-sizing: border-box;
  width: 100%;
  padding: 8px 10px;
  color: #211e1b;
  background: #faf7f2;
  border: 1px solid #9b8c80;
  border-radius: 5px;
  font: inherit;
}
.ontone-link-editor p { margin: 0; color: #dccfc3; font: inherit; font-size: 12px; }
.ontone-link-editor form > div { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 600px) {
  .ontone-editor-bar { flex-wrap: wrap; }
  .ontone-editor-hint { flex-basis: 100%; max-width: none; }
}
