/**
 * ChaosBuzz - social blog module by ChaosTech (Mikomi LTD)
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to a commercial license from Mikomi LTD.
 * Use, copy, modification or distribution of this file without the written
 * permission of Mikomi LTD is strictly prohibited.
 *
 * @author    Mikomi LTD
 * @copyright 2026 Mikomi LTD
 * @license   Commercial license, see LICENSE.txt
 */

/* ChaosBuzz - front styles (own design language: rounded-square avatars, reaction chips, soft cards) */

.mkf, .mkf-home {
  --mkf-accent: #4f46e5;
  --mkf-accent-2: #a855f7;
  --mkf-ink: #17162b;
  --mkf-muted: #6b6a85;
  --mkf-line: #e8e7f2;
  --mkf-soft: #f5f4fb;
  --mkf-card: #fff;
  --mkf-radius: 20px;
  --mkf-shadow: 0 1px 2px rgba(23, 22, 43, .04), 0 12px 28px -18px rgba(37, 25, 110, .35);
  color: var(--mkf-ink);
  font-size: 15px;
  line-height: 1.5;
}
.mkf-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mkf [hidden], .mkf-home [hidden], .mkf-lightbox [hidden], .mkf-lightbox[hidden] { display: none !important; }
.mkf svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.mkf svg.mkf-ri { width: 22px; height: 22px; }
.mkf-page { background: transparent; box-shadow: none; border: 0; padding: 0; }
.mkf { max-width: 700px; margin: 24px auto 48px; }
.mkf-feed { display: flex; flex-direction: column; gap: 20px; }

/* ---------- avatars (rounded squares) ---------- */
.mkf-avatar {
  width: 44px; height: 44px; border-radius: 14px; object-fit: contain; padding: 3px;
  background: #fff; border: 1px solid var(--mkf-line); flex: none; display: inline-block;
}
.mkf-avatar--sm { width: 32px; height: 32px; border-radius: 10px; padding: 2px; }
.mkf-avatar--lg { width: 88px; height: 88px; border-radius: 24px; padding: 6px; box-shadow: 0 6px 18px -8px rgba(0,0,0,.35); }
.mkf-avatar--initials {
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
  color: #fff; font-weight: 700; font-size: 12px; border: 0; letter-spacing: .02em;
}

/* ---------- cover ---------- */
.mkf-cover {
  position: relative; display: flex; align-items: flex-end; gap: 18px;
  padding: 64px 24px 20px; margin-bottom: 20px; border-radius: var(--mkf-radius); overflow: hidden;
  background: var(--mkf-card); border: 1px solid var(--mkf-line); box-shadow: var(--mkf-shadow);
}
.mkf-cover::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 92px;
  background: linear-gradient(120deg, var(--mkf-accent), var(--mkf-accent-2));
}
.mkf-cover > * { position: relative; }
.mkf-cover > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mkf-cover__photo {
  position: absolute; inset: 0 0 auto 0; width: 100%; height: 150px; object-fit: cover;
}
.mkf-cover--photo { padding-top: 118px; }
.mkf-cover--photo::before { display: none; }

/* ---------- hashtags ---------- */
.mkf a.mkf-tag { color: var(--mkf-accent); font-weight: 600; text-decoration: none; }
.mkf a.mkf-tag:hover { text-decoration: underline; }
.mkf-tagbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 20px; padding: 12px 16px; border-radius: 14px;
  background: color-mix(in srgb, var(--mkf-accent) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--mkf-accent) 25%, #fff);
}
.mkf-tagbar strong { color: var(--mkf-accent); }
.mkf-tagbar > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.mkf-tagbar a { color: var(--mkf-accent); font-weight: 600; }
.mkf-cover__title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.mkf-cover__sub { margin: 4px 0 0; color: var(--mkf-muted); }

/* ---------- composer ---------- */
.mkf-composer {
  background: var(--mkf-card); border: 1.5px dashed color-mix(in srgb, var(--mkf-accent) 35%, #fff);
  border-radius: var(--mkf-radius); padding: 16px; margin-bottom: 20px;
}
.mkf-composer__row { display: flex; gap: 12px; align-items: flex-start; }
.mkf-composer__input {
  flex: 1; border: 0; resize: none; background: transparent; font: inherit; font-size: 17px;
  min-width: 0; min-height: 48px; max-height: 320px; outline: none; color: inherit; padding: 10px 2px;
}
.mkf-composer__previews { margin-top: 10px; }
.mkf-composer__previews:empty { display: none; }
.mkf .mkf-composer__previews .mkf-grid { margin: 0; }
.mkf .mkf-composer__extra-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; margin-top: 8px; }
.mkf .mkf-preview { position: relative; min-width: 0; min-height: 0; border-radius: 12px; overflow: hidden; }
.mkf .mkf-composer__extra-previews .mkf-preview { aspect-ratio: 1 / 1; }
.mkf .mkf-composer__extra-previews .mkf-preview > img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; display: block !important; float: none !important; }
.mkf .mkf-preview button {
  position: absolute; z-index: 1; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 8px;
  border: 0; background: var(--mkf-ink); color: #fff; cursor: pointer; font-size: 15px; line-height: 24px; padding: 0;
}
.mkf .mkf-composer__layout { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; margin: 8px 0 0; }
.mkf .mkf-composer__layout select { border: 1px solid var(--mkf-line); border-radius: 10px; padding: 6px 10px; background: #fff; color: var(--mkf-ink); font: inherit; max-width: 100%; }
.mkf-composer__video {
  display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px;
  background: var(--mkf-soft); border-radius: 12px; color: var(--mkf-muted);
}
.mkf-composer__video input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: inherit; color: var(--mkf-ink); }
.mkf-composer__video.is-ok { color: #16a34a; }
.mkf-composer__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.mkf-composer__tools { display: flex; gap: 8px; flex-wrap: wrap; }
.mkf-composer__tool {
  display: inline-flex; align-items: center; gap: 6px; margin: 0; cursor: pointer;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--mkf-line); background: #fff;
  color: var(--mkf-ink); font-weight: 600; font-size: 14px;
}
.mkf-composer__tool:hover { border-color: var(--mkf-accent); color: var(--mkf-accent); }
.mkf-btn-primary {
  background: linear-gradient(120deg, var(--mkf-accent), var(--mkf-accent-2)); color: #fff; border: 0;
  border-radius: 999px; padding: 9px 26px; font-weight: 700; font-size: 15px; cursor: pointer;
}
.mkf-btn-primary:disabled { opacity: .4; cursor: default; }

/* ---------- post ---------- */
.mkf-post {
  position: relative; background: var(--mkf-card); border: 1px solid var(--mkf-line);
  border-radius: var(--mkf-radius); box-shadow: var(--mkf-shadow); padding: 18px 0 6px;
}
.mkf-post.is-pinned { border-color: color-mix(in srgb, var(--mkf-accent) 40%, #fff); }
.mkf-post__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 0 20px; }
.mkf-post__meta { flex: 1; min-width: 0; line-height: 1.25; }
.mkf-post__author { display: block; font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.mkf-post__sub { color: var(--mkf-muted); font-size: 13px; overflow-wrap: anywhere; }
.mkf-post__sub a { color: inherit; }
.mkf-post__sub a:hover { color: var(--mkf-accent); }
.mkf-pin-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--mkf-accent) 10%, #fff); color: var(--mkf-accent); font-size: 12px; font-weight: 700;
}
.mkf-pin-badge svg { width: 14px; height: 14px; }

.mkf-post__text { padding: 12px 20px 4px; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.mkf-post__text a, .mkf-comment__text a { color: var(--mkf-accent); text-decoration: underline; text-underline-offset: 2px; }
.mkf-post__text.is-clamped {
  max-height: 9.6em; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent);
}
.mkf-see-more { border: 0; background: none; padding: 2px 20px 0; font-weight: 700; color: var(--mkf-accent); cursor: pointer; font-size: 14px; }

/* ---------- video ---------- */
.mkf-video {
  position: relative; margin: 12px 20px 0; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #3b3970, #121126);
}
.mkf-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkf-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mkf-video__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px;
  border-radius: 24px; border: 0; cursor: pointer; color: #fff;
  background: linear-gradient(120deg, var(--mkf-accent), var(--mkf-accent-2)); box-shadow: 0 10px 30px -8px rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; transition: transform .15s;
}
.mkf-video__play:hover { transform: translate(-50%, -50%) scale(1.06); }
.mkf .mkf-video__play svg { width: 34px; height: 34px; }
.mkf-video__link {
  position: absolute; right: 10px; bottom: 10px; font-size: 12px; color: #fff; background: rgba(0,0,0,.55);
  padding: 4px 10px; border-radius: 999px;
}
.mkf-video.is-playing .mkf-video__play, .mkf-video.is-playing .mkf-video__link, .mkf-video.is-playing img { display: none; }

/* ---------- photo grid (padded, rounded) ---------- */
.mkf .mkf-grid { display: grid; gap: 6px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 20px 0; }
.mkf .mkf-grid > .mkf-grid__item { position: relative; display: block; min-width: 0; min-height: 0; overflow: hidden; aspect-ratio: 1 / 1; border-radius: 14px; background: var(--mkf-soft); }
/* Themes often force img height:auto. Fixed collage cells require absolute fill. */
.mkf .mkf-grid .mkf-grid__item > img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none; object-fit: cover; float: none !important; display: block !important; margin: 0; transition: transform .3s; }
.mkf .mkf-grid__item:hover > img { transform: scale(1.03); }
.mkf .mkf-grid--3:not(.mkf-grid--layout-square) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 3 / 2; }
.mkf .mkf-grid--3:not(.mkf-grid--layout-square) > .mkf-grid__item { aspect-ratio: auto; }
.mkf .mkf-grid--3:not(.mkf-grid--layout-square) > .mkf-grid__item:first-child { grid-row: span 2; }
.mkf .mkf-grid--3.mkf-grid--layout-square { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mkf .mkf-grid--2.mkf-grid--layout-feature { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); aspect-ratio: 3 / 2; }
.mkf .mkf-grid--4.mkf-grid--layout-feature { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(3, minmax(0, 1fr)); aspect-ratio: 4 / 3; }
.mkf .mkf-grid--layout-feature:not(.mkf-grid--1) > .mkf-grid__item { aspect-ratio: auto; }
.mkf .mkf-grid--4.mkf-grid--layout-feature > .mkf-grid__item:first-child { grid-row: span 3; }
.mkf .mkf-grid--4 > .mkf-grid__item:nth-child(n+5) { display: none; }
/* A single photo always keeps its natural ratio, regardless of the collage preset. */
.mkf .mkf-grid--1 { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; aspect-ratio: auto; }
.mkf .mkf-grid--1 > .mkf-grid__item { aspect-ratio: auto; max-height: none; }
.mkf .mkf-grid--1 .mkf-grid__item > img { position: static; height: auto !important; object-fit: contain; }
.mkf .mkf-grid--1 .mkf-grid__item:hover > img { transform: none; }
.mkf-grid__more {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(23, 22, 43, .55); color: #fff; font-size: 28px; font-weight: 800;
}

/* ---------- reactions bar ---------- */
.mkf-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px 10px; }
.mkf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mkf-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 5px; border-radius: 12px;
  border: 1px solid var(--mkf-line); background: var(--mkf-soft); cursor: pointer; font-weight: 700; font-size: 13px; color: var(--mkf-ink);
}
.mkf-chip:hover { border-color: color-mix(in srgb, var(--mkf-accent) 45%, #fff); }
.mkf-chip.is-active { border-color: var(--mkf-accent); background: color-mix(in srgb, var(--mkf-accent) 9%, #fff); color: var(--mkf-accent); }
.mkf .mkf-chip svg.mkf-ri { width: 20px; height: 20px; }
.mkf-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; margin-left: auto; }
.mkf-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--mkf-line); background: #fff; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--mkf-muted);
  -webkit-touch-callout: none; user-select: none;
}
.mkf-pill, .mkf-btn-primary, .mkf-composer__tool { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.mkf-pill > span { min-width: 0; }
.mkf-react { min-width: 0; max-width: 100%; }
.mkf-pill:hover { color: var(--mkf-accent); border-color: var(--mkf-accent); }
.mkf-pill.is-active { color: var(--mkf-accent); border-color: var(--mkf-accent); background: color-mix(in srgb, var(--mkf-accent) 7%, #fff); }
.mkf-pill.is-active svg.mkf-ri { animation: mkf-pop .35s ease; }
@keyframes mkf-pop { 50% { transform: scale(1.35) rotate(-8deg); } }
.mkf-react { position: relative; }
.mkf-picker {
  position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 30; display: flex; gap: 2px; padding: 6px;
  background: #fff; border: 1px solid var(--mkf-line); border-radius: 18px; box-shadow: 0 16px 40px -12px rgba(23,22,43,.35);
  animation: mkf-rise .16s ease-out;
}
.mkf-picker button {
  position: relative; width: 46px; height: 46px; border: 0; background: none; border-radius: 14px; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: transform .14s ease, background .14s;
}
.mkf .mkf-picker svg.mkf-ri { width: 34px; height: 34px; }
.mkf-picker button:hover, .mkf-picker button:focus-visible { transform: translateY(-5px) scale(1.18); outline: none; }
.mkf-picker button.is-current { background: var(--mkf-soft); }
.mkf-picker__label {
  position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--mkf-ink); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity .12s;
}
.mkf-picker button:hover .mkf-picker__label, .mkf-picker button:focus-visible .mkf-picker__label { opacity: 1; }
@keyframes mkf-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- comments ---------- */
.mkf-comments { border-top: 1px solid var(--mkf-line); margin: 0 20px; padding: 12px 0 10px; }
.mkf-comments__more { font-weight: 700; margin: 0 0 10px; font-size: 13px; color: var(--mkf-accent); }
.mkf-comment { display: flex; gap: 10px; padding: 8px 0; animation: mkf-fade .25s ease; }
.mkf-comment + .mkf-comment { border-top: 1px dashed var(--mkf-line); }
.mkf-comment__body { min-width: 0; flex: 1; }
.mkf-comment__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; font-size: 13px; }
.mkf-comment__author { min-width: 0; max-width: 100%; overflow-wrap: anywhere; font-size: 14px; }
.mkf-comment__badge {
  min-width: 0; max-width: 100%; overflow-wrap: anywhere;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #fff;
  background: linear-gradient(120deg, var(--mkf-accent), var(--mkf-accent-2)); padding: 1px 7px; border-radius: 6px;
}
.mkf-comment__time { color: var(--mkf-muted); }
.mkf-comment__delete { font-size: 12px; margin-left: auto; }
.mkf-comment__text { font-size: 15px; overflow-wrap: anywhere; margin-top: 2px; }
.mkf-comment-form { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; }
.mkf-comment-form__box {
  flex: 1; display: flex; align-items: flex-end; border: 1px solid var(--mkf-line); border-radius: 14px; padding: 3px 4px 3px 12px; background: #fff;
}
.mkf-comment-form__box:focus-within { border-color: var(--mkf-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mkf-accent) 15%, transparent); }
.mkf-comment-form textarea {
  flex: 1; border: 0; background: transparent; resize: none; outline: none; font: inherit; font-size: 15px;
  min-width: 0; padding: 7px 0; min-height: 34px; max-height: 160px; color: inherit;
}
.mkf-comment-form__send {
  flex: none; width: 34px; height: 34px; border-radius: 11px; border: 0; cursor: pointer; color: #fff;
  background: linear-gradient(120deg, var(--mkf-accent), var(--mkf-accent-2)); display: inline-flex; align-items: center; justify-content: center;
}
.mkf .mkf-comment-form__send svg { width: 18px; height: 18px; }
.mkf-login-hint { margin: 6px 0 4px; color: var(--mkf-muted); font-size: 14px; }
.mkf-login-hint a { color: var(--mkf-accent); font-weight: 700; }
.mkf-link { background: none; border: 0; padding: 0; color: var(--mkf-muted); cursor: pointer; font: inherit; }
.mkf-link:hover { color: var(--mkf-accent); }

/* ---------- menu ---------- */
.mkf-icon-btn {
  width: 36px; height: 36px; border-radius: 12px; border: 0; background: none; cursor: pointer; color: var(--mkf-muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.mkf-icon-btn:hover { background: var(--mkf-soft); color: var(--mkf-ink); }
.mkf-menu-wrap { position: relative; }
.mkf-menu {
  position: absolute; right: 0; top: 40px; z-index: 20; min-width: 180px; padding: 6px;
  background: #fff; border: 1px solid var(--mkf-line); border-radius: 14px; box-shadow: 0 16px 40px -12px rgba(23,22,43,.3);
}
.mkf-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 9px; cursor: pointer; font: inherit; font-weight: 600; }
.mkf-menu button:hover { background: var(--mkf-soft); }
.mkf-menu .is-danger { color: #dc2626; }

/* ---------- misc ---------- */
.mkf-empty { padding: 48px 20px; text-align: center; color: var(--mkf-muted); border: 1px dashed var(--mkf-line); border-radius: var(--mkf-radius); }
.mkf-load-more {
  display: block; margin: 20px auto 0; padding: 10px 24px; border-radius: 999px; border: 1px solid var(--mkf-line);
  background: #fff; font-weight: 700; cursor: pointer; color: var(--mkf-ink);
}
.mkf-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; color: var(--mkf-muted); font-weight: 700; }
.mkf-post.is-removing { opacity: 0; transform: scale(.98); transition: all .25s; }
.mkf-post.is-new { animation: mkf-fade .35s ease; }
@keyframes mkf-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mkf-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); z-index: 10000;
  background: #17162b; color: #fff; padding: 10px 18px; border-radius: 12px; opacity: 0; transition: all .25s;
  pointer-events: none; white-space: pre-line; max-width: 90vw;
}
.mkf-toast.is-visible { opacity: 1; transform: translateX(-50%); }

/* ---------- lightbox ---------- */
.mkf-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(15, 14, 30, .94); display: flex; align-items: center; justify-content: center; }
.mkf-lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 12px; user-select: none; }
.mkf-lightbox button {
  position: absolute; background: rgba(255,255,255,.12); border: 0; color: #fff; width: 48px; height: 48px;
  border-radius: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.mkf-lightbox button:hover { background: rgba(255,255,255,.25); }
.mkf-lightbox svg { width: 28px; height: 28px; fill: #fff; }
.mkf-lightbox__close { top: 16px; right: 16px; }
.mkf-lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.mkf-lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
.mkf-lightbox__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 14px; }

/* ---------- homepage block ---------- */
.mkf-home { margin: 40px 0; }
.mkf-home__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; gap: 12px; }
.mkf-home__title { min-width: 0; max-width: 100%; overflow-wrap: anywhere; margin: 0; font-size: 22px; font-weight: 800; }
.mkf-home__all { color: var(--mkf-accent); font-weight: 700; }
.mkf-home__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.mkf-home__card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--mkf-line); border-radius: var(--mkf-radius);
  box-shadow: var(--mkf-shadow); overflow: hidden; color: inherit; text-decoration: none; transition: transform .2s;
}
.mkf-home__card:hover { transform: translateY(-3px); text-decoration: none; color: inherit; }
.mkf-home__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--mkf-soft); }
.mkf-home__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkf-home__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }
.mkf-home__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mkf-muted); line-height: 1.3; }
.mkf-home__meta strong { color: var(--mkf-ink); font-size: 13px; }
.mkf-home__meta > span { min-width: 0; overflow-wrap: anywhere; }
.mkf-home__text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; }
.mkf-home__stats { overflow-wrap: anywhere; font-size: 12px; color: var(--mkf-muted); }
.mkf-home .mkf-avatar { width: 32px; height: 32px; border-radius: 10px; object-fit: contain; padding: 2px; border: 1px solid var(--mkf-line); background: #fff; }

/* ---------- widget layouts ---------- */
.mkf-w { color: var(--mkf-ink); }
.mkf-w .mkf-home__head { align-items: center; flex-wrap: wrap; }
.mkf-w__nav { display: inline-flex; flex-wrap: wrap; max-width: 100%; align-items: center; gap: 8px; }
.mkf-w__arrow {
  flex: none; width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--mkf-line); background: #fff; color: var(--mkf-ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.mkf-w__arrow:hover { border-color: var(--mkf-accent); color: var(--mkf-accent); }
.mkf-w__arrow svg { width: 20px; height: 20px; fill: currentColor; }
.mkf-w__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 280px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 14px;
  scrollbar-width: thin;
}
.mkf-w__track > * { scroll-snap-align: start; }
.mkf-home__img.is-video, .mkf-w__thumb.is-video { position: relative; }
.mkf-home__img.is-video::after, .mkf-w__thumb.is-video::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 14px;
  background: rgba(0,0,0,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/24px no-repeat;
}
.mkf-w__thumb.is-video::after { width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 9px; background-size: 16px; }
.mkf-w__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mkf-w__row {
  display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: #fff;
  border: 1px solid var(--mkf-line); color: inherit; text-decoration: none; transition: border-color .2s;
}
.mkf-w__row:hover { border-color: var(--mkf-accent); color: inherit; text-decoration: none; }
.mkf-w__thumb { flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--mkf-soft); }
.mkf-w__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkf-w__rowbody { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mkf-w__rowtext { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.35; }
.mkf--widget { margin: 0 auto; }
.mkf-w--feed { max-width: 700px; margin-left: auto; margin-right: auto; }

@media (max-width: 575px) {
  .mkf { margin: 12px auto 32px; }
  .mkf-feed { gap: 14px; }
  .mkf-post, .mkf-cover, .mkf-composer { border-radius: 16px; }
  .mkf-post__head, .mkf-post__text, .mkf-bar { padding-left: 14px; padding-right: 14px; }
  .mkf .mkf-grid, .mkf .mkf-video { margin-left: 14px; margin-right: 14px; }
  .mkf-comments { margin: 0 14px; }
  .mkf-cover { padding: 56px 16px 16px; }
  .mkf-cover--photo { padding-top: 92px; }
  .mkf-cover__photo { height: 120px; }
  .mkf-avatar--lg { width: 68px; height: 68px; border-radius: 20px; }
  .mkf-cover__title { font-size: 20px; }
  .mkf-bar__actions { margin-left: 0; width: 100%; }
  .mkf-bar__actions .mkf-react, .mkf-bar__actions > .mkf-pill { flex: 1 1 80px; }
  .mkf-bar__actions .mkf-pill { width: 100%; justify-content: center; }
  .mkf-picker { right: auto; left: 0; }
  .mkf-lightbox__prev, .mkf-lightbox__next { display: none !important; }
}
/* Guest participation uses the same form in the feed, post page and feed widget. */
.mkf-comment-form__fields { flex: 1; min-width: 0; position: relative; }
.mkf-comment-form__fields > label { display: block; font-size: 12px; margin: 0 0 4px; overflow-wrap: anywhere; }
.mkf-comment-form__name { width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 8px 10px; margin: 0 0 8px; font: inherit; }
.mkf-comment-form__notice, .mkf-comment-form__status { font-size: 12px; margin: 6px 0 0; }
.mkf-comment-form__status:empty { display: none; }
.mkf-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
