/* © 2026 Dennis Andres */
.ann-layout {
  display: grid;
  gap: var(--gap);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 1100px) {
  .ann-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .ann-preview-card { position: sticky; top: 16px; }
}
.ann-danger { margin-top: var(--gap); }
.ann-confirm { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.ann-confirm input { margin-top: 3px; accent-color: var(--red); }

.md-editor {
  display: grid;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-control);
  background: var(--panel-2);
  overflow: visible;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.md-editor:focus-within { border-color: var(--gold); box-shadow: var(--focus-ring); }
.md-editor.is-enhanced textarea {
  border: 0;
  border-radius: 0 0 var(--radius-control) var(--radius-control);
  background: transparent;
  box-shadow: none;
  min-height: 320px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}
.md-editor.is-enhanced textarea:focus { outline: none; box-shadow: none; }
.md-editor.is-basic textarea {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.md-editor.is-basic textarea:focus { outline: none; box-shadow: none; }

.md-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-bottom: 1px solid var(--line-faint);
  background: var(--panel);
  border-radius: var(--radius-control) var(--radius-control) 0 0;
}
.md-btn {
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: 600 12px/1 var(--font);
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.md-btn:hover { background: var(--gold-tint); border-color: var(--line-soft); color: var(--gold2); }
.md-btn:active { transform: translateY(1px); }
.md-btn:focus-visible { outline: 2px solid var(--gold2); outline-offset: 1px; }
.md-preview-toggle { margin-left: auto; }
.md-preview-toggle[aria-pressed="true"] { background: var(--gold-tint); border-color: var(--gold2); color: var(--gold2); }
.md-b { font-weight: 800; }
.md-i { font-style: italic; }
.md-u { text-decoration: underline; }
.md-s { text-decoration: line-through; }
.md-role { color: #c9cdfb; background: rgba(88,101,242,.18); }
.md-role:hover { color: #fff; background: rgba(88,101,242,.4); border-color: transparent; }
.md-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line-soft); }
.md-emoji { position: relative; display: inline-flex; }
.md-emoji-panel {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 34px);
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
}
.md-emoji-panel[hidden] { display: none; }
.md-emoji-item { min-width: 34px; font-size: 17px; font-weight: 400; }
.md-counter { margin: 6px 0 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.md-counter.is-split { color: var(--gold2); }

.md-preview { padding: 12px 14px; border-top: 1px solid var(--line-faint); background: var(--panel); }
.md-preview[hidden] { display: none; }
.md-preview .dc-empty { color: var(--muted); font-style: italic; }

.dc-message {
  --dc-bg: #313338;
  --dc-text: #dbdee1;
  --dc-muted: #949ba4;
  --dc-code: #2b2d31;
  --dc-mention-bg: rgba(88,101,242,.3);
  --dc-mention-text: #c9cdfb;
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-control);
  background: var(--dc-bg);
  color: var(--dc-text);
  font: 400 15px/1.375 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.dc-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--gold-gradient); }
.dc-content { min-width: 0; flex: 1; }
.dc-author { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.dc-name { color: #f2f3f5; font-weight: 600; }
.dc-tag { padding: 1px 5px; border-radius: 3px; background: #5865f2; color: #fff; font-size: 10px; font-weight: 600; }
.dc-ping[hidden] { display: none; }
.dc-body { overflow-wrap: anywhere; }
.dc-body p { margin: 0 0 4px; }
.dc-body h1, .dc-body h2, .dc-body h3 { margin: 8px 0 4px; color: #f2f3f5; font-weight: 700; line-height: 1.25; }
.dc-body .dc-h1 { font-size: 24px; }
.dc-body .dc-h2 { font-size: 20px; }
.dc-body .dc-h3 { font-size: 16px; }
.dc-body .dc-subtext { color: var(--dc-muted); font-size: 12px; }
.dc-body ul { margin: 4px 0; padding-left: 22px; }
.dc-body li { margin: 2px 0; }
.dc-body blockquote { margin: 4px 0; padding: 0 0 0 12px; border-left: 4px solid #4e5058; }
.dc-body code { padding: 1px 4px; border-radius: 4px; background: var(--dc-code); font: 13px/1.4 ui-monospace, Consolas, monospace; }
.dc-body pre { margin: 6px 0; padding: 8px 10px; border: 1px solid #1e1f22; border-radius: 4px; background: var(--dc-code); white-space: pre-wrap; }
.dc-body pre code { padding: 0; background: none; }
.dc-body a { color: #00a8fc; }
.dc-body u { text-decoration: underline; }
.dc-mention { padding: 0 3px; border-radius: 3px; background: var(--dc-mention-bg); color: var(--dc-mention-text); font-weight: 500; }
.dc-spoiler { border-radius: 3px; background: #1e1f22; color: transparent; cursor: pointer; transition: background var(--ease), color var(--ease); }
.dc-spoiler * { color: transparent; background: transparent; }
.dc-spoiler.is-open { background: rgba(255,255,255,.1); color: inherit; }
.dc-spoiler.is-open * { color: inherit; }
.dc-empty { color: var(--dc-muted); font-style: italic; }
