/* =========================================================
   Social posts, profile page, avatar maker, private messages,
   game tasks — NUMNora.mn
   ========================================================= */

.avatar--drawn { display: inline-block; border-radius: 50%; vertical-align: middle; overflow: hidden; flex-shrink: 0; }
.avatar.large { width: 120px; height: 120px; }

/* ---------- Posts (photo first, like a photo feed) ---------- */
.social-feed { display: flex; flex-direction: column; gap: 18px; max-width: 560px; margin: 0 auto; }
.social-composer { max-width: 560px; margin: 0 auto 18px; }
.social-composer-top { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.social-composer-top .input { margin: 0; resize: vertical; }
.social-composer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.social-composer-foot .btn--primary { margin-left: auto; }
.social-post { padding: 0; overflow: hidden; }
.social-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.social-author { display: flex; align-items: center; gap: 10px; color: var(--text) !important; }
.social-author:hover { text-decoration: none; }
.social-author small { display: block; color: var(--muted); font-weight: 500; }
.social-image { display: block; width: 100%; max-height: 640px; object-fit: cover; background: var(--surface-2); }
.social-actions { display: flex; align-items: center; gap: 16px; padding: 10px 14px 4px; font-size: 1rem; }
.social-like { border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; transition: transform 0.15s; }
.social-like:hover { transform: scale(1.15); }
.social-like.is-on { color: #e5484d; }
.social-caption { margin: 0; padding: 2px 14px 6px; overflow-wrap: anywhere; }
.social-comments { padding: 0 14px 8px; font-size: 0.92rem; }
.social-comments p { margin: 3px 0; overflow-wrap: anywhere; }
.social-comment-form { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); }
.social-comment-form .input { margin: 0; }

/* ---------- Profile page ---------- */
.profile-card { display: grid; grid-template-columns: auto minmax(0, 1fr) 230px; gap: 22px; align-items: start; margin-bottom: 22px; }
.profile-main h1 { margin: 0 0 2px; font-size: 1.6rem; }
.profile-bio { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.profile-aura { padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.profile-aura small { display: block; margin-top: 6px; color: var(--muted); }
.profile-xp { margin: 12px 0 8px; }
.aura-bar { position: relative; height: 10px; margin-top: 8px; border-radius: 10px; background: var(--border); overflow: hidden; }
.aura-bar i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #e5484d, #e0a100 45%, var(--success) 85%, var(--accent)); }
.aura-bar span { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); opacity: 0.5; }

/* ---------- Avatar maker ---------- */
.style-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.style-option.is-locked { position: relative; opacity: 0.6; }
.style-option.is-locked::after { content: "🔒"; position: absolute; right: -2px; bottom: -4px; font-size: 0.7rem; }
.avatar-parts { max-height: 62vh; overflow: auto; padding-right: 4px; }
.profile-editor .qr-code { margin-bottom: 12px; }
.profile-editor { max-width: 720px; }
.avatar-maker { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 14px; }
.avatar-preview { position: sticky; top: 0; }
.avatar-row { margin-bottom: 10px; }
.avatar-row label { display: block; margin-bottom: 4px; color: var(--muted); font: 700 0.72rem var(--font-ui); text-transform: uppercase; letter-spacing: 0.06em; }
.swatch-grid { display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px; }
.swatch { aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.swatch.is-active { border-color: var(--text); transform: scale(1.15); }
.style-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.style-option { width: 52px; height: 52px; padding: 0; border: 2px solid var(--border); border-radius: 50%; background: none; overflow: hidden; cursor: pointer; }
.style-option .avatar { width: 100%; height: 100%; display: block; }
.style-option.is-active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-tint); }

/* ---------- Private messages ---------- */
.dm-box { max-width: 480px; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.dm-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.dm-messages { max-height: 52vh; min-height: 240px; }

/* ---------- Game tasks ---------- */
.task-sections { display: flex; flex-direction: column; gap: 6px; }
.task-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font: 700 0.86rem var(--font-ui); cursor: pointer; }
.task-list { margin: 6px 0 4px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.task { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; font-size: 0.84rem; }
.task.is-done { background: color-mix(in srgb, var(--success) 12%, transparent); }
.task.is-claimed { opacity: 0.55; }
.task small { display: block; color: var(--muted); }

/* ---------- Admin: reports ---------- */
.report-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.report-item img { max-width: 160px; max-height: 120px; border-radius: 8px; display: block; margin-top: 6px; }
.report-item .report-actions { display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 800px) {
  .profile-card { grid-template-columns: 1fr; text-align: center; }
  .profile-actions, .profile-card .chip-row { justify-content: center; }
  .avatar-maker { grid-template-columns: 1fr; }
  .avatar-preview { position: static; text-align: center; }
  .swatch-grid { grid-template-columns: repeat(8, 1fr); }
}
