/* ── Quill Editor Container ──────────────────────────────── */

/* CSS-переменные для редактора (fallback если не объявлены глобально) */
:root {
  --accent: #60a5fa;
  --card-bg: rgba(20, 20, 26, 0.90);
}

.editor-fallback-textarea {
  width: 100%;
  min-height: 360px;
  padding: 16px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
  line-height: 1.7;
  resize: vertical;
  box-sizing: border-box;
}

.editor-fallback-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.editor-container {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  transition: border-color .2s;
}
.editor-container:focus-within {
  border-color: var(--accent);
}

/* Quill toolbar стилизация */
.editor-container .ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 8px 12px;
}
.editor-container .ql-toolbar button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  margin-right: 2px;
}
.editor-container .ql-toolbar button.ql-header[value="2"],
.editor-container .ql-toolbar button.ql-header[value="3"] {
  width: auto;
  min-width: 40px;
  padding: 0 10px;
}
.editor-container .ql-toolbar button.ql-header[value="2"] svg,
.editor-container .ql-toolbar button.ql-header[value="3"] svg {
  display: none;
}
.editor-container .ql-toolbar button.ql-header[value="2"]::after,
.editor-container .ql-toolbar button.ql-header[value="3"]::after {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
}
.editor-container .ql-toolbar button.ql-header[value="2"]::after {
  content: 'H2';
}
.editor-container .ql-toolbar button.ql-header[value="3"]::after {
  content: 'H3';
}
.editor-container .ql-toolbar button.ql-header[value="2"].ql-active::after,
.editor-container .ql-toolbar button.ql-header[value="3"].ql-active::after {
  color: var(--accent);
}
.editor-container .ql-toolbar button:hover,
.editor-container .ql-toolbar button.ql-active,
.editor-container .ql-toolbar .ql-picker-label:hover,
.editor-container .ql-toolbar .ql-picker-label.ql-active {
  background: rgba(255, 255, 255, 0.08);
}
/* Явное выделение активной кнопки: фон + кольцо */
.editor-container .ql-toolbar button.ql-active {
  background: rgba(96, 165, 250, 0.14) !important;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.35);
}
.editor-toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 30px;
  padding: 0 10px;
  margin-right: 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.editor-toolbar-button:hover,
.editor-toolbar-button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  outline: none;
}
.editor-container .ql-toolbar .ql-stroke {
  stroke: var(--text);
}
.editor-container .ql-toolbar .ql-fill {
  fill: var(--text);
}
.editor-container .ql-toolbar .ql-picker-label {
  color: var(--text);
}
.editor-container .ql-toolbar .ql-picker-label::before,
.editor-container .ql-toolbar .ql-picker-item::before {
  color: var(--text);
}
.editor-container .ql-toolbar .ql-picker-options {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
}
.editor-container .ql-toolbar .ql-picker-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.editor-container .ql-toolbar button:hover .ql-stroke,
.editor-container .ql-toolbar button.ql-active .ql-stroke {
  stroke: var(--accent);
}
.editor-container .ql-toolbar button:hover .ql-fill,
.editor-container .ql-toolbar button.ql-active .ql-fill {
  fill: var(--accent);
}
.editor-container .ql-toolbar button:hover,
.editor-container .ql-toolbar button.ql-active {
  color: var(--accent);
}

/* ===== Color-picker (ql-color) dark-theme ===== */
.editor-container .ql-toolbar .ql-color-picker .ql-picker-label {
  padding: 0 4px;
  width: 28px;
}
.editor-container .ql-toolbar .ql-color-picker .ql-picker-label svg {
  width: 16px;
  height: 16px;
}
.editor-container .ql-toolbar .ql-color-picker .ql-picker-options {
  /* НЕ display:flex здесь — Quill сам управляет через display:none/block */
  width: 190px;
  padding: 8px;
  flex-wrap: wrap;
  gap: 5px;
  top: 34px;
  left: -8px;
  background: #1e2130;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}
/* Показываем flex-раскладку только когда Quill открыл дропдаун */
.editor-container .ql-toolbar .ql-color-picker.ql-expanded .ql-picker-options {
  display: flex !important;
}
.editor-container .ql-toolbar .ql-color-picker .ql-picker-item {
  float: none;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: 2px solid rgba(255,255,255,0.10);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.editor-container .ql-toolbar .ql-color-picker .ql-picker-item:hover,
.editor-container .ql-toolbar .ql-color-picker .ql-picker-item.ql-selected {
  border-color: rgba(96, 165, 250, 0.90);
  transform: scale(1.18);
}
/* Ячейка «без цвета» — косая полоска */
.editor-container .ql-toolbar .ql-color-picker .ql-picker-item[data-value=""] {
  background: linear-gradient(135deg,
    #e2e8f0 0%, #e2e8f0 49%,
    transparent 49%, transparent 51%,
    #f87171 51%, #f87171 100%
  ) !important;
  border-color: rgba(255,255,255,0.25);
}

.post-editor-page {
  max-width: 1400px;
  padding-top: 28px;
  padding-bottom: 56px;
}
.post-editor-hero {
  margin-bottom: 24px;
  padding: 30px 34px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 24px;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.18), transparent 38%), linear-gradient(135deg, rgba(17, 24, 39, 0.94), rgba(15, 23, 42, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.post-editor-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.post-editor-title {
  margin: 16px 0 10px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  font-weight: 800;
}
.post-editor-subtitle {
  max-width: 760px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}
.post-editor-form-card {
  display: block;
  padding: 26px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.72));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
}
.post-editor-sessionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.post-editor-sessionhint {
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.5;
}
.post-editor-sessionactions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.post-editor-sessionstatus {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}
.post-editor-sessionstatus[data-state="saved"],
.post-editor-sessionstatus[data-state="restored"] {
  color: #93c5fd;
}
.post-editor-sessionstatus[data-state="dirty"] {
  color: #fbbf24;
}
.post-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.post-editor-main {
  min-width: 0;
}
.post-editor-setup {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}
.post-editor-panel {
  padding: 20px 22px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.post-editor-panel--primary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025));
}
.post-editor-panel--editor {
  padding: 0;
  border: 0;
  background: transparent;
}
.post-editor-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.post-editor-panel__title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.post-editor-panel__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}
.post-editor-panel__badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(59, 130, 246, 0.9));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.post-editor-field {
  margin-bottom: 18px;
}
.post-editor-field .form-control {
  border-radius: 14px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.04);
}
.post-editor-field select.form-control {
  color: var(--text);
  appearance: auto;
}
.post-editor-field select.form-control.form-control--category {
  min-height: 48px;
  padding: 11px 14px;
  line-height: 1.35;
}
.post-editor-field select.form-control option {
  color: #111827;
  background: #ffffff;
  padding: 8px 10px;
}
.post-editor-settings-row {
  display: block;
  margin-bottom: 18px;
}
.post-editor-flags {
  display: grid;
  gap: 12px;
}
.post-editor-flags--compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, max-content));
  gap: 10px;
  margin-bottom: 18px;
}
.post-editor-caption--category {
  margin-top: 10px;
  margin-bottom: 0;
}
.post-editor-category-note {
  min-height: 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 13px 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}
.post-editor-flag {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}
.post-editor-flag--compact {
  padding: 10px 12px;
  border-radius: 12px;
  gap: 8px;
}
.post-editor-flag input {
  margin-top: 3px;
}
.post-editor-flag--compact input {
  margin-top: 2px;
  transform: scale(0.95);
}
.post-editor-flag span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.post-editor-flag--compact span {
  gap: 2px;
}
.post-editor-flag strong {
  font-size: 0.92rem;
}
.post-editor-flag--compact strong {
  font-size: 0.85rem;
}
.post-editor-flag small {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}
.post-editor-flag--compact small {
  font-size: 0.74rem;
  line-height: 1.35;
}
.post-editor-field textarea.form-control {
  min-height: 110px;
  resize: vertical;
}
.post-editor-caption {
  margin: 8px 0 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}
.post-editor-caption--bottom {
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 0.84rem;
}
.post-editor-error {
  margin-top: 8px;
  color: #f87171;
  font-size: 0.84rem;
}
.post-editor-upload-note {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.08);
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
}
.post-editor-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.editor-container .ql-editor pre,
.editor-container .ql-editor pre.ql-syntax,
.article-body pre,
.blog-body pre {
  margin: 1.4rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.98));
  color: #e2e8f0;
  font-family: 'Consolas', 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.92rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.rf-code-shell {
  margin: 1.45rem 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.22);
}

.rf-code-shell__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0.78rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.14), rgba(15, 23, 42, 0.32));
}

.rf-code-shell__label {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  color: #bfdbfe;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rf-code-shell__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 0.48rem 0.8rem;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
  color: #dbeafe;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.rf-code-shell__copy:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(30, 41, 59, 0.88);
}

.rf-code-shell__copy.is-copied {
  border-color: rgba(74, 222, 128, 0.4);
  color: #bbf7d0;
}

.rf-code-shell pre,
.article-body .rf-code-block,
.blog-body .rf-code-block {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.hljs-comment {
  color: #6a9955;
}

.hljs-keyword,
.hljs-literal {
  color: #569cd6;
}

.hljs-string {
  color: #ce9178;
}

.hljs-number {
  color: #b5cea8;
}

.hljs-title,
.hljs-class {
  color: #dcdcaa;
}

.hljs-built_in {
  color: #4ec9b0;
}

.hljs-variable,
.hljs-attr {
  color: #9cdcfe;
}

@media (max-width: 640px) {
  .rf-code-shell__header {
    padding: 0.72rem 0.85rem;
  }

  .rf-code-shell__copy {
    min-width: 96px;
    padding: 0.42rem 0.72rem;
  }

  .editor-container .ql-editor pre,
  .editor-container .ql-editor pre.ql-syntax,
  .article-body pre,
  .blog-body pre {
    padding: 0.9rem 0.95rem;
    font-size: 0.86rem;
  }
}

/* Quill editor area */
.editor-container .ql-container.ql-snow {
  border: none;
  font-size: 1.05rem;
  font-family: inherit;
}
.editor-container .ql-editor {
  min-height: 600px;
  max-height: none;
  padding: 24px 28px;
  line-height: 1.75;
  color: var(--text);
}
.editor-container .ql-editor.ql-blank::before {
  color: var(--text-muted);
  font-style: normal;
}

/* Quill content — заголовки, цитаты, списки */
.editor-container .ql-editor h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 1.2em 0 .5em;
}
.editor-container .ql-editor h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1em 0 .4em;
}
.editor-container .ql-editor blockquote {
  border-left: 4px solid var(--accent);
  margin: 1em 0;
  padding: 8px 16px;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: 0 8px 8px 0;
}
.editor-container .ql-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
  margin: 8px 0;
  display: block;
}
.editor-container .ql-editor hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2em 0;
}
.editor-container .ql-editor a {
  color: var(--accent);
  text-decoration: underline;
}
.editor-container .ql-editor iframe {
  display: block;
  width: 100%;
  min-height: 260px;
  margin: 1em 0;
  border: 0;
  border-radius: 14px;
  background: #000;
}
.editor-container .ql-editor img.is-selected,
.editor-container .ql-editor iframe.is-selected,
.editor-container .ql-editor pre.is-selected,
.editor-container .ql-editor pre.ql-syntax.is-selected {
  outline: 3px solid rgba(45, 156, 219, 0.55);
  outline-offset: 4px;
}
.editor-media-toolbar {
  position: absolute;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  z-index: 25;
}
.editor-media-toolbar.is-visible {
  display: flex;
  flex-wrap: wrap;
  max-width: 320px;
  row-gap: 6px;
}
.editor-media-toolbar .btn {
  min-width: 0;
  padding: 6px 10px;
}
/* Группа кнопок размера — отделена разделителем */
.editor-media-toolbar-sizes {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-left: 8px;
  border-left: 1px solid rgba(255,255,255,0.15);
}

/* Кастомный Video embed blot внутри редактора */
.ql-video-wrapper {
  position: relative;
  width: 100%;
  min-height: 260px;
  aspect-ratio: 16 / 9;
  margin: 1em 0;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}
.ql-video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Drop overlay */
.editor-drop-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .08);
  border: 3px dashed var(--accent);
  border-radius: 12px;
  z-index: 20;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  pointer-events: none;
}

/* ── Blog list page ──────────────────────────────────────── */

.blog-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.blog-search-bar input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  font-size: .95rem;
}
.blog-search-bar input:focus {
  outline: none;
  border-color: var(--accent);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.blog-card-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg);
}
.blog-card-cover-placeholder {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt, #2D9CDB));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.blog-card-body {
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-meta {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.blog-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}
.blog-card-title a {
  color: var(--text);
  text-decoration: none;
}
.blog-card-title a:hover {
  color: var(--accent);
}
.blog-card-summary {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-muted);
}

/* ── Blog detail page ────────────────────────────────────── */

.article-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 16px 56px;
}
.article-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
}
.article-content-card,
.article-feedback-card {
  padding: 28px 30px;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}
.article-shell {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.article-hero-card--plain {
  min-height: 0;
}
.article-hero-stage {
  position: relative;
  min-height: 420px;
}
.article-hero-card--plain .article-hero-stage {
  min-height: 0;
}
.article-hero-cover {
  position: absolute;
  inset: 0;
}
.article-hero-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(15, 23, 42, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(6, 8, 14, 0.22) 0%, rgba(7, 10, 16, 0.32) 24%, rgba(7, 10, 16, 0.62) 52%, rgba(6, 8, 12, 0.9) 82%, rgba(4, 6, 10, 0.97) 100%);
}
.article-hero-inner {
  position: relative;
  z-index: 2;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 30px;
}
.article-hero-card--plain .article-hero-inner {
  min-height: 0;
}
.article-hero-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: auto;
}
.article-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.article-hero-topbar .btn,
.article-hero-actions .btn {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(12, 14, 20, 0.58);
  color: #f8fafc;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.26);
  backdrop-filter: blur(12px);
}
.article-hero-topbar .btn:hover,
.article-hero-actions .btn:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(24, 26, 34, 0.88);
  color: #ffffff;
}
.article-hero-header {
  max-width: 700px;
}
.article-hero-card:not(.article-hero-card--plain) .article-hero-header {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.article-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.article-badges--hero {
  margin-bottom: 22px;
}
.article-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
}
.article-badge--category {
  gap: 8px;
  text-decoration: none;
  color: #f8fafc;
  background: rgba(8, 12, 18, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.18);
}
.article-badge--category:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(14, 18, 28, 0.8);
}
.article-badge__sep {
  color: rgba(226, 232, 240, 0.54);
}
.article-badge--accent {
  background: rgba(99, 102, 241, 0.16);
  color: #c7d2fe;
}
.article-badge--muted {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}
.article-header {
  margin-bottom: 0;
}
.article-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 0;
}
.article-hero-card:not(.article-hero-card--plain) .article-title {
  color: #ffffff;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.44);
}
.article-lead {
  margin: 0 0 22px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
}
.article-hero-footer {
  position: relative;
  z-index: 2;
  display: block;
  padding: 22px 30px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(9, 12, 18, 0.9), rgba(10, 14, 22, 0.98));
}
.article-hero-card--plain .article-hero-footer {
  background: rgba(10, 14, 22, 0.78);
}
.article-hero-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-width: 0;
}
.article-author-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 6px;
  min-width: 0;
}
.article-author-inline__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.article-author-inline__avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(249, 115, 22, 0.12));
  border: 1px solid rgba(251, 191, 36, 0.24);
  box-shadow: 0 10px 26px rgba(249, 115, 22, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  overflow: visible;
}
.article-author-inline__avatar::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 18px;
  border: 1px solid rgba(251, 191, 36, 0.14);
  opacity: 0.65;
  animation: author-beacon-ring 4.8s ease-in-out infinite;
}
.article-author-inline__avatar-glyph {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fde68a, #fb923c);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12), 0 0 20px rgba(249, 115, 22, 0.28);
  animation: author-beacon-core 4.8s ease-in-out infinite;
}
.article-author-inline__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}
.article-author-inline__eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(251, 191, 36, 0.82);
  line-height: 1;
  margin-left: 12px;
  width: max-content;
}
.article-author-inline__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  color: rgba(226, 232, 240, 0.76);
  font-size: 0.9rem;
}
.article-author-inline__meta-item {
  white-space: nowrap;
}
.article-author-inline__meta-dot {
  color: rgba(148, 163, 184, 0.48);
}
.article-hero-footer-label,
.article-author-panel__eyebrow,
.article-meta-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.article-hero-footer-label {
  color: rgba(191, 219, 254, 0.82);
}
.article-lead--hero-footer {
  margin: 0;
  color: rgba(241, 245, 249, 0.92);
  text-shadow: none;
  max-width: 58ch;
}
.article-hero-card:not(.article-hero-card--plain) .article-lead {
  color: rgba(241, 245, 249, 0.96);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}
.article-lead--inline {
  margin-bottom: 26px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: .92rem;
  color: #d7deea;
  flex-wrap: nowrap;
}
.article-hero-card:not(.article-hero-card--plain) .article-meta {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.article-meta .author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt, #60a5fa));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.26);
}
.article-meta-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.article-author-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.article-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.article-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.article-meta-label {
  color: rgba(191, 219, 254, 0.72);
}
.article-meta-value {
  color: #f8fafc;
  font-weight: 700;
}
.article-author-main-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14), rgba(249, 115, 22, 0.05));
  border: 1px solid rgba(251, 191, 36, 0.18);
  color: #f8fafc;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 rgba(251, 191, 36, 0);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  animation: author-name-glow 4.8s ease-in-out infinite;
}
.article-author-main-link strong {
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.article-author-main-link:hover {
  color: #fff7ed;
  border-color: rgba(251, 191, 36, 0.36);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(249, 115, 22, 0.08));
  transform: translateY(-1px);
}
.article-author-main-link--static {
  color: #f8fafc;
}
@keyframes author-name-glow {
  0%,
  100% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 rgba(251, 191, 36, 0);
    border-color: rgba(251, 191, 36, 0.18);
  }
  50% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 24px rgba(249, 115, 22, 0.16);
    border-color: rgba(251, 191, 36, 0.28);
  }
}
@keyframes author-beacon-ring {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.9;
  }
}
@keyframes author-beacon-core {
  0%,
  100% {
    transform: scale(0.96);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12), 0 0 20px rgba(249, 115, 22, 0.28);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.16), 0 0 24px rgba(249, 115, 22, 0.34);
  }
}
@media (prefers-reduced-motion: reduce) {
  .article-author-inline__avatar::before,
  .article-author-inline__avatar-glyph,
  .article-author-main-link {
    animation: none;
  }
}
.article-author-external {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #dbeafe;
  text-decoration: none;
  font-size: 0.9rem;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.article-author-external:hover {
  transform: translateY(-1px);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
}
.article-meta-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.article-author-subline {
  color: rgba(226, 232, 240, 0.76);
}
.author-archive-page {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.author-archive-hero,
.author-archive-group {
  padding: 28px 30px;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}
.author-archive-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.author-archive-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.author-archive-eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text-muted);
}
.author-archive-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}
.author-archive-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}
.author-archive-groups {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.author-archive-group__eyebrow {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.author-archive-group__title {
  margin: 0 0 18px;
  font-size: 1.05rem;
  line-height: 1.5;
}
.author-archive-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.author-archive-item {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.author-archive-item__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 6px;
}
.author-archive-item__title {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}
.author-archive-item__title:hover {
  color: var(--accent);
}
.author-archive-item__summary {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.65;
}
.article-content-card {
  overflow: hidden;
}
.article-body {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--text);
}
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2em 0 .5em;
}
.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5em 0 .4em;
}
.article-body p {
  margin: 0 0 1.2em;
}
/* Пустые абзацы <p><br></p> не должны давать тот же отступ что и полные абзацы */
.article-body p:has(> br:only-child) {
  margin-bottom: 0.3em;
}
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
  margin: 16px 0;
  cursor: zoom-in;
}

/* ── Lightbox ─────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lightbox-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.lightbox-overlay__img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  transform: scale(0.94);
  transition: transform 0.22s ease;
  cursor: default;
}
.lightbox-overlay.open .lightbox-overlay__img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.65;
  padding: 4px 10px;
  border-radius: 6px;
  transition: opacity 0.15s, background 0.15s;
}
.lightbox-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}
.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 10px 20px;
  margin: 1.2em 0;
  background: var(--bg);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
}
.article-body ul, .article-body ol {
  margin: 0 0 1.2em;
  padding-left: 1.6em;
  list-style-position: outside;
}
.article-body ul {
  list-style-type: disc;
}
.article-body ul ul {
  list-style-type: circle;
}
.article-body ul ul ul {
  list-style-type: square;
}
.article-body ol {
  list-style-type: decimal;
}
.article-body ol ol {
  list-style-type: lower-alpha;
}
.article-body ol ol ol {
  list-style-type: lower-roman;
}
.article-body li {
  display: list-item;
  margin: 0.4em 0;
  padding-left: 0.15em;
}
.article-body li::marker {
  color: rgba(226, 232, 240, 0.88);
  font-weight: 700;
}
.article-body hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2em 0;
}
.article-body a {
  color: var(--accent);
}
.article-external-box {
  margin-top: 24px;
  padding: 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.article-external-box p {
  margin: 0 0 14px;
  color: var(--text-muted);
}
.article-body .video-embed,
.article-body .ql-video-wrapper,
.article-body iframe {
  position: relative;
  width: 100%;
  min-height: 260px;
  aspect-ratio: 16 / 9;
  margin: 1.2em 0;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}
.article-body .video-embed iframe,
.article-body .ql-video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.article-feedback-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.article-feedback-title {
  font-size: 1rem;
  font-weight: 700;
}
.article-feedback-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.article-feedback-note {
  margin-top: 6px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.article-viewers {
  margin-top: 6px;
  justify-content: center;
}
.article-back-row {
  margin-top: 2px;
}

@media (max-width: 980px) {
  .post-editor-sessionbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-editor-sessionactions {
    width: 100%;
    justify-content: space-between;
  }

  .post-editor-grid {
    grid-template-columns: 1fr;
  }

  .post-editor-setup {
    grid-template-columns: 1fr;
  }

  .post-editor-panel__head {
    flex-direction: column;
  }

  .editor-media-toolbar {
    left: 12px !important;
    right: 12px;
    width: auto;
    justify-content: space-between;
  }

  .post-editor-settings-row {
    grid-template-columns: 1fr;
  }

  .article-hero-topbar {
    flex-direction: column;
  }

  .article-hero-actions {
    justify-content: flex-start;
  }

  .author-archive-hero,
  .author-archive-group {
    padding: 22px 20px;
  }

  .author-archive-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .post-editor-hero,
  .post-editor-form-card,
  .article-content-card,
  .article-feedback-card {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .article-feedback-card {
    justify-content: center;
    text-align: center;
  }

  .article-container {
    max-width: none;
    padding: 0 0 24px;
  }

  .article-shell {
    gap: 0;
  }

  .article-hero-card,
  .article-content-card,
  .article-feedback-card {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .article-hero-card {
    border-top: 0;
  }

  .article-hero-stage {
    min-height: 320px;
  }

  .article-hero-topbar {
    gap: 10px;
    margin-bottom: 18px;
  }

  .article-hero-topbar .btn,
  .article-hero-actions .btn {
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 14px;
    box-shadow: none;
  }

  .article-badges {
    gap: 8px;
    margin-bottom: 18px;
  }

  .article-badge {
    padding: 6px 10px;
    font-size: 0.74rem;
  }

  .article-title {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
    line-height: 1.08;
    margin-bottom: 12px;
  }

  .article-lead {
    margin-bottom: 18px;
    font-size: 0.98rem;
    line-height: 1.68;
  }

  .article-hero-card:not(.article-hero-card--plain) .article-hero-header {
    padding: 0;
    border-radius: 0;
    background: none;
  }

  .article-hero-card:not(.article-hero-card--plain) .article-lead {
    color: rgba(241, 245, 249, 0.98);
  }

  .article-hero-footer {
    padding: 18px 16px 20px;
  }

  .article-author-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .article-author-inline__identity {
    align-items: flex-start;
  }

  .article-author-inline__eyebrow {
    margin-left: 0;
  }

  .article-author-inline__meta {
    justify-content: flex-start;
    gap: 6px;
  }

  .article-meta {
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }

  .article-meta-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .article-body {
    font-size: 1rem;
    line-height: 1.78;
  }

  .article-body h2 {
    font-size: 1.32rem;
    margin: 1.65em 0 0.45em;
  }

  .article-body h3 {
    font-size: 1.12rem;
    margin: 1.4em 0 0.4em;
  }

  .article-body p,
  .article-body ul,
  .article-body ol,
  .article-body blockquote,
  .article-body .rf-code-shell,
  .article-body .video-embed,
  .article-body .ql-video-wrapper,
  .article-body iframe {
    margin-top: 0;
    margin-bottom: 1rem;
  }

  .article-body ul,
  .article-body ol {
    padding-left: 1.3em;
  }

  .article-body li {
    margin: 0.34em 0;
  }

  .post-editor-sessionstatus {
    white-space: normal;
  }

  .article-hero-inner {
    min-height: 320px;
    padding: 24px 16px;
  }

  .article-content-card {
    padding: 22px 16px 18px;
    border-top: 0;
    background: transparent;
  }

  .article-feedback-card {
    padding: 16px 16px 18px;
    border-top: 0;
    border-bottom: 0;
    background: transparent;
  }

  .comments-section {
    margin-top: 24px !important;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ── Link dialog ─────────────────────────────────────────── */
.editor-dialog-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.editor-dialog-overlay.open {
  display: flex;
}
.editor-dialog {
  background: linear-gradient(180deg, rgba(15,23,42,0.98), rgba(17,24,39,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 24px;
  min-width: 420px;
  max-width: min(92vw, 760px);
  box-shadow: 0 22px 70px rgba(0,0,0,.45);
}
.editor-dialog h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}
.editor-dialog input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: .95rem;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.editor-dialog input:focus {
  outline: none;
  border-color: var(--accent);
}
.editor-dialog-status {
  margin-bottom: 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.editor-dialog-preview {
  position: relative;
  min-height: 210px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.editor-dialog-preview.is-ready {
  border-style: solid;
}
.editor-dialog-preview iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.editor-dialog-preview__placeholder {
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
  padding: 24px;
}
.editor-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.post-preview-overlay {
  overflow-y: auto;
  padding: 24px 16px;
}
.post-preview-dialog {
  width: min(1100px, 96vw);
  margin: auto;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(15,23,42,0.99), rgba(17,24,39,0.99));
  box-shadow: 0 28px 80px rgba(0,0,0,0.42);
  padding: 20px;
}
.post-preview-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.post-preview-dialog__header h3 {
  margin: 0;
  font-size: 1.1rem;
}
.post-preview-dialog__body {
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding-right: 4px;
}
.article-container--preview {
  max-width: 100%;
  padding: 0;
}
.article-preview-cover-hidden {
  display: none;
}

/* ===== Cover card preview (16:9 thumbnail) in post editor ===== */
.cover-card-preview {
  margin-top: 10px;
}
.cover-card-preview__label {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 6px;
}
.cover-card-preview__frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  position: relative;
}
.cover-card-preview__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.cover-card-preview__meta {
  font-size: 0.74rem;
  color: var(--text-muted, #94a3b8);
  margin: 5px 0 0;
  line-height: 1.4;
}
