/* NEWS — Feed & Community */

.news-page {
  max-width: 800px;
}

.news-hero {
  margin-bottom: 28px;
}

.news-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.news-create-btn {
  flex-shrink: 0;
  margin-top: 4px;
  padding: 12px 22px;
}

.mock-banner {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 214, 10, 0.12);
  border: 1px solid rgba(255, 214, 10, 0.35);
  color: var(--cortis-yellow);
  font-size: 12px;
  font-weight: 700;
}

.news-alert {
  padding: 24px;
  text-align: center;
}

.news-alert code {
  background: var(--surface-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.page-news-create .news-page {
  max-width: 1120px;
}

.compose-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  margin-bottom: 48px;
}

.compose-article {
  padding: 24px 28px 28px;
}

.compose-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 88px;
}

.compose-panel {
  padding: 16px;
}

.compose-panel .editor-label {
  margin-bottom: 10px;
}

.compose-save .link-btn {
  margin-bottom: 10px;
}

.compose-save .editor-foot {
  margin-top: 0;
}

.compose-save .editor-actions {
  margin-left: 0;
  width: 100%;
}

.compose-save .antd-ui-btn {
  flex: 1;
  justify-content: center;
}

.page-news-create .cover-drop {
  min-height: 148px;
  margin-bottom: 0;
}

.page-news-create .cover-drop.has-image,
.page-news-create .cover-drop img {
  min-height: 148px;
  height: 148px;
}

.page-news-create .cover-empty {
  padding: 18px 12px;
}

.page-news-create .cover-icon {
  width: 36px;
  height: 36px;
}

.page-news-create .editor-body {
  min-height: 320px;
}

.page-news-create .editor-title {
  min-height: 48px;
  padding-top: 0;
}

.page-news-create .card:hover {
  border-color: var(--border);
  transform: none;
}

/* Ghost-style post editor */
.post-editor {
  margin-bottom: 36px;
  padding: 8px 4px 20px;
}

.editor-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.cover-drop {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  margin-bottom: 28px;
  border: 1.5px dashed color-mix(in srgb, var(--text-subtle) 55%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-muted) 70%, transparent);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cover-drop:hover,
.cover-drop:focus-visible,
.cover-drop.is-drag {
  outline: none;
  border-color: var(--cortis-green);
  background: color-mix(in srgb, var(--cortis-green) 8%, var(--surface-muted));
}

.cover-drop.has-image {
  display: block;
  min-height: 280px;
  border-style: solid;
  cursor: default;
}

.cover-drop img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.cover-drop img[hidden],
.cover-clear[hidden] {
  display: none !important;
}

.cover-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 32px 16px;
  text-align: center;
  pointer-events: none;
}

.cover-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--text-subtle);
}

.cover-icon .ico {
  width: 36px;
  height: 36px;
}

.cover-upload {
  font-size: 14px;
  font-weight: 700;
  color: #1677ff;
}

html:not([data-theme="light"]) .cover-upload {
  color: var(--cortis-green);
}

.cover-empty small {
  font-size: 12px;
  color: var(--text-subtle);
}

.cover-clear {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 1;
}

.cover-clear .ico {
  width: 16px;
  height: 16px;
}

.editor-cats {
  position: relative;
  margin-bottom: 8px;
}

.meta-line,
.tag-input {
  width: 100%;
  border: none;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  padding: 4px 0;
  text-align: left;
  cursor: pointer;
}

.cat-search {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 0 0 8px;
  padding: 0 2px;
}

.tag-plus {
  display: grid;
  place-items: center;
  color: #9A9A9A;
  flex-shrink: 0;
}

.tag-plus .ico {
  width: 16px;
  height: 16px;
}

.cat-search input {
  flex: 1;
  min-width: 0;
  width: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  caret-color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  outline: none;
}

.cat-search input::placeholder {
  color: var(--text-subtle);
  opacity: 1;
}

.tag-hint {
  min-height: 18px;
  margin: 0 0 12px;
  color: #9A9A9A;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.tag-hint:empty {
  display: none;
}

.tag-hint strong {
  color: #222;
  font-weight: 800;
}

html:not([data-theme="light"]) .tag-plus,
html:not([data-theme="light"]) .tag-hint {
  color: var(--text-subtle);
}

html:not([data-theme="light"]) .tag-hint strong {
  color: var(--text-primary);
}

.meta-line:hover {
  outline: none;
  color: var(--text-primary);
}

.meta-line {
  text-align: center;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--cortis-green) 16%, var(--surface-muted));
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
}

.chip .cat-ico {
  width: 12px;
  height: 12px;
}

.chip button {
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.cat-card {
  margin-top: 10px;
  padding: 16px 18px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.cat-card[hidden] { display: none; }

.cat-card h3 {
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
  color: #151515;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.cat-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
}

.cat-empty {
  width: 100%;
  margin: 8px 0 0;
  text-align: center;
  color: #9A9A9A;
  font-size: 13px;
}

.cat-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cat-opt .cat-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.cat-opt.featured {
  background: #FBF6EA;
  border: 1px solid #E4C48A;
  color: #5C4318;
}

.cat-opt.topic {
  background: #F1F1F1;
  border: 1px solid transparent;
  color: #2B2B2B;
}

.cat-opt:hover {
  transform: translateY(-1px);
}

.cat-opt.featured.is-on {
  background: #E8C98A;
  border-color: #D4A84B;
  color: #3D2A0C;
  box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.25);
}

.cat-opt.topic.is-on {
  background: #2B2B2B;
  color: #fff;
}

html:not([data-theme="light"]) .cat-card {
  background: var(--bg-elevated, var(--bg-card));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
}

html:not([data-theme="light"]) .cat-card h3 {
  color: var(--text-primary);
  border-bottom-color: var(--border);
}

html:not([data-theme="light"]) .cat-opt.featured {
  background: rgba(232, 201, 138, 0.14);
  border-color: rgba(232, 201, 138, 0.5);
  color: #F3E2B8;
}

html:not([data-theme="light"]) .cat-opt.topic {
  background: var(--surface-muted);
  color: var(--text-primary);
}

html:not([data-theme="light"]) .cat-opt.featured.is-on {
  background: #E8C98A;
  border-color: #E8C98A;
  color: #3D2A0C;
}

html:not([data-theme="light"]) .cat-opt.topic.is-on {
  background: var(--cortis-green);
  color: var(--text-on-accent);
}

.editor-title {
  display: block;
  width: 100%;
  border: none;
  resize: none;
  overflow: hidden;
  background: transparent;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  padding: 8px 0 12px;
  margin: 4px 0 4px;
}

.editor-title:focus {
  outline: none;
}

.editor-title::placeholder,
.tag-input::placeholder,
.editor-body.is-empty::before {
  color: color-mix(in srgb, var(--text-subtle) 85%, var(--text-muted));
}

.editor-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin: 16px 0 0;
  padding: 6px 8px;
  border-radius: 10px 10px 0 0;
  background: color-mix(in srgb, var(--surface-muted) 88%, var(--bg-card));
  border: 1px solid var(--border);
  border-bottom: none;
}

.tool-btn {
  width: 34px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tool-btn .ico {
  width: 16px;
  height: 16px;
}

.tool-btn[data-cmd="color"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tool-btn[data-cmd="codeblock"],
.tool-btn[data-cmd="code"] {
  font-size: 12px;
  letter-spacing: -0.04em;
}

.tool-btn:hover,
.tool-btn.is-on {
  background: color-mix(in srgb, var(--text-primary) 8%, transparent);
  color: var(--text-primary);
}

.toolbar-spacer {
  flex: 1;
}

.toolbar-more {
  position: relative;
}

.color-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  z-index: 30;
}

.more-menu[hidden] { display: none; }

.more-menu button {
  display: block;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.more-menu button:hover {
  background: var(--surface-muted);
}

.editor-body {
  position: relative;
  min-height: 240px;
  padding: 18px 4px 8px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.75;
  outline: none;
}

.editor-body.is-empty::before {
  content: attr(data-placeholder);
  position: absolute;
  left: 4px;
  top: 18px;
  pointer-events: none;
  font-size: 16px;
}

.editor-body:focus {
  border-color: color-mix(in srgb, var(--cortis-green) 40%, var(--border));
}

.editor-body h2,
.post-content h2 {
  font-size: 22px;
  margin: 1em 0 0.4em;
}

.editor-body blockquote,
.post-content blockquote {
  margin: 12px 0;
  padding: 4px 0 4px 14px;
  border-left: 3px solid var(--cortis-green);
  color: var(--text-muted);
}

.editor-body img,
.post-content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 12px 0;
}

.editor-body pre,
.post-content pre {
  background: var(--surface-muted);
  padding: 12px;
  border-radius: 8px;
  overflow: auto;
  font-size: 13px;
}

.editor-body code,
.post-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.editor-body iframe,
.post-content iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 10px;
  margin: 12px 0;
}

.editor-body .editor-image-wrap {
  position: relative;
  display: block;
  max-width: 100%;
  margin: 12px 0;
}

.editor-body .editor-image-wrap img {
  margin: 0;
  display: block;
  max-width: 100%;
  border-radius: 10px;
}

.editor-body .editor-image-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s, border-color 0.15s;
}

.editor-body .editor-image-remove:hover {
  background: rgba(180, 40, 40, 0.85);
  border-color: rgba(255, 120, 120, 0.6);
}

.editor-body .media-file-wrap {
  display: inline-flex;
  align-items: stretch;
  gap: 6px;
  max-width: 100%;
  margin: 8px 0;
  vertical-align: middle;
}

.editor-body .media-file-wrap .media-file {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.editor-body .media-file-remove {
  flex-shrink: 0;
  width: 36px;
  align-self: stretch;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.editor-body .media-file-remove:hover {
  background: rgba(255, 80, 80, 0.14);
  color: #ff7070;
  border-color: rgba(255, 80, 80, 0.45);
}

.editor-body a.media-file,
.post-content a.media-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 14px;
  margin: 8px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}

.editor-body a.media-file::before,
.post-content a.media-file::before {
  content: '▶';
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--cortis-green) 18%, transparent);
  color: var(--cortis-green);
  font-size: 11px;
}

.editor-body a.media-file:hover,
.post-content a.media-file:hover {
  border-color: color-mix(in srgb, var(--cortis-green) 40%, var(--border));
  background: color-mix(in srgb, var(--cortis-green) 8%, var(--surface-muted));
}

.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.draft-note {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-subtle);
}

.drafts-box {
  margin-bottom: 24px;
}

.drafts-box h2 {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
}

.drafts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.draft-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
}

.draft-card strong {
  font-size: 14px;
}

.draft-card span {
  font-size: 12px;
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  color: var(--cortis-green);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.link-btn:hover { color: var(--cortis-pink); }
.link-btn.danger { color: var(--cortis-red, #E63946); }
.link-btn[hidden] { display: none; }

.library-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.library-overlay[hidden] { display: none; }

.library-card {
  width: min(720px, 100%);
  max-height: min(80vh, 640px);
  overflow: auto;
  padding: 20px;
}

.library-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.library-card h2 {
  font-size: 16px;
  font-weight: 800;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.library-grid button {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  background: var(--surface-muted);
  cursor: pointer;
  aspect-ratio: 1;
}

.library-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.library-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px;
}

/* Tabs */
.news-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.news-tab {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.news-tab.active,
.news-tab:hover {
  background: var(--cortis-green);
  border-color: var(--cortis-green);
  color: var(--text-on-accent);
}

/* Feed */
.news-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feed-card {
  padding: 20px;
  transition: var(--transition);
}

.feed-card:hover {
  border-color: color-mix(in srgb, var(--cortis-green) 40%, var(--border));
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.post-meta-row time {
  font-size: 11px;
  color: var(--text-subtle);
  margin-left: auto;
}

.post-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

.post-badge.admin {
  background: rgba(148, 176, 145, 0.2);
  color: var(--cortis-green);
  border: 1px solid rgba(148, 176, 145, 0.35);
}

.post-badge.fan {
  background: rgba(255, 46, 147, 0.12);
  color: var(--cortis-pink);
  border: 1px solid rgba(255, 46, 147, 0.3);
}

.post-badge.pinned {
  background: rgba(255, 214, 10, 0.15);
  color: var(--cortis-yellow);
  border: 1px solid rgba(255, 214, 10, 0.35);
}

.feed-card h2,
.post-detail h1 {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.post-detail h1 {
  font-size: clamp(22px, 4vw, 28px);
}

.post-excerpt,
.post-content {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 14px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--cortis-green);
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.action-btn:hover,
.action-btn.liked {
  border-color: var(--cortis-pink);
  color: var(--cortis-pink);
  background: rgba(255, 46, 147, 0.08);
}

.action-btn.liked .ico {
  fill: var(--cortis-pink);
  stroke: var(--cortis-pink);
}

.action-btn.share-btn:hover {
  border-color: color-mix(in srgb, var(--cortis-green) 50%, var(--border));
  color: var(--cortis-green);
  background: color-mix(in srgb, var(--cortis-green) 10%, transparent);
}

.share-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}

.share-overlay[hidden] {
  display: none;
}

.share-card {
  width: min(420px, 100%);
  padding: 16px;
  margin-bottom: env(safe-area-inset-bottom, 0);
}

.share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.share-preview {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
}

.share-preview-image {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  display: block;
}

.share-preview-title {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.share-preview-url {
  display: block;
  font-size: 12px;
  color: var(--cortis-green);
  word-break: break-all;
  text-decoration: none;
}

.share-preview-url:hover {
  text-decoration: underline;
}

.share-preview-note {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--cortis-yellow);
}

.share-header h3 {
  font-size: 16px;
  font-weight: 800;
}

.share-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.share-options {
  display: grid;
  gap: 8px;
}

.share-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.share-opt:hover {
  border-color: color-mix(in srgb, var(--cortis-green) 40%, var(--border));
  background: color-mix(in srgb, var(--cortis-green) 8%, var(--surface-muted));
}

.share-opt-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.share-facebook .share-opt-icon {
  background: rgba(24, 119, 242, 0.15);
  color: #1877f2;
}

.share-x .share-opt-icon {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.share-line .share-opt-icon {
  background: rgba(0, 195, 0, 0.15);
  color: #00c300;
}

.share-copy .share-opt-icon,
.share-native .share-opt-icon {
  background: color-mix(in srgb, var(--cortis-green) 15%, transparent);
  color: var(--cortis-green);
}

@media (min-width: 640px) {
  .share-overlay {
    align-items: center;
  }

  .share-card {
    margin-bottom: 0;
  }
}

.action-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-subtle);
  font-weight: 600;
}

.read-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cortis-green);
  text-decoration: none;
}

.read-more:hover { color: var(--cortis-pink); }

.feed-loading,
.feed-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 14px;
}

.load-more-btn {
  display: block;
  margin: 24px auto 0;
}

/* Inline comments preview */
.comments-preview {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.comment-toggle {
  font-size: 12px;
  font-weight: 700;
  color: var(--cortis-green);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.comment-toggle:hover { color: var(--cortis-pink); }

.inline-comment-form {
  margin-top: 10px;
  display: none;
}

.inline-comment-form.open { display: block; }

.inline-comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  padding: 10px;
  margin-bottom: 8px;
  resize: vertical;
}

.inline-comments-list {
  list-style: none;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inline-comments-list li {
  font-size: 12px;
  padding: 8px 10px;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
}

.inline-comments-list strong {
  color: var(--cortis-green);
  margin-right: 6px;
}

/* Single post */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 20px;
}

.back-link:hover { color: var(--cortis-green); }

.post-detail {
  padding: 28px;
  margin-bottom: 20px;
}

.comments-section {
  padding: 24px;
}

.comments-section h2 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
}

.comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  padding: 12px;
  margin-bottom: 10px;
  resize: vertical;
}

.comment-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.comment-item {
  padding: 14px;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--cortis-green);
}

.comment-item strong {
  font-size: 13px;
  color: var(--cortis-green);
}

.comment-item time {
  font-size: 11px;
  color: var(--text-subtle);
  margin-left: 8px;
}

.comment-item p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.55;
}

.empty-comments {
  font-size: 13px;
  color: var(--text-subtle);
  text-align: center;
  padding: 16px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}

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

.modal-card {
  width: 100%;
  max-width: 400px;
  padding: 28px;
}

.modal-card h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.modal-card input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  padding: 12px;
  margin-bottom: 14px;
}

.feed-cover,
.post-cover {
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0;
  display: block;
  background: #111;
}

.feed-media {
  position: relative;
  display: block;
  margin-bottom: 14px;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
}

.feed-media-image .feed-cover,
.feed-media-video .feed-cover {
  width: 100%;
  max-height: 320px;
  min-height: 160px;
  object-fit: cover;
}

.feed-media-video .feed-cover {
  pointer-events: none;
}

.feed-media-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.feed-media-play::before {
  content: '';
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.feed-media-play::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid #fff;
}

.feed-media-label {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.feed-cover { max-height: 320px; }
.post-cover { max-height: 420px; margin-bottom: 20px; }

.post-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.post-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--surface-muted);
  color: var(--text-muted);
}

.post-chip .cat-ico {
  width: 12px;
  height: 12px;
}

.post-content {
  white-space: normal;
}

.post-content p { margin: 0 0 0.8em; }

@media (max-width: 900px) {
  .compose-layout {
    grid-template-columns: 1fr;
  }

  .compose-aside {
    position: static;
  }
}

@media (max-width: 600px) {
  .news-hero-top { flex-direction: column; }
  .news-create-btn { width: 100%; justify-content: center; }
  .editor-foot { flex-direction: column; align-items: stretch; }
  .editor-actions { margin-left: 0; width: 100%; }
  .editor-actions .btn-outline,
  .editor-actions .btn-primary { flex: 1; justify-content: center; }
  .editor-foot .btn-primary { width: auto; }
  .editor-title { font-size: 26px; }
  .cover-drop, .cover-drop img { min-height: 180px; height: 180px; }
  .page-news-create .cover-drop,
  .page-news-create .cover-drop.has-image,
  .page-news-create .cover-drop img {
    min-height: 160px;
    height: 160px;
  }
  .compose-article { padding: 18px 16px 20px; }
}
