/* fukura刺繍研究所 共通リッチテキスト用スタイル(表示側 + 編集ツールバー) */

/* ---------- 表示側 ---------- */
.rt-content { line-height: 1.95; overflow-wrap: anywhere; }
.rt-content > *:first-child { margin-top: 0; }
.rt-content > *:last-child { margin-bottom: 0; }

.rt-content .rt-p { margin: 0 0 1.1em; font-weight: 700; }

.rt-content .rt-h1,
.rt-content .rt-h2,
.rt-content .rt-h3 {
  margin: 1.6em 0 .7em;
  font-family: var(--serif-jp);
  font-weight: 600;
  line-height: 1.5;
}
.rt-content .rt-h1 { font-size: 1.5rem; padding-bottom: .35em; border-bottom: 2px solid var(--line); }
.rt-content .rt-h2 { font-size: 1.25rem; }
.rt-content .rt-h3 { font-size: 1.08rem; color: var(--green); }

.rt-content .rt-quote {
  margin: 1.2em 0;
  padding: .9em 1.1em;
  border-left: 4px solid var(--green);
  border-radius: 0 12px 12px 0;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 500;
}

.rt-content .rt-list { margin: 0 0 1.1em; padding-left: 1.5em; font-weight: 700; }
.rt-content .rt-list li { margin-bottom: .4em; }

.rt-content mark { padding: .1em .2em; border-radius: 3px; background: var(--peach); color: inherit; }
.rt-content u { text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.rt-content s { color: var(--green); }
.rt-content code {
  padding: .15em .45em;
  border-radius: 5px;
  background: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em;
}
.rt-content hr { margin: 1.8em 0; border: 0; border-top: 1px dashed var(--line); }
.rt-content a { text-underline-offset: 3px; }

/* ---------- 編集ツールバー ---------- */
.rt-editor { display: grid; gap: 9px; }

.rt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 249, 240, .8);
}
.rt-toolbar-spacer { flex: 1 1 auto; }

.rt-tool {
  min-height: 34px;
  padding: 5px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--green);
  color: var(--green);
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}
.rt-tool:hover { background: rgba(229, 175, 151, .28); }
.rt-tool:focus-visible { outline: 3px solid var(--green-soft); outline-offset: 1px; }
.rt-tool.active { border-color: var(--green); background: var(--green); }

.rt-tool-bold { font-weight: 800; }
.rt-tool-underline { text-decoration: underline; text-underline-offset: 2px; }
.rt-tool-strike { text-decoration: line-through; }
.rt-tool-mark { background: var(--peach); }

.rt-preview {
  min-height: 130px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--green);
}
.rt-preview[hidden] { display: none; }

.rt-hint { margin: 0; color: var(--green); font-size: .74rem; font-weight: 400; line-height: 1.6; }

@media (max-width: 560px) {
  .rt-toolbar { gap: 4px; padding: 6px; }
  .rt-tool { padding: 5px 8px; font-size: .74rem; }
  .rt-toolbar-spacer { flex-basis: 100%; }
}
