:root {
  --bg: #f5f3ef;
  --card: #ffffff;
  --border: #e6e4e0;
  --text: #1c1c1c;
  --muted: #6b7280;
  --brand: #f59e0b;
  --brand-dark: #d97706;
  --join: #f5c33b;
  --join-dark: #edb62a;
  --blue: #3b5bdb;
  --green: #16a34a;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --font: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-family: var(--font);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c; --card: #1f2226; --border: #33373d; --text: #e8eaed; --muted: #9aa0a6;
    --shadow: 0 1px 3px rgba(0,0,0,.4);
  }
}
/* Manual theme overrides (win over the media query via higher specificity) */
:root[data-theme="dark"] {
  --bg: #16181c; --card: #1f2226; --border: #33373d; --text: #e8eaed; --muted: #9aa0a6;
  --shadow: 0 1px 3px rgba(0,0,0,.4);
}
:root[data-theme="light"] {
  --bg: #f5f3ef; --card: #ffffff; --border: #e6e4e0; --text: #1c1c1c; --muted: #6b7280;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); line-height: 1.5; font-size: 15px; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 15px; }

/* Topbar */
#topbar { position: sticky; top: 0; z-index: 50; background: var(--card); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px; flex-wrap: nowrap; }
.brand { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 8px; min-width: 0; flex: none; max-width: 260px; }
.brand > span:not(.logo):not(.brandicon):not(.brandname) { color: var(--brand); }
/* "komul" colorful wordmark */
.logo { display: inline-flex; font-family: "Nunito", "Baloo 2", "Segoe UI", system-ui, sans-serif; font-weight: 900; font-size: 30px; letter-spacing: -1px; line-height: 1; }
.logo i { font-style: normal; }
.logo i:nth-child(1) { color: #3a4aa0; }
.logo i:nth-child(2) { color: #d8452a; }
.logo i:nth-child(3) { color: #e6a92f; }
.logo i:nth-child(4) { color: #5aa9e6; }
.logo i:nth-child(5) { color: #d8452a; }
#topnav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
#topnav a { padding: 7px 12px; border-radius: 8px; font-weight: 500; color: var(--muted); font-size: 14px; white-space: nowrap; flex: none; }
#topnav a.active, #topnav a:hover { background: var(--bg); color: var(--text); }
.topnav-contact { display:inline-flex; align-items:center; gap:6px; flex:none; padding:7px 12px; border:0; border-radius:8px; background:transparent; color:var(--muted); font:500 14px/1 var(--font); white-space:nowrap; transition:background .15s ease,color .15s ease,transform .15s ease; }
.topnav-contact:hover { background:var(--bg); color:var(--text); }
.topnav-contact:focus-visible { outline:3px solid color-mix(in srgb,var(--blue) 25%,transparent); outline-offset:2px; }
.topnav-contact-icon { display:inline-grid; width:17px; height:17px; place-items:center; color:var(--blue); }
.topnav-contact-icon svg { width:17px; height:17px; display:block; }
#userarea { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.buy-komul-nav { color: #15803d !important; font-weight: 900 !important; }
#topnav a.buy-komul-nav:hover { background: #ecfdf3; color: #166534 !important; }

/* Accesos rápidos a las comunidades de la persona conectada. Se sitúan en el
   lateral, como una barra visual ligera, sin ocupar la navegación principal. */
.community-shortcuts { position: fixed; top: var(--community-shortcuts-top, 142px); left: 12px; z-index: 45; display: flex; flex-direction: column; align-items: center; gap: 10px; max-height: calc(100dvh - var(--community-shortcuts-top, 142px) - 18px); overflow-y: auto; padding: 3px; scrollbar-width: none; }
.community-shortcuts::-webkit-scrollbar { display: none; }
.community-shortcut { position: relative; display: grid; width: 42px; height: 42px; place-items: center; flex: none; overflow: visible; border: 2px solid transparent; border-radius: 12px; background: var(--card); color: var(--text); box-shadow: 0 2px 7px rgba(15,23,42,.13), 0 1px 2px rgba(15,23,42,.08); transform: translateX(0); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.community-shortcut > img, .community-shortcut-initials { width: 100%; height: 100%; border-radius: 10px; }
.community-shortcut > img { display: block; object-fit: cover; }
.community-shortcut-initials { display: grid; place-items: center; padding: 4px; background: linear-gradient(135deg, var(--brand), var(--blue)); color: #fff; font-size: 13px; font-weight: 900; line-height: 1; text-align: center; }
.community-shortcut:hover, .community-shortcut:focus-visible { border-color: color-mix(in srgb, var(--blue) 55%, var(--border)); box-shadow: 0 5px 13px rgba(15,23,42,.19), 0 2px 4px rgba(15,23,42,.10); transform: translateX(3px); outline: none; }
.community-shortcut:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 28%, transparent); outline-offset: 3px; }
.community-shortcut.is-active { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 16%, transparent), 0 5px 13px rgba(15,23,42,.17); }
.community-shortcut::after { position: absolute; top: 50%; left: calc(100% + 10px); z-index: 2; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--card); box-shadow: 0 4px 12px rgba(15,23,42,.13); color: var(--text); content: attr(data-label); font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-4px, -50%); transition: opacity .14s ease, transform .14s ease; }
.community-shortcut:hover::after, .community-shortcut:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.community-shortcut-more { border-style: dashed; color: var(--muted); font-size: 12px; font-weight: 900; }
.community-shortcut-more > span { display: grid; width: 100%; height: 100%; place-items: center; border-radius: 10px; background: var(--bg); }
@media (max-width: 960px) { .community-shortcuts { display: none !important; } }

/* Buttons */
.btn { border: none; background: var(--brand); color: #fff; padding: 9px 16px; border-radius: 8px; font-weight: 700; font-size: 14px; white-space: nowrap; font-family: var(--font); }
.btn:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--bg); }
.btn.blue { background: var(--blue); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Layout */
#app { max-width: 1080px; margin: 24px auto; padding: 0 16px; }
.grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } .side { order: -1; } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 18px; }
.muted { color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }

/* Discover / community cards */
.hero { text-align: center; padding: 40px 16px 28px; }
.hero h1 { font-size: 34px; font-weight: 800; }
.hero p { color: var(--muted); margin-top: 8px; font-size: 17px; }
.communities { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 24px; }
.ccard { overflow: hidden; display: flex; flex-direction: column; transition: transform .1s; }
.ccard:hover { transform: translateY(-2px); }
.ccard .cover { height: 130px; background: linear-gradient(135deg, var(--brand), var(--blue)); display: flex; align-items: center; justify-content: center; font-size: 44px; }
.ccard .cbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ccard h3 { font-size: 17px; }
.ccard .meta { display: flex; gap: 12px; font-size: 13px; color: var(--muted); margin-top: auto; padding-top: 8px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: var(--bg); color: var(--muted); }
.badge.free { background: #dcfce7; color: #15803d; }

/* Community header */
.cbanner { height: 240px; background-size: cover; background-position: center; border-radius: var(--radius) var(--radius) 0 0; }
.cbanner.nocover { background: linear-gradient(135deg, var(--brand), var(--blue)); }
.chead { display: flex; gap: 16px; align-items: center; padding: 0 20px 20px; }
.chead .cicon { width: 88px; height: 88px; border-radius: 20px; margin-top: -48px; border: 4px solid var(--card); background: linear-gradient(135deg, var(--brand), var(--blue)); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; font-size: 40px; flex: none; overflow: hidden; position: relative; z-index: 1; }
.chead .cicon img { width: 100%; height: 100%; object-fit: cover; }
.coverbox { height: 140px; border-radius: 10px; border: 1px dashed var(--border); background: var(--bg); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
.iconbox { width: 64px; height: 64px; border-radius: 14px; border: 1px dashed var(--border); background: var(--bg); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; font-size: 28px; flex: none; }
.chead h1 { font-size: 22px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 12px; margin-top: 4px; overflow-x: auto; }
.tabs a { padding: 12px 14px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--text); border-color: var(--brand); }

/* Posts */
.composer { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.composer .fake { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 24px; padding: 10px 16px; color: var(--muted); }
.post { margin-bottom: 16px; }
.post .phead { display: flex; gap: 10px; align-items: center; padding: 14px 16px 0; }
.post .pname { font-weight: 700; font-size: 14px; }
.post .ptime { font-size: 12px; color: var(--muted); }
.post .pbody { padding: 8px 16px 12px; }
.post .pbody h3 { font-size: 17px; margin-bottom: 4px; }
.post .pbody .text { white-space: pre-wrap; color: var(--text); }
.post .pcat { font-size: 12px; color: var(--brand); font-weight: 700; }
.post .pactions { display: flex; gap: 18px; padding: 8px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.post .pactions button { background: none; border: none; color: var(--muted); display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.post .pactions button.liked { color: var(--brand); }
.post .pactions button:hover { color: var(--text); }

/* Comments */
.comment { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.comment .cbubble { background: var(--bg); border-radius: 12px; padding: 8px 12px; flex: 1; }

/* Conversaciones y respuestas. El diseño conserva un único nivel anidado:
   se lee como una charla natural, sin que un hilo largo se vuelva ilegible. */
.conversation-comment-list { display: flex; flex-direction: column; gap: 15px; }
.conversation-comment { min-width: 0; }
.conversation-comment-row { display: flex; align-items: flex-start; gap: 10px; }
.conversation-comment-content { flex: 1; min-width: 0; }
.conversation-bubble { min-width: 0; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--border) 78%, transparent); border-radius: 4px 14px 14px 14px; background: color-mix(in srgb, var(--bg) 88%, var(--card)); box-shadow: 0 1px 1px rgba(15,23,42,.025); }
.conversation-meta { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.2; }
.conversation-meta .profile-link { overflow: hidden; color: var(--text); font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.conversation-meta > span { flex: none; }
.conversation-bubble p { margin: 6px 0 0; color: var(--text); font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.conversation-delete { margin-left: auto; padding: 1px 3px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; opacity: .72; }
.conversation-delete:hover { color: #d63636; background: color-mix(in srgb, #d63636 10%, transparent); opacity: 1; }
.conversation-actions { display: flex; min-height: 26px; align-items: center; padding: 3px 0 0 4px; }
.conversation-actions button, .rich-comment-cancel { padding: 3px 4px; border: 0; border-radius: 5px; background: transparent; color: var(--blue); font: 750 12px/1.2 var(--font); cursor: pointer; }
.conversation-actions button:hover, .rich-comment-cancel:hover { background: color-mix(in srgb, var(--blue) 10%, transparent); color: var(--blue); text-decoration: underline; }
.conversation-replies { position: relative; display: flex; flex-direction: column; gap: 12px; margin: 6px 0 0 40px; padding: 0 0 0 14px; border-left: 2px solid color-mix(in srgb, var(--blue) 20%, var(--border)); }
.conversation-comment.is-reply .conversation-bubble { border-radius: 3px 12px 12px 12px; background: color-mix(in srgb, var(--blue) 5%, var(--bg)); }
.conversation-reply-host { margin: 8px 0 0 40px; }
.conversation-extras { display: grid; gap: 8px; margin-top: 9px; }
.conversation-media { display: block; overflow: hidden; padding: 0; border: 0; border-radius: 10px; background: #111827; }
.conversation-image { width: min(100%, 430px); cursor: zoom-in; }
.conversation-image img { display: block; width: 100%; max-height: 390px; object-fit: cover; transition: transform .18s ease; }
.conversation-image:hover img { transform: scale(1.012); }
.conversation-video { position: relative; width: min(100%, 520px); padding-top: min(56.25%, 292px); }
.conversation-video iframe, .conversation-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.conversation-link, .conversation-file { display: flex; align-items: center; gap: 9px; width: min(100%, 460px); min-width: 0; padding: 9px 10px; border: 1px solid color-mix(in srgb, var(--blue) 28%, var(--border)); border-radius: 9px; background: color-mix(in srgb, var(--blue) 5%, var(--card)); color: var(--text); font-size: 13px; }
.conversation-link:hover, .conversation-file:hover { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, var(--card)); }
.conversation-link > span:last-child { display: grid; min-width: 0; gap: 2px; }
.conversation-link b, .conversation-link small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-link small { color: var(--muted); font-size: 11px; }
.conversation-composer-host { margin-top: 16px; }
.rich-comment-composer { padding: 10px 0 0; }
.rich-comment-composer.is-reply { margin: 0; padding: 11px; border: 1px solid color-mix(in srgb, var(--blue) 26%, var(--border)); border-radius: 11px; background: color-mix(in srgb, var(--blue) 4%, var(--card)); }
.rich-comment-replying { margin: 0 0 8px 40px; color: var(--muted); font-size: 12px; }
.rich-comment-replying b { color: var(--text); }
.rich-comment-main { display: flex; align-items: flex-start; gap: 10px; }
.rich-comment-editor { flex: 1; min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--card); transition: border-color .15s, box-shadow .15s; }
.rich-comment-editor:focus-within { border-color: color-mix(in srgb, var(--blue) 68%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 13%, transparent); }
.rich-comment-editor textarea { display: block; width: 100%; min-height: 52px; max-height: 180px; padding: 10px 12px 7px; border: 0; outline: 0; resize: vertical; background: transparent; color: var(--text); font: 14px/1.45 var(--font); }
.rich-comment-editor textarea::placeholder { color: var(--muted); }
.rich-comment-attachments { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 9px; }
.rich-comment-attachments:empty { display: none; }
.rich-comment-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 7px; border-radius: 999px; background: color-mix(in srgb, var(--blue) 10%, var(--card)); color: var(--text); font-size: 12px; }
.rich-comment-chip button { flex: none; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer; }
.rich-comment-chip button:hover { color: #d63636; }
.rich-comment-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 39px; margin-top: 7px; padding: 6px 7px 6px 8px; border-top: 1px solid var(--border); }
.rich-comment-tools, .rich-comment-submit-wrap { display: flex; align-items: center; gap: 2px; }
.rich-comment-tool { display: inline-grid; width: 29px; height: 28px; place-items: center; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: 800 10px/1 var(--font); cursor: pointer; }
.rich-comment-tool svg { width: 17px; height: 17px; }
.rich-comment-tool:hover, .rich-comment-tool:focus-visible { background: color-mix(in srgb, var(--blue) 11%, transparent); color: var(--blue); }
.rich-comment-tool:focus-visible, .conversation-actions button:focus-visible, .conversation-delete:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 30%, transparent); outline-offset: 2px; }
.rich-comment-submit { min-width: 88px; }
.rich-comment-submit:disabled { cursor: not-allowed; opacity: .55; }

/* Members / leaderboard */
.mrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.mrow:last-child { border: none; }
.rank { font-weight: 800; width: 28px; text-align: center; color: var(--muted); }
.rank.top { color: var(--brand); }
.points { margin-left: auto; font-weight: 700; }

/* Courses */
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.coursecard .cover { height: 120px; background: linear-gradient(135deg, var(--blue), var(--brand)); border-radius: 12px 12px 0 0; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.lesson { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.lesson:hover { background: var(--bg); }
.lesson .check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); flex: none; display: flex; align-items: center; justify-content: center; }
.lesson .check.done { background: var(--green); border-color: var(--green); color: #fff; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); }
.field textarea { min-height: 120px; resize: vertical; }

/* Modal */
#modal-root:empty { display: none; }
body.modal-open { overflow: hidden; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: var(--card); border-radius: var(--radius); width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; padding: 24px; }
.modal h2 { margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.tabswitch { display: flex; gap: 8px; margin-bottom: 18px; }
.tabswitch button { flex: 1; padding: 10px; border: 1px solid var(--border); background: var(--bg); border-radius: 8px; font-weight: 700; }
.tabswitch button.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Registro y CAPTCHA */
.auth-modal-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.auth-modal-heading h2 { margin: 0 0 3px; font-size: 21px; letter-spacing: -.25px; }
.auth-modal-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.auth-modal-mark { width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center;
  color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--border)); }
.auth-modal-mark svg { width: 23px; height: 23px; }
.auth-modal .tabswitch { margin-bottom: 20px; }
.auth-modal .tabswitch button { transition: background .16s, color .16s, border-color .16s, transform .16s; }
.auth-modal .tabswitch button:not(.active):hover { border-color: color-mix(in srgb, var(--blue) 45%, var(--border)); color: var(--blue); }
.auth-modal .tabswitch button.active { box-shadow: 0 5px 14px color-mix(in srgb, var(--brand) 26%, transparent); }
.reg-only[hidden] { display: none !important; }
.login-only[hidden] { display: none !important; }
.auth-help { margin: -5px 1px 17px; text-align: right; }
.auth-help button { appearance: none; border: 0; padding: 0; background: transparent; color: var(--blue); cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; }
.auth-help button:hover { text-decoration: underline; }
.auth-help button:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 28%, transparent); outline-offset: 3px; border-radius: 3px; }
.captcha-card { position: relative; overflow: hidden; margin: 18px 0 12px; padding: 15px; border-radius: 13px;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 7%, var(--card)), var(--card) 68%); }
.captcha-card::before { content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%; right: -74px; top: -92px;
  background: color-mix(in srgb, var(--brand) 13%, transparent); pointer-events: none; }
.captcha-top { position: relative; z-index: 1; display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.captcha-title { display: flex; gap: 9px; align-items: center; min-width: 0; }
.captcha-title strong, .captcha-title small { display: block; }
.captcha-title strong { font-size: 13px; line-height: 1.25; }
.captcha-title small { color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 1px; }
.captcha-shield { width: 31px; height: 31px; flex: none; border-radius: 10px; display: grid; place-items: center; color: var(--blue);
  background: color-mix(in srgb, var(--blue) 13%, var(--card)); }
.captcha-shield svg { width: 18px; height: 18px; }
.captcha-refresh { position: relative; z-index: 1; width: 34px; height: 34px; flex: none; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--muted); transition: color .16s, border-color .16s, transform .16s, background .16s; }
.captcha-refresh:hover { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 48%, var(--border)); background: color-mix(in srgb, var(--blue) 6%, var(--card)); transform: rotate(-20deg); }
.captcha-refresh:focus-visible, .captcha-answer:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 30%, transparent); outline-offset: 2px; }
.captcha-refresh svg { width: 18px; height: 18px; }
.captcha-visual { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; min-height: 88px; margin-bottom: 12px; }
.captcha-image-wrap { width: 100%; max-width: 280px; border-radius: 11px; overflow: hidden; box-shadow: 0 5px 13px rgba(21, 37, 71, .1); background: #f8fafc; }
.captcha-image-wrap img { display: block; width: 100%; height: auto; min-height: 84px; object-fit: cover; }
.captcha-card.is-loading .captcha-image-wrap { background: linear-gradient(100deg, #edf1fa 25%, #f8fafc 40%, #edf1fa 55%); background-size: 220% 100%; animation: captcha-shimmer 1.1s infinite linear; }
.captcha-card.is-loading .captcha-image-wrap img { visibility: hidden; }
.captcha-card.is-loading .captcha-refresh { pointer-events: none; opacity: .55; }
.captcha-card.is-error { border-color: color-mix(in srgb, #dc2626 44%, var(--border)); }
.captcha-input-label { position: relative; z-index: 1; display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--text); }
.captcha-answer { position: relative; z-index: 1; box-sizing: border-box; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--card); color: var(--text); font: 700 15px/1.2 var(--font); letter-spacing: .24em; text-transform: uppercase; transition: border-color .16s, box-shadow .16s; }
.captcha-answer::placeholder { letter-spacing: .08em; font-weight: 600; color: var(--muted); }
.captcha-answer:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 13%, transparent); }
.captcha-help { position: relative; z-index: 1; margin: 8px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.auth-privacy { margin: 2px 2px 16px; color: var(--muted); font-size: 12px; line-height: 1.4; }
@keyframes captcha-shimmer { to { background-position: -220% 0; } }
@media (max-width: 420px) {
  .modal { padding: 19px; }
  .auth-modal-heading { align-items: flex-start; }
  .captcha-card { margin-left: -2px; margin-right: -2px; padding: 13px; }
}

/* Auth centered */
.authwrap { max-width: 420px; margin: 60px auto; }
.password-recovery-card { padding: 28px; border: 1px solid var(--border); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.password-recovery-card h1 { margin: 0 0 9px; font-size: 25px; letter-spacing: -.45px; }
.recovery-mark { width: 45px; height: 45px; margin-bottom: 15px; display: grid; place-items: center; border-radius: 14px; color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--border)); font-size: 21px; font-weight: 900; }
.recovery-mark.danger { color: #b91c1c; background: color-mix(in srgb, #dc2626 11%, var(--card)); border-color: color-mix(in srgb, #dc2626 26%, var(--border)); }
.recovery-copy { margin: 0 0 21px; color: var(--muted); line-height: 1.55; font-size: 14px; }
.recovery-submit { width: 100%; }
.recovery-status { margin: 17px 0 0; padding: 12px 13px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--bg); font-size: 13px; line-height: 1.45; }
.recovery-status.success { color: #166534; border-color: color-mix(in srgb, #22c55e 32%, var(--border)); background: color-mix(in srgb, #22c55e 9%, var(--card)); }
.recovery-status.error { color: #b91c1c; border-color: color-mix(in srgb, #dc2626 36%, var(--border)); background: color-mix(in srgb, #dc2626 8%, var(--card)); }
.recovery-actions { display: flex; justify-content: center; margin-top: 20px; }
@media (max-width: 500px) { .authwrap.password-recovery-card { margin: 30px 0; padding: 22px 18px; } }

/* ---------- Verificación profesional de correo ---------- */
.email-verification-shell { max-width: 760px; margin: 44px auto 70px; padding: 0 18px; }
.email-verification-card { position: relative; overflow: hidden; padding: 34px; border: 1px solid var(--border); border-radius: 24px; background: var(--card); box-shadow: 0 22px 60px rgba(15,23,42,.10); }
.email-verification-card::before { content: ''; position: absolute; width: 230px; height: 230px; border-radius: 50%; right: -125px; top: -135px; background: color-mix(in srgb, var(--brand) 13%, transparent); pointer-events: none; }
.verification-brand-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; padding-bottom: 15px; border-bottom: 1px solid var(--border); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.verification-brand-line span { color: var(--text); font-weight: 900; }
.verification-brand-line b { color: var(--muted); font-weight: 700; }
.verification-icon { position: relative; z-index: 1; width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 18px; color: #9a5d09; background: color-mix(in srgb, #f59e0b 12%, var(--card)); border: 1px solid color-mix(in srgb, #f59e0b 28%, var(--border)); }
.verification-icon svg { width: 29px; height: 29px; }
.verification-icon.success { color: #15803d; background: color-mix(in srgb, #22c55e 11%, var(--card)); border-color: color-mix(in srgb, #22c55e 30%, var(--border)); }
.verification-icon.danger { color: #b91c1c; background: color-mix(in srgb, #ef4444 10%, var(--card)); border-color: color-mix(in srgb, #ef4444 28%, var(--border)); }
.email-verification-card h1 { position: relative; z-index: 1; margin: 0 0 10px; font-size: clamp(26px, 4vw, 34px); letter-spacing: -.7px; }
.verification-lead { position: relative; z-index: 1; max-width: 620px; margin: 0 0 25px; color: var(--muted); line-height: 1.7; font-size: 15px; }
.verification-lead strong { color: var(--text); }
.verification-steps { display: grid; gap: 10px; margin: 0 0 22px; }
.verification-step { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; padding: 12px 13px; border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--bg) 68%, var(--card)); }
.verification-step > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--card); border: 1px solid var(--border); font-weight: 900; font-size: 13px; }
.verification-step b, .verification-step small { display: block; }
.verification-step b { margin-bottom: 2px; font-size: 14px; }
.verification-step small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.verification-step.done > span { color: #166534; background: color-mix(in srgb, #22c55e 12%, var(--card)); border-color: color-mix(in srgb, #22c55e 30%, var(--border)); }
.verification-step.current { border-color: color-mix(in srgb, var(--brand) 42%, var(--border)); background: color-mix(in srgb, var(--brand) 7%, var(--card)); }
.verification-step.current > span { color: #8a5408; background: color-mix(in srgb, #f59e0b 14%, var(--card)); border-color: color-mix(in srgb, #f59e0b 34%, var(--border)); }
.verification-security-note { display: grid; gap: 4px; margin-bottom: 20px; padding: 14px 15px; border-radius: 13px; border: 1px solid color-mix(in srgb, var(--blue) 20%, var(--border)); background: color-mix(in srgb, var(--blue) 5%, var(--card)); font-size: 12px; line-height: 1.55; }
.verification-security-note strong { color: var(--text); }
.verification-security-note span { color: var(--muted); }
.verification-primary { width: 100%; min-height: 46px; font-weight: 800; }
.verification-feedback { margin: 14px 0 0; padding: 12px 13px; border-radius: 11px; font-size: 13px; line-height: 1.5; }
.verification-feedback.success { color: #166534; border: 1px solid color-mix(in srgb, #22c55e 30%, var(--border)); background: color-mix(in srgb, #22c55e 9%, var(--card)); }
.verification-feedback.error { color: #b91c1c; border: 1px solid color-mix(in srgb, #ef4444 32%, var(--border)); background: color-mix(in srgb, #ef4444 8%, var(--card)); }
.verification-secondary-actions { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 19px; color: var(--muted); font-size: 12px; }
.verification-secondary-actions a, .verification-secondary-actions .linkbtn { color: var(--muted); text-decoration: none; }
.verification-secondary-actions a:hover, .verification-secondary-actions .linkbtn:hover { color: var(--text); }
.verification-resend-form { margin-top: 6px; }
.verification-result-card { max-width: 620px; margin: 0 auto; text-align: center; }
.verification-result-card .verification-icon { margin-left: auto; margin-right: auto; }
.verification-result-card .verification-lead { margin-left: auto; margin-right: auto; }
.verification-icon.checking { color: var(--blue); }
.verification-spinner { width: 25px; height: 25px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--blue) 20%, transparent); border-top-color: currentColor; animation: verification-spin .8s linear infinite; }
@keyframes verification-spin { to { transform: rotate(360deg); } }
.verification-success-kicker { margin: -4px 0 8px; color: #16813d; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.verification-success-user { display: inline-flex; align-items: center; gap: 10px; margin: 0 auto 22px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); text-align: left; }
.verification-success-user b, .verification-success-user span { display: block; }
.verification-success-user span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.verification-auto-note { margin: 11px 0 0; color: var(--muted); font-size: 11px; }
.verification-login-button { width: 100%; margin-top: 9px; }
@media (max-width: 600px) {
  .email-verification-shell { margin: 24px auto 46px; padding: 0 12px; }
  .email-verification-card { padding: 25px 18px; border-radius: 19px; }
  .verification-brand-line { align-items: flex-start; flex-direction: column; gap: 5px; }
  .verification-step { grid-template-columns: 34px 1fr; padding: 11px; }
}


/* Toast */
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast-msg { background: #1f2937; color: #fff; padding: 12px 18px; border-radius: 8px; box-shadow: var(--shadow); font-size: 14px; animation: pop .2s; }
.toast-msg.error { background: #dc2626; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.sidebox h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 12px; }
.spinner { text-align: center; padding: 40px; color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.mt { margin-top: 16px; }

/* Icon buttons + badges (topbar) */
.iconbtn { position: relative; background: none; border: none; font-size: 20px; padding: 4px 6px; border-radius: 8px; line-height: 1; color: var(--text); }
.iconbtn:hover { background: var(--bg); }
.badge-dot { position: absolute; top: -2px; right: -2px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.badge-dot[hidden] { display: none; }

/* Community switcher (next to the logo) */
.switcher { position: relative; display: flex; align-items: center; }
.switch-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.switch-btn:hover { background: var(--bg); color: var(--text); }
.switchdrop { left: 0; right: auto; width: 300px; padding: 10px; }
.sw-search { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 8px; padding: 9px 12px; margin-bottom: 8px; }
.sw-sicon { color: var(--muted); font-size: 14px; }
.sw-search input { flex: 1; border: none; outline: none; background: transparent; color: var(--text); font-size: 14px; }
.sw-gear { color: var(--muted); font-size: 14px; }
.sw-item { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 8px; font-weight: 600; font-size: 15px; cursor: pointer; }
.sw-item:hover { background: var(--bg); }
.sw-ic { width: 28px; height: 28px; border-radius: 7px; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex: none; overflow: hidden; }
.sw-ic.img img { width: 100%; height: 100%; object-fit: cover; }
.sw-empty { padding: 10px; color: var(--muted); font-size: 14px; }

/* Notifications dropdown */
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; max-height: 420px; overflow: auto; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); z-index: 60; }
.drop-head { padding: 12px 16px; font-weight: 800; border-bottom: 1px solid var(--border); }
.drop-item { display: block; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.drop-item:hover { background: var(--bg); }
.drop-item.unread { background: rgba(245,158,11,.08); }

/* Post image */
.post .pimg { max-width: 100%; border-radius: 10px; margin-top: 10px; display: block; }

/* Course progress bar */
.progressbar { height: 8px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.progressbar div { height: 100%; background: var(--green); border-radius: 6px; transition: width .3s; }

/* Events / calendar */
.eventlist { display: flex; flex-direction: column; gap: 14px; }
.event .edate { width: 56px; height: 56px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.event .ed-day { font-size: 20px; font-weight: 800; line-height: 1; }
.event .ed-mon { font-size: 12px; color: var(--muted); text-transform: uppercase; }

/* Direct messages */
.dmlayout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; height: calc(100vh - 160px); min-height: 420px; }
@media (max-width: 720px) { .dmlayout { grid-template-columns: 1fr; height: auto; } .dmthread { min-height: 60vh; } }
.dmlist { overflow-y: auto; }
.conv { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.conv:hover, .conv.active { background: var(--bg); }
.dmthread { display: flex; flex-direction: column; overflow: hidden; }
.dmhead { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 700; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { display: flex; }
.msg.mine { justify-content: flex-end; }
.msgb { max-width: 72%; background: var(--bg); border: 1px solid var(--border); padding: 8px 12px; border-radius: 14px; font-size: 14px; }
.msg.mine .msgb { background: var(--brand); color: #fff; border-color: var(--brand); }
.msgt { font-size: 10px; opacity: .6; margin-top: 3px; }
.dmcompose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.dmcompose input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 22px; background: var(--card); color: var(--text); }

/* Search box */
.searchform { margin-left: auto; }
.searchform input { width: 200px; max-width: 40vw; padding: 7px 12px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg); color: var(--text); font-size: 14px; }
.searchform input:focus { outline: none; border-color: var(--brand); }
.searchpost:hover { background: var(--bg); }

/* Moderator badge + post tools */
.badge.mod { background: #dbeafe; color: #1d4ed8; }
.posttools { display: flex; gap: 6px; align-items: flex-start; }
.posttools button, .cdel { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px 6px; border-radius: 6px; white-space: nowrap; }
.posttools .pinbtn.on { color: var(--brand-dark); font-weight: 700; background: rgba(245,195,59,.18); }
.posttools .editbtn { color: var(--blue); font-weight: 700; }
.posttools button:hover, .cdel:hover { background: var(--bg); color: var(--text); }
.cdel { float: right; font-size: 12px; }
.post.pinned { border-color: var(--brand); }

/* Checkbox row */
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 14px; cursor: pointer; }
.check-row input { width: 16px; height: 16px; }

@media (prefers-color-scheme: dark) {
  .badge.mod { background: #1e3a5f; color: #93c5fd; }
}

/* ============ Skool-style redesign ============ */
.avatar.xs { width: 24px; height: 24px; font-size: 10px; }

/* Topbar: community context on the brand */
.brand .brandicon { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; background: linear-gradient(135deg, var(--brand), var(--blue)); font-size: 16px; }
.brand .brandicon img { width: 100%; height: 100%; object-fit: cover; }
.brand .brandname { font-size: 17px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#topnav .searchform { margin: 0 auto; flex: 1; min-width: 0; max-width: 380px; }
#topnav .searchform input { width: 100%; }

/* Tabs bar */
.tabsbar { border-bottom: 1px solid var(--border); margin: -8px 0 20px; }
.tabsbar .tabs { max-width: 1080px; margin: 0 auto; border: none; padding: 0; gap: 6px; }
.tabsbar .tabs a { padding: 12px 6px; margin-right: 18px; font-weight: 600; font-size: 15px; }

/* Community two-column layout */
.clayout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .clayout { grid-template-columns: 1fr; } #communityside { order: 2; } }

/* Right sidebar community card */
.sidecard { overflow: hidden; margin-bottom: 16px; }
.sidecover { height: 150px; background-size: cover; background-position: center; }
.sidecover.nocover { background: linear-gradient(135deg, var(--brand), var(--blue)); }
.sidebody { padding: 16px; }
.sidebody h3 { font-size: 18px; font-weight: 800; }
.sideurl { color: var(--muted); font-size: 13px; margin: 2px 0 10px; }
.sidedesc { font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
.sidestats { display: flex; text-align: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 12px 0; margin-bottom: 14px; }
.sidestats > div { flex: 1; display: flex; flex-direction: column; }
.sidestats b { font-size: 17px; }
.sidestats span { font-size: 12px; color: var(--muted); }
.sideavatars { display: flex; margin-bottom: 16px; }
.sideavatars .avatar { margin-right: -8px; border: 2px solid var(--card); }
.side-membership-cta { border-top: 1px solid var(--border); padding-top: 16px; }
.btn.join { width: 100%; background: var(--join); color: #1c1c1c; font-weight: 800; letter-spacing: .3px; padding: 12px; font-size: 15px; }
.btn.join:hover { background: var(--join-dark); }
/* CTA de membresía: replica el botón de la referencia de Skool sin fijar el
   importe en el diseño; el texto se genera con el precio de la comunidad. */
.btn.join.community-membership-join {
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(184, 132, 20, .28);
  border-radius: 5px;
  background: var(--join);
  box-shadow: 0 2px 4px rgba(34, 34, 34, .20), 0 1px 2px rgba(34, 34, 34, .10);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .1px;
  line-height: 1.2;
  text-transform: uppercase;
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.btn.join.community-membership-join:hover:not(:disabled) {
  background: var(--join-dark);
  box-shadow: 0 4px 9px rgba(34, 34, 34, .20), 0 1px 3px rgba(34, 34, 34, .12);
  transform: translateY(-1px);
}
.btn.join.community-membership-join:focus-visible {
  outline: 3px solid rgba(245, 195, 59, .42);
  outline-offset: 2px;
}
.btn.sidewide { width: 100%; }

/* Leaderboard sidebar */
.leaderboard { padding: 16px; }
.sidehead { font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.lbrow { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.lbrow:hover .lbname { color: var(--blue); }
.lbrank { width: 22px; height: 22px; border-radius: 50%; background: var(--bg); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.lbrank.r1 { background: #fde68a; color: #92400e; }
.lbrank.r2 { background: #e5e7eb; color: #374151; }
.lbrank.r3 { background: #fed7aa; color: #9a3412; }
.lbname { flex: 1; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbpts { font-weight: 700; color: var(--blue); font-size: 14px; }
.sidelink { display: block; margin-top: 10px; color: var(--blue); font-size: 14px; font-weight: 600; }
.poweredby { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 500; padding: 14px 0 4px; }
.poweredby .logo { font-size: 19px; letter-spacing: -.5px; }

/* Resumen de Gemas dentro de la comunidad. Tiene identidad propia de Komul,
   pero conserva el tamaño y la lectura rápida de las tarjetas laterales. */
.komul-mini-card { padding: 15px 16px; border-color: color-mix(in srgb, var(--blue) 18%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 7%, var(--card)), var(--card) 62%); }
.komul-mini-loading { min-height: 82px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; }
.komul-mini-loading span { font-size: 22px; animation: komul-gem-pulse 1.5s ease-in-out infinite; }
@keyframes komul-gem-pulse { 50% { transform: translateY(-2px) scale(1.08); } }
.komul-mini-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
.komul-mini-gem { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 11px; background: color-mix(in srgb, var(--blue) 12%, var(--card)); font-size: 22px; }
.komul-mini-head > div { min-width: 0; flex: 1; }
.komul-kicker { display: block; color: var(--blue); font-size: 9px; font-weight: 900; letter-spacing: .68px; line-height: 1.15; }
.komul-mini-head h3 { margin-top: 2px; font-size: 16px; line-height: 1.15; }
.komul-rank-chip { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 999px; background: color-mix(in srgb, var(--blue) 10%, var(--card)); color: var(--blue); font-size: 11px; font-weight: 800; white-space: nowrap; }
.komul-mini-copy { margin: 11px 0 9px; color: var(--muted); font-size: 13px; line-height: 1.42; }
.komul-mini-track { height: 8px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--blue) 11%, var(--bg)); }
.komul-mini-track > span { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, #4f72e8, #50b8ea); transition: width .35s ease; }
.komul-mini-progress { display: flex; justify-content: flex-end; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.komul-mini-stats { display: flex; gap: 12px; margin-top: 11px; color: var(--muted); font-size: 12px; }
.komul-mini-stats b { color: var(--text); }
.komul-mini-note { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.komul-mini-link { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--blue) 15%, var(--border)); }
.komul-mini-link:hover { text-decoration: underline; }

/* Descubrimiento dentro de la pestaña Comunidad · compacto */
.suggested-communities-card {
  padding: 15px 16px 13px;
  transition: opacity .16s ease, transform .16s ease;
}
.suggested-communities-card.is-hiding { opacity:0; transform:translateY(4px); }
.suggestions-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.suggestions-head h3 {
  margin:0;
  font-size:15px;
  font-weight:850;
  letter-spacing:-.01em;
}
.suggestions-close {
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  flex:none;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--muted);
  font-size:20px;
  line-height:1;
  cursor:pointer;
}
.suggestions-close:hover { background:var(--bg); color:var(--text); }
.suggestions-list { display:grid; gap:2px; }
.suggestions-loading {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:48px;
  color:var(--muted);
  font-size:12px;
}
.suggestions-loading span {
  width:15px;
  height:15px;
  flex:none;
  border:2px solid var(--border);
  border-top-color:var(--blue);
  border-radius:50%;
  animation:suggestion-spin .75s linear infinite;
}
.suggestions-empty {
  padding:8px 2px 6px;
  color:var(--muted);
  font-size:11.5px;
  line-height:1.45;
}
@keyframes suggestion-spin { to { transform:rotate(360deg); } }

.suggested-community {
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  align-items:center;
  gap:10px;
  min-height:48px;
  margin:0 -5px;
  padding:5px;
  border-radius:9px;
  color:inherit;
  transition:background .14s ease, transform .14s ease;
}
.suggested-community:hover { background:var(--bg); transform:translateX(2px); }
.suggested-community:focus-visible { outline:3px solid rgba(59,91,219,.22); outline-offset:1px; }
.suggested-avatar {
  width:36px;
  height:36px;
  display:block;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:9px;
  background:var(--bg);
}
.suggested-avatar img { width:100%; height:100%; display:block; object-fit:cover; }
.suggested-copy { min-width:0; display:grid; gap:2px; }
.suggested-copy strong {
  overflow:hidden;
  color:var(--text);
  font-size:13px;
  font-weight:800;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.suggested-copy > span {
  overflow:hidden;
  color:var(--muted);
  font-size:10.5px;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.community-create-card { padding:15px 16px 16px; }
.community-create-body { padding:0; }
.community-create-body h3 {
  margin:0;
  font-size:15px;
  font-weight:850;
  letter-spacing:-.01em;
}
.community-create-body p {
  margin:7px 0 12px;
  color:var(--muted);
  font-size:12.5px;
  line-height:1.45;
}
.btn.community-create-button {
  width:100%;
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  font-size:12px;
  font-weight:800;
}
@media (max-width:900px) {
  .suggested-communities-card,
  .community-create-card { max-width:540px; }
}

/* Composer (Skool pill) */
.composer { padding: 14px 16px; margin-bottom: 16px; border-radius: var(--radius); }
.composer .fake { border-radius: 8px; }

/* ============ Post composer (inline) ============ */
.composer-open { padding: 16px 18px 14px; margin-bottom: 16px; position: relative; }
.co-head { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 10px; }
.co-title { width: 100%; border: none; outline: none; background: transparent; color: var(--text);
  font-size: 20px; font-weight: 700; font-family: var(--font); padding: 4px 0; }
.co-title::placeholder { color: #b9b9b9; font-weight: 700; }
.co-body { width: 100%; min-height: 90px; border: none; outline: none; background: transparent; color: var(--text);
  font-size: 15px; font-family: var(--font); line-height: 1.5; resize: vertical; padding: 4px 0; }
.co-body::placeholder { color: #9a9a9a; }
.co-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.co-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px; font-size: 13px; max-width: 100%; }
.co-chip .co-thumb { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; }
.co-chip button { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; }
.co-chip button:hover { color: #dc2626; }
.co-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.co-tools { display: flex; align-items: center; gap: 2px; }
.co-tool { background: none; border: none; font-size: 17px; width: 34px; height: 34px; border-radius: 8px;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.co-tool:hover { background: var(--bg); }
.co-tool.co-gif { font-size: 12px; font-weight: 800; letter-spacing: .5px; width: auto; padding: 0 8px; }
.co-actions { display: flex; align-items: center; gap: 10px; }
.co-cat { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  color: var(--text); font-size: 13px; font-family: var(--font); max-width: 150px; }
.co-cancel { background: none; border: none; color: var(--muted); font-weight: 700; font-size: 13px; letter-spacing: .3px; cursor: pointer; }
.co-cancel:hover { color: var(--text); }
.co-post { font-weight: 800; letter-spacing: .3px; padding: 9px 22px; }
.co-post:disabled { background: #d6d3ce; color: #8a8a8a; cursor: not-allowed; }
.co-tool svg { display: block; }
.co-tool:hover { color: var(--text); }

/* GIF picker */
.gifsearch { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.gifsearch-ic { color: var(--muted); display: flex; }
.gifsearch input { flex: 1; border: none; outline: none; background: transparent; color: var(--text);
  font-size: 15px; font-family: var(--font); }
.gifgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 380px; overflow-y: auto; }
@media (max-width: 480px) { .gifgrid { grid-template-columns: repeat(2, 1fr); } }
.gifitem { border: none; padding: 0; background: var(--bg); border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 1; }
.gifitem img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gifitem:hover { outline: 2px solid var(--blue); }

/* Emoji picker */
.emojipop { position: absolute; bottom: 58px; left: 16px; z-index: 30; width: 320px; max-width: 92vw;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,.16); padding: 10px; }
.ep-search { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 9px; padding: 8px 12px; }
.ep-search-ic { color: var(--muted); display: flex; }
.ep-search-ic svg { width: 16px; height: 16px; }
.ep-search input { flex: 1; border: none; outline: none; background: transparent; color: var(--text);
  font-size: 14px; font-family: var(--font); }
.ep-tabs { display: flex; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ep-tab { flex: 1; background: none; border: none; font-size: 17px; padding: 6px 0; border-radius: 7px;
  cursor: pointer; opacity: .55; filter: grayscale(1); }
.ep-tab:hover, .ep-tab.active { opacity: 1; filter: none; background: var(--bg); }
.ep-body { max-height: 260px; overflow-y: auto; padding-top: 8px; scroll-behavior: smooth; }
.ep-sec + .ep-sec { margin-top: 10px; }
.ep-sec-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: .4px; margin-bottom: 4px; position: sticky; top: 0; background: var(--card); padding: 2px 0; }
.ep-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ep-em { background: none; border: none; font-size: 22px; line-height: 1; width: 100%; aspect-ratio: 1;
  border-radius: 7px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ep-em:hover { background: var(--bg); transform: scale(1.15); }
.ep-empty { text-align: center; color: var(--muted); padding: 24px; font-size: 14px; }

/* ============ Rich post content ============ */
.pvideo { margin-top: 12px; border-radius: 10px; overflow: hidden; background: #000; position: relative; padding-top: 56.25%; }
.pvideo iframe, .pvideo video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.plink, .pfile { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg); font-size: 14px; }
.plink:hover, .pfile:hover { border-color: var(--blue); }
.plink-ic { font-size: 18px; flex: none; }
.plink-txt { display: flex; flex-direction: column; min-width: 0; }
.plink-txt span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ppoll { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.polloption { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 1px solid var(--border); background: var(--card); border-radius: 10px; padding: 11px 14px;
  font-size: 14px; font-weight: 600; font-family: var(--font); color: var(--text); overflow: hidden; cursor: pointer; }
.polloption:hover { border-color: var(--blue); }
.polloption.voted { border-color: var(--blue); }
.pollfill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(59,91,219,.13); transition: width .3s; }
.polltext { position: relative; flex: 1; }
.pollpct { position: relative; color: var(--muted); font-weight: 700; }
.pollmeta { color: var(--muted); font-size: 13px; }

/* Filter chips */
.filterchips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--card); color: var(--text); padding: 6px 14px; border-radius: 20px; font-weight: 600; font-size: 14px; }
.chip.active { background: #1c1c1c; color: #fff; border-color: #1c1c1c; }

/* Post card — Skool style */
.post { padding: 16px; margin-bottom: 14px; }
.post .phead { display: flex; align-items: center; gap: 10px; padding: 0; }
.post .pname { font-weight: 700; font-size: 15px; }
.post .ptime { font-size: 13px; color: var(--muted); }
.post-edited-label { font-weight: 650; }
.post .pcat { color: var(--muted); font-weight: 600; }
.pinned-label { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 3px; }
.post .pmain { display: flex; gap: 14px; margin-top: 12px; }
.post .pbody { flex: 1; min-width: 0; }
.post .ptitle { font-size: 17px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.post .pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex: none; }
.post .text { color: #3a3a3a; line-height: 1.55; overflow: hidden; }
.post-reader-card-title, .post-reader-preview { appearance: none; border: 0; color: inherit; font: inherit; text-align: left; }
.post-reader-card-title { min-width: 0; padding: 0; background: transparent; font-weight: inherit; line-height: inherit; cursor: pointer; }
.post-reader-card-title:hover, .post-reader-card-title:focus-visible { color: var(--blue); }
.post-reader-preview { display: block; width: 100%; padding: 0; background: transparent; cursor: pointer; }
.post-reader-preview .text { display: block; }
.post-read-more { display: inline-flex; align-items: center; margin-top: 5px; color: var(--blue); font-size: 13px; font-weight: 750; }
.post-reader-preview:hover .post-read-more, .post-reader-preview:focus-visible .post-read-more { text-decoration: underline; }
.post-reader-card-title:focus-visible, .post-reader-preview:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 34%, transparent); outline-offset: 3px; border-radius: 5px; }
.post .pthumb { width: 108px; height: 78px; border-radius: 8px; overflow: hidden; flex: none; background: var(--bg);
  align-self: center; padding: 0; border: none; position: relative; }
.post .pthumb img, .post .pthumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.post .pthumb-media { cursor: pointer; transition: transform .12s; }
.post .pthumb-media:hover { transform: scale(1.04); }
.post .pthumb-media:hover .playbtn { transform: translate(-50%, -50%) scale(1.12); }

/* Lightbox (full-size image / video viewer) */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center; padding: 40px 20px; animation: lbin .15s ease-out; }
@keyframes lbin { from { opacity: 0; } }
.lb-content { display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; }
.lb-img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; display: block;
  border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.lb-video { width: min(1100px, 92vw); aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
.lb-video iframe, .lb-video video { width: 100%; height: 100%; border: 0; display: block; }
.lb-close { position: fixed; top: 18px; right: 22px; z-index: 310; width: 42px; height: 42px; border-radius: 50%;
  border: none; background: #dc2626; color: #fff; font-size: 20px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 3px 12px rgba(0,0,0,.4); transition: background .15s, transform .15s; }
.lb-close:hover { background: #b91c1c; transform: scale(1.08); }
.post .playbtn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.92); color: #1c1c1c;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.3); transition: transform .15s; }
.post .playbtn svg { width: 20px; height: 20px; margin-left: 2px; }
.post .pfoot { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.post .pfoot button { background: none; border: none; display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 14px; }
.post .pfoot button:hover { color: var(--text); }
.post .pfoot .likebtn.liked { color: var(--brand); }
.post .commenters { display: flex; margin-left: 4px; }
.post .commenters .avatar { margin-right: -7px; border: 2px solid var(--card); }
.post .lastcomment { margin-left: auto; color: var(--blue); font-size: 13px; font-weight: 600; }
.post .posttools { display: flex; gap: 4px; }
.post .comments-area { padding: 12px 0 0; margin-top: 8px; }
.post.pinned { border: 2px solid var(--join); box-shadow: 0 2px 12px rgba(245,195,59,.35); }
.pinned-label { font-size: 12px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 4px; }

/* Lector completo de publicaciones */
.post-reader-modal { width: min(880px, 100%); max-width: 880px; max-height: min(90dvh, 900px); padding: 0; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.post-reader { display: flex; flex-direction: column; min-height: min(400px, 72dvh); max-height: min(90dvh, 900px); }
.post-reader-loading { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 14px; padding: 32px; color: var(--muted); text-align: center; }
.post-reader-header { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px 15px; border-bottom: 1px solid var(--border); background: var(--card); box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.post-reader-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.post-reader-author .avatar { flex: none; }
.post-reader-header-actions { display: flex; align-items: center; gap: 9px; flex: none; }
.post-reader-profile { display: inline-block; color: var(--text); font-size: 15px; font-weight: 750; }
.post-reader-profile:hover { color: var(--blue); }
.post-reader-meta { margin-top: 2px; color: var(--muted); font-size: 13px; }
.post-reader-edit { min-height: 36px; padding: 0 12px; border: 1px solid color-mix(in srgb, var(--blue) 34%, var(--border)); border-radius: 8px; background: color-mix(in srgb, var(--blue) 8%, var(--card)); color: var(--blue); font: 750 13px/1 var(--font); cursor: pointer; }
.post-reader-edit:hover { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 15%, var(--card)); }
.post-reader-edit:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent); outline-offset: 2px; }
.post-reader-close { width: 36px; height: 36px; flex: none; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--card); color: var(--muted); font-size: 19px; line-height: 1; cursor: pointer; transition: color .15s, border-color .15s, background .15s, transform .15s; }
.post-reader-close:hover { color: #fff; border-color: #d63636; background: #d63636; transform: scale(1.04); }
.post-reader-close:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent); outline-offset: 2px; }
.post-reader-scroll { min-height: 0; overflow: auto; padding: 26px 34px 32px; overscroll-behavior: contain; }
.post-reader-title { margin: 0 0 16px; color: var(--text); font-size: clamp(22px, 3vw, 31px); line-height: 1.2; letter-spacing: -.02em; }
.post-reader-body { color: var(--text); font-size: 17px; line-height: 1.67; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-reader-body.is-preview::after { content: ''; display: block; height: 1px; }
.post-reader-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 0; border: 0; background: transparent; color: var(--blue); font: 750 15px/1.4 var(--font); cursor: pointer; }
.post-reader-more:hover, .post-reader-more:focus-visible { text-decoration: underline; }
.post-reader-more:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 30%, transparent); outline-offset: 3px; border-radius: 4px; }
.post-reader-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 22px; }
.post-reader-video { grid-column: 1 / -1; position: relative; overflow: hidden; padding-top: 56.25%; border-radius: 12px; background: #000; }
.post-reader-video iframe, .post-reader-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post-reader-image { width: min(100%, 620px); justify-self: start; overflow: hidden; padding: 0; border: 0; border-radius: 12px; background: var(--bg); cursor: zoom-in; }
.post-reader-image img { display: block; width: 100%; height: auto; max-height: 580px; object-fit: cover; transition: transform .2s ease; }
.post-reader-image:hover img { transform: scale(1.012); }
.post-reader-actions { display: flex; align-items: center; gap: 16px; margin-top: 23px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.post-reader-like { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--muted); font: 700 14px/1.2 var(--font); cursor: pointer; }
.post-reader-like:hover, .post-reader-like.liked { color: var(--brand-dark); border-color: color-mix(in srgb, var(--brand) 58%, var(--border)); background: color-mix(in srgb, var(--brand) 12%, var(--card)); }
.post-reader-comment-total { color: var(--muted); font-size: 14px; font-weight: 650; }
.post-reader-comments { margin-top: 24px; }
.post-reader-comments h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 12px; font-size: 17px; }
.post-reader-comments h3 span { color: var(--muted); font-size: 14px; font-weight: 600; }
.post-reader-comment-list { display: flex; flex-direction: column; gap: 12px; }
.post-reader-comment { display: flex; gap: 10px; align-items: flex-start; }
.post-reader-comment-copy { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 11px; background: var(--bg); }
.post-reader-comment-copy .post-reader-profile { font-size: 13px; }
.post-reader-comment-copy .muted { font-size: 12px; }
.post-reader-comment-copy p { margin: 5px 0 0; color: var(--text); font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-reader-comment-delete { float: right; padding: 1px 3px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.post-reader-comment-delete:hover { color: #d63636; }
.post-reader-no-comments, .post-reader-login-note { margin: 0; color: var(--muted); font-size: 14px; }
.post-reader-comment-form { display: flex; gap: 9px; margin-top: 16px; }
.post-reader-comment-form input { min-width: 0; flex: 1; padding: 10px 13px; border: 1px solid var(--border); border-radius: 20px; background: var(--card); color: var(--text); font: 14px var(--font); }
.post-reader-comment-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 15%, transparent); }

/* Edición de publicaciones */
.post-edit-modal { width: min(760px, 100%); max-width: 760px; max-height: min(90dvh, 900px); padding: 0; overflow: auto; border: 1px solid var(--border); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.post-editor { min-height: 260px; }
.post-editor-loading { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 14px; padding: 32px; color: var(--muted); text-align: center; }
.post-editor-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 26px 18px; border-bottom: 1px solid var(--border); background: var(--card); }
.post-editor-kicker { margin: 0 0 5px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.post-editor-header h2 { margin: 0; font-size: 24px; line-height: 1.15; }
.post-editor-close { width: 36px; height: 36px; flex: none; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--card); color: var(--muted); font-size: 19px; line-height: 1; cursor: pointer; }
.post-editor-close:hover { color: #fff; border-color: #d63636; background: #d63636; }
.post-editor-form { display: grid; gap: 17px; padding: 24px 26px 26px; }
.post-editor-form .field { margin: 0; }
.post-editor-form input, .post-editor-form textarea, .post-editor-form select { width: 100%; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font: 15px var(--font); }
.post-editor-form input, .post-editor-form select { min-height: 42px; padding: 9px 11px; }
.post-editor-form textarea { min-height: 210px; padding: 11px; line-height: 1.55; resize: vertical; }
.post-editor-form input:focus, .post-editor-form textarea:focus, .post-editor-form select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 15%, transparent); }
.post-editor-category { max-width: 240px; }
.post-editor-extras { display: grid; gap: 13px; padding: 17px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.post-editor-extras h3 { margin: 0; font-size: 15px; }
.post-editor-extras p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.post-editor-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.post-editor-fields label { font-size: 12px; }
.post-editor-upload-row { display: flex; flex-wrap: wrap; gap: 8px; }
.post-editor-upload { cursor: pointer; }
.post-editor-attachments { display: flex; flex-wrap: wrap; gap: 8px; min-height: 24px; }
.post-editor-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--card); color: var(--text); font-size: 12px; }
.post-editor-chip button { padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; }
.post-editor-chip button:hover { color: #d63636; }
.post-editor-chip.locked { color: var(--muted); }
.post-editor-chip.locked small { font-size: 11px; }
.post-editor-empty { color: var(--muted); font-size: 13px; }
.post-editor-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* About page and community gallery */
.aboutcard { padding: 30px 32px; }
.abouttitle { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.abouttitle h2 { font-size: 24px; }
.gallery-manage-header { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 7px; padding: 7px 12px; border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--border)); border-radius: 9px; background: color-mix(in srgb, var(--brand) 10%, var(--card)); color: #805200; box-shadow: 0 1px 2px rgba(68, 45, 0, .08); cursor: pointer; font-family: var(--font); font-size: 13px; font-weight: 750; line-height: 1; white-space: nowrap; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.gallery-manage-header:hover { border-color: color-mix(in srgb, var(--brand) 72%, var(--border)); background: color-mix(in srgb, var(--brand) 19%, var(--card)); box-shadow: 0 3px 8px rgba(68, 45, 0, .14); transform: translateY(-1px); }
.gallery-manage-header:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 2px; }
.gallery-manage-header-icon { display: inline-grid; width: 17px; height: 17px; place-items: center; border-radius: 5px; background: var(--brand); color: #fff; font-size: 16px; font-weight: 500; line-height: 1; }
.community-gallery { min-width: 0; }
.gallery-loading { min-height: 320px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.gallery-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #151515; }
.gallery-main-image { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.gallery-main-image img, .gallery-stage video { width: 100%; height: 100%; display: block; object-fit: cover; }
.gallery-stage-video video { object-fit: contain; }
.gallery-main-image:hover img { transform: scale(1.015); }
.gallery-main-image img { transition: transform .18s ease; }
.gallery-expand { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border: 0; border-radius: 8px; background: rgba(17,17,17,.76); color: #fff; font-size: 22px; line-height: 1; }
.gallery-expand:hover { background: rgba(17,17,17,.94); }
.gallery-thumbs { display: flex; gap: 9px; overflow-x: auto; padding: 10px 2px 4px; scrollbar-width: thin; }
.gallery-thumb-wrap { position: relative; flex: 0 0 auto; width: 86px; height: 86px; }
.gallery-thumb { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 9px; background: var(--bg); }
.gallery-thumb img, .gallery-thumb video { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { border-color: #b8b8b8; }
.gallery-thumb.active { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.gallery-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding-left: 2px; background: rgba(18,18,18,.78); color: #fff; font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.36); }
.gallery-remove { position: absolute; top: -6px; right: -6px; z-index: 2; width: 22px; height: 22px; padding: 0; border: 2px solid var(--card); border-radius: 50%; background: #dc2626; color: #fff; font-size: 18px; line-height: 16px; opacity: 0; transition: opacity .14s ease, transform .14s ease; }
.gallery-thumb-wrap:hover .gallery-remove, .gallery-remove:focus { opacity: 1; }
.gallery-remove:hover { background: #b91c1c; transform: scale(1.08); }
.gallery-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.gallery-upload { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.gallery-help { color: var(--muted); font-size: 13px; }
.gallery-empty { min-height: 320px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; padding: 32px; border: 1px dashed var(--border); border-radius: 12px; background: var(--bg); color: var(--muted); text-align: center; }
.gallery-empty strong { color: var(--text); font-size: 16px; }
.gallery-empty span:last-child { max-width: 320px; font-size: 14px; }
.gallery-empty-icon { color: var(--brand); font-size: 36px; line-height: 1; }
.aboutmeta { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin: 20px 0 16px; color: var(--muted); font-size: 14px; font-weight: 600; }
.aboutmeta > span { display: inline-flex; align-items: center; gap: 6px; }
.abouttext { white-space: pre-wrap; line-height: 1.65; }

/* Reseñas de comunidad: mantienen el lenguaje visual claro de la pestaña
   Acerca de y dan protagonismo a la experiencia de los miembros. */
.community-reviews { margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--border); }
.reviews-section { display: grid; gap: 18px; }
.reviews-loading, .reviews-error { min-height: 88px; display: grid; place-items: center; border-radius: 12px; background: var(--bg); font-size: 14px; }
.reviews-heading-main { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.reviews-heading-main h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 23px; letter-spacing: -.02em; }
.reviews-heading-main h2 > span { color: var(--brand); font-size: 24px; line-height: 1; }
.reviews-average { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; }
.reviews-average b { color: var(--text); font-size: 15px; }
.reviews-average small { color: var(--muted); font-size: 12px; }
.review-stars { display: inline-flex; align-items: center; gap: 1px; color: #d6d9de; font-size: 21px; letter-spacing: 0; line-height: 1; }
.review-stars span { display: inline-block; }
.review-stars span.is-filled { color: #ffb703; text-shadow: 0 1px 0 rgba(142, 87, 0, .14); }
.review-stars.compact { flex: none; font-size: 17px; }
.review-compose-trigger { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid #d7dce4; border-radius: 10px; background: var(--card); box-shadow: 0 2px 7px rgba(19, 32, 55, .14); color: #8894a8; cursor: text; font: 15px var(--font); text-align: left; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.review-compose-trigger > span:last-child { color: #ffb703; font-size: 22px; line-height: 1; }
.review-compose-trigger:hover { border-color: color-mix(in srgb, var(--brand) 62%, var(--border)); box-shadow: 0 5px 13px rgba(19, 32, 55, .15); transform: translateY(-1px); }
.review-compose-trigger:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 37%, transparent); outline-offset: 2px; }
.review-compose-help { margin: -9px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.review-compose-locked { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--border)); border-radius: 10px; background: color-mix(in srgb, var(--blue) 6%, var(--card)); color: var(--muted); }
.review-compose-locked > span { margin-top: 1px; color: var(--blue); }
.review-compose-locked p { margin: 0; font-size: 13px; line-height: 1.5; }
.reviews-list { display: grid; gap: 12px; }
.community-review { padding: 17px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); box-shadow: 0 2px 5px rgba(19, 32, 55, .04); }
.community-review-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.community-review-author { display: flex; min-width: 0; align-items: center; gap: 10px; }
.community-review-author > div { min-width: 0; display: grid; gap: 2px; }
.community-review-author b { overflow: hidden; color: var(--text); font-size: 14px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.community-review-author span { color: var(--muted); font-size: 12px; line-height: 1.25; }
.community-review-tools { display: flex; flex: none; align-items: center; justify-content: flex-end; gap: 7px; }
.review-tool { padding: 3px 4px; border: 0; background: transparent; color: var(--blue); cursor: pointer; font: 700 12px/1 var(--font); }
.review-tool:hover { text-decoration: underline; }
.review-tool:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 30%, transparent); outline-offset: 2px; border-radius: 3px; }
.review-tool.danger { color: #c52a2a; }
.community-review > p { margin: 13px 0 0; white-space: pre-wrap; color: var(--text); font-size: 14px; line-height: 1.58; }
.reviews-policy { position: relative; overflow: hidden; padding: 18px 18px 17px; border: 1px solid #f0d59a; border-radius: 11px; background: linear-gradient(135deg, #fff6dd, #fffaf0); color: #4d3d1d; }
.reviews-policy::after { content: '★'; position: absolute; right: 16px; top: -14px; color: rgba(221, 160, 25, .13); font-size: 88px; line-height: 1; pointer-events: none; }
.reviews-policy > * { position: relative; z-index: 1; }
.reviews-policy h3 { margin: 0 0 7px; color: #59400d; font-size: 15px; }
.reviews-policy p { max-width: 760px; margin: 6px 0 0; font-size: 13px; line-height: 1.52; }
.reviews-policy .reviews-policy-important { margin-top: 13px; color: #c2410c; }
.reviews-policy .reviews-policy-important b { color: #b45309; }

.community-review-modal { width: min(704px, 100%); max-width: 704px; padding: 0; overflow: hidden; border: 1px solid #d8dce2; box-shadow: 0 22px 58px rgba(0, 0, 0, .3); }
.review-modal { padding: 25px 28px 24px; }
.review-modal-head { display: flex; align-items: center; gap: 10px; padding-bottom: 19px; border-bottom: 1px solid var(--border); }
.review-modal-head > div { display: grid; min-width: 0; gap: 2px; }
.review-modal-head strong { color: var(--text); font-size: 14px; }
.review-modal-head span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.review-modal-head span b { color: var(--text); }
.review-modal-rating { margin: 21px 0 18px; }
.review-modal-rating > span { display: block; margin-bottom: 8px; color: var(--text); font-size: 14px; font-weight: 700; }
.review-star-picker { display: flex; align-items: center; gap: 4px; }
.review-star-option { width: 42px; height: 42px; padding: 0; border: 0; background: transparent; color: #cfd5dd; cursor: pointer; font: 40px/1 Arial, sans-serif; transition: color .13s ease, transform .13s ease; }
.review-star-option:hover, .review-star-option.selected { color: #ffb703; }
.review-star-option:hover { transform: translateY(-2px) scale(1.08); }
.review-star-option:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: -2px; border-radius: 7px; }
.review-modal-field { position: relative; margin: 0; }
.review-modal-field label { display: block; margin-bottom: 7px; color: var(--text); font-size: 13px; font-weight: 700; }
.review-modal-field textarea { box-sizing: border-box; width: 100%; min-height: 150px; padding: 12px 13px 28px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font: 15px/1.55 var(--font); resize: vertical; }
.review-modal-field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 13%, transparent); }
.review-char-count { position: absolute; right: 10px; bottom: 8px; color: var(--muted); font-size: 11px; }
.review-modal-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.review-modal-actions { margin-top: 22px; }
.review-publish { min-width: 155px; }

@media (max-width: 560px) {
  .community-reviews { margin-top: 24px; padding-top: 23px; }
  .reviews-heading-main { align-items: flex-start; flex-direction: column; gap: 8px; }
  .reviews-heading-main h2 { font-size: 21px; }
  .community-review-top { align-items: flex-start; flex-direction: column; }
  .community-review-tools { width: 100%; justify-content: flex-start; }
  .review-modal { padding: 20px 18px; }
  .community-review-modal { max-height: 100dvh; border-radius: 0; }
  .community-review-overlay { padding: 0; }
  .review-modal-actions .btn { flex: 1; min-width: 0; }
}

@media (max-width: 560px) {
  .post .pmain { flex-direction: column-reverse; }
  .post .pthumb { width: 100%; height: 180px; }
  .post-reader-modal { max-height: 100dvh; border-radius: 0; }
  .post-reader-overlay { padding: 0; }
  .post-reader { min-height: 100dvh; max-height: 100dvh; }
  .post-reader-header { padding: 14px 16px; }
  .post-reader-edit { padding: 0 9px; }
  .post-reader-scroll { padding: 22px 18px 30px; }
  .post-reader-title { font-size: 24px; }
  .post-reader-body { font-size: 16px; }
  .post-reader-comment-form { align-items: stretch; flex-direction: column; }
  .post-reader-comment-form .btn { width: 100%; }
  .conversation-replies { margin-left: 28px; padding-left: 10px; }
  .conversation-reply-host { margin-left: 28px; }
  .conversation-comment-row { gap: 8px; }
  .conversation-bubble { padding: 9px 10px; }
  .conversation-image, .conversation-video, .conversation-link, .conversation-file { width: 100%; }
  .rich-comment-main { gap: 8px; }
  .rich-comment-toolbar { align-items: flex-start; flex-direction: column; }
  .rich-comment-tools { width: 100%; justify-content: space-between; }
  .rich-comment-submit-wrap { align-self: flex-end; }
  .post-edit-modal { max-height: 100dvh; border-radius: 0; }
  .post-edit-overlay { padding: 0; }
  .post-editor-header { padding: 18px; }
  .post-editor-form { padding: 18px; }
  .post-editor-fields { grid-template-columns: 1fr; }
  .post-editor-form textarea { min-height: 180px; }
  .post-editor-actions .btn { flex: 1; }
  .aboutcard { padding: 20px; }
  .abouttitle { align-items: flex-start; flex-direction: column; gap: 5px; margin-bottom: 16px; }
  .abouttitle h2 { font-size: 21px; }
  .gallery-manage-header { width: 100%; }
  .gallery-stage { border-radius: 10px; }
  .gallery-thumb-wrap { width: 70px; height: 70px; }
  .gallery-help { width: 100%; }
  #topnav .searchform input { width: 140px; }
}

/* ============ Descubrir comunidades ============ */
.discover { max-width: 1000px; margin: 24px auto 60px; }
.disc-title { text-align: center; font-size: 40px; font-weight: 700; letter-spacing: -.02em; }
.disc-sub { text-align: center; margin-top: 6px; font-size: 16px; }
.disc-sub a { color: var(--blue); font-weight: 500; cursor: pointer; }
.disc-search { max-width: 652px; min-height: 58px; margin: 32px auto 0; display: flex; align-items: center; gap: 15px; background: var(--card); border: 1px solid color-mix(in srgb, var(--border) 82%, #cbd5e1); border-radius: 10px; padding: 0 20px; box-shadow: 0 2px 5px rgba(15,23,42,.11), 0 10px 22px rgba(15,23,42,.09); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.disc-search:hover { border-color: color-mix(in srgb, var(--blue) 26%, var(--border)); box-shadow: 0 3px 7px rgba(15,23,42,.12), 0 13px 25px rgba(15,23,42,.11); }
.disc-search:focus-within { border-color: color-mix(in srgb, var(--blue) 72%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 12%, transparent), 0 4px 10px rgba(15,23,42,.12), 0 14px 26px rgba(15,23,42,.11); }
.disc-search .dss-icon { display: inline-grid; place-items: center; flex: none; color: #92959b; }
.disc-search .dss-icon svg { display: block; width: 21px; height: 21px; stroke-width: 2; }
.disc-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: var(--text); font-size: 16px; font-family: var(--font); }
.disc-search input::placeholder { color: #8a8a8a; opacity: 1; }
.cat-wrap { position: relative; margin: 48px 0 28px; padding: 0 42px; }
@media (max-width: 560px) {
  .disc-search { min-height: 56px; margin-top: 28px; padding: 0 16px; gap: 12px; }
  .disc-search .dss-icon svg { width: 20px; height: 20px; }
  .cat-wrap { margin-top: 36px; padding: 0 38px; }
}
.cat-pill.filter { display: inline-flex; align-items: center; gap: 6px; }
.cat-pill.filter.active { background: #1c1c1c; color: #fff; border-color: #1c1c1c; }
.cat-pill .fic { font-size: 13px; }
.cat-pill .fcount { background: var(--blue); color: #fff; border-radius: 10px; padding: 0 6px; font-size: 11px; font-weight: 800; }

/* Filter dropdown */
.filterdrop { left: auto; right: 0; width: 480px; max-width: 88vw; padding: 20px 22px; text-align: left; }
.fcols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .filterdrop { width: 300px; } .fcols { grid-template-columns: 1fr; } }
.fcol h4 { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.fcol + .fcol { border-left: 1px solid var(--border); padding-left: 18px; }
@media (max-width: 560px) { .fcol + .fcol { border-left: none; padding-left: 0; } }
.fradio { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; cursor: pointer; }
.fradio input { display: none; }
.fdot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cbd5e1; flex: none; position: relative; }
.fradio input:checked + .fdot { border-color: var(--blue); }
.fradio input:checked + .fdot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--blue); }
.frow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.fclear { background: none; border: none; color: var(--muted); font-weight: 700; font-size: 13px; }
.fclear:hover { color: var(--text); }
.flang { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.flang select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: 14px; }
.cat-row { display: flex; align-items: center; gap: 8px; justify-content: flex-start; justify-content: safe center; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; scroll-behavior: smooth;
  scroll-snap-type: x proximity; scroll-padding: 0 8px; }
.cat-row > * { scroll-snap-align: start; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-pill { flex: none; }
.cat-arrow { position: absolute; top: 50%; transform: translateY(calc(-50% - 3px)); width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); z-index: 2; }
.cat-arrow:hover { background: var(--bg); }
.cat-arrow.left { left: 0; }
.cat-arrow.right { right: 0; }
.cat-arrow.hidden { display: none; }
.cat-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--card); color: var(--text); padding: 9px 16px; border-radius: 22px; font-weight: 500; font-size: 14px; white-space: nowrap; font-family: var(--font); }
.cat-pill:hover { background: var(--bg); }
.cat-pill.active { background: #1c1c1c; color: #fff; border-color: #1c1c1c; }
.cat-pill.filter { margin-left: 6px; }

.disc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 20px; }
@media (max-width: 860px) { .disc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .disc-grid { grid-template-columns: 1fr; } }
.disc-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.disc-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,.10); transform: translateY(-2px); }
.dc-cover { aspect-ratio: 16 / 9; background-size: cover; background-position: center; flex: none; }
.dc-cover.nocover { background: linear-gradient(135deg, var(--brand), var(--blue)); display: flex; align-items: center; justify-content: center; font-size: 54px; color: #fff; overflow: hidden; }
.dc-cover.nocover img { width: 100%; height: 100%; object-fit: cover; }
.dc-head { display: flex; align-items: center; gap: 10px; margin: 16px 16px 10px; }
.dc-icon { width: 34px; height: 34px; border-radius: 7px; overflow: hidden; flex: none; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand), var(--blue)); font-size: 17px; }
.dc-icon img { width: 100%; height: 100%; object-fit: cover; }
.dc-name { font-size: 18px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-desc { color: #4a4a4a; font-size: 15px; line-height: 1.47; margin: 0 16px 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dc-meta { color: #4a4a4a; font-size: 15px; font-weight: 500; margin: auto 16px 16px; }
@media (prefers-color-scheme: dark) { .dc-desc, .dc-meta { color: var(--muted); } }
:root[data-theme="dark"] .dc-desc, :root[data-theme="dark"] .dc-meta { color: var(--muted); }

/* ============ Leaderboard (levels + tables) ============ */
.levelcard { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; padding: 28px 26px; }
.levelcard-me { text-align: center; flex: none; width: 230px; }
.ring { width: 172px; height: 172px; border-radius: 50%; position: relative; margin: 0 auto;
  background: conic-gradient(#1c1c1c calc(var(--pct) * 1%), #e6e4e0 0); padding: 7px; }
.ring-inner { width: 100%; height: 100%; border-radius: 50%; background: var(--card); padding: 5px;
  display: flex; align-items: center; justify-content: center; }
.ring-inner .avatar { width: 100%; height: 100%; font-size: 40px; }
.ring-badge { position: absolute; bottom: 6px; right: 6px; background: var(--blue); color: #fff;
  font-weight: 800; font-size: 17px; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; border: 4px solid var(--card); }
.levelcard-name { font-weight: 700; font-size: 21px; margin-top: 14px; }
.levelcard-lvl { color: var(--blue); font-weight: 700; font-size: 14px; margin-top: 2px; }
.levelcard-next { color: var(--muted); font-size: 14px; margin-top: 8px; }
.levelcard-next b { color: var(--text); font-weight: 700; }
.lvlhelp { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px;
  border-radius: 50%; border: 1.5px solid var(--muted); font-size: 11px; font-weight: 700; cursor: help; margin-left: 2px; }
.levellist { flex: 1; min-width: 280px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 40px; }
@media (max-width: 700px) { .levellist { grid-template-columns: 1fr; } .levelcard { gap: 24px; } }
.levelrow { display: flex; align-items: center; gap: 14px; padding: 7px 0; }
.lvlbadge { width: 44px; height: 44px; border-radius: 50%; background: #eceae6; color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; flex: none; }
.lvlbadge.on { background: #fde9b0; color: #8a6100; }
.levelrow-title { font-weight: 700; font-size: 15px; }
.levelrow-sub { color: var(--muted); font-size: 13px; }
.lbupdated { font-size: 13px; margin: 16px 0; font-style: italic; }
.lbtables { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .lbtables { grid-template-columns: 1fr; } }
.lbtable h3 { font-size: 16px; margin-bottom: 12px; }
.lbtr { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.lbtr:first-child { border-top: none; }
.lbtrname { flex: 1; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbtrpts { color: var(--blue); font-weight: 700; }
/* Ribbon medals for the top 3 */
.medal { position: relative; width: 26px; height: 32px; flex: none; display: flex;
  align-items: flex-start; justify-content: center; }
.medal::before, .medal::after { content: ""; position: absolute; bottom: 0; width: 9px; height: 13px; }
.medal::before { left: 3px; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
.medal::after { right: 3px; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
.medal-face { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: #fff;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,.15); }
.medal.m1 .medal-face { background: linear-gradient(160deg, #fcd34d, #e0a200); }
.medal.m1::before, .medal.m1::after { background: #e0a200; }
.medal.m2 .medal-face { background: linear-gradient(160deg, #d8d8d8, #9aa0a6); }
.medal.m2::before, .medal.m2::after { background: #9aa0a6; }
.medal.m3 .medal-face { background: linear-gradient(160deg, #e0a878, #b06d33); }
.medal.m3::before, .medal.m3::after { background: #b06d33; }
.lbnum { width: 26px; text-align: center; color: var(--muted); font-weight: 700; font-size: 14px; flex: none; }
.lbtr { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }

/* ============ Clasificación Komul (Gemas + MRR) ============ */
.komul-ranking-hero { max-width: 780px; margin: 34px auto 24px; text-align: center; }
.komul-ranking-overline { color: var(--blue); font-size: 11px; font-weight: 900; letter-spacing: .95px; line-height: 1.2; }
.komul-ranking-hero h1 { margin-top: 8px; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.035em; }
.komul-ranking-hero p { max-width: 630px; margin: 8px auto 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.komul-progress-card { overflow: hidden; border-color: color-mix(in srgb, var(--blue) 20%, var(--border)); }
.komul-progress-main { display: flex; align-items: center; gap: 17px; padding: 24px 26px 16px; }
.komul-current-gem { width: 76px; height: 76px; flex: none; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--blue) 20%, var(--border)); border-radius: 23px; background: linear-gradient(145deg, color-mix(in srgb, var(--blue) 16%, var(--card)), color-mix(in srgb, #67d4ff 12%, var(--card))); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); font-size: 42px; }
.komul-progress-copy { min-width: 0; flex: 1; }
.komul-progress-copy > span, .komul-stat-label { display: block; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .78px; line-height: 1.2; }
.komul-progress-copy h2 { margin-top: 4px; font-size: 25px; letter-spacing: -.025em; }
.komul-progress-copy p { margin-top: 3px; color: var(--muted); font-size: 13px; }
.komul-global-rank { display: flex; min-width: 88px; flex-direction: column; align-items: flex-end; text-align: right; }
.komul-global-rank b { color: var(--blue); font-size: 28px; line-height: 1; }
.komul-global-rank span { max-width: 100px; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.2; }
.komul-level-progress { padding: 5px 26px 20px; }
.komul-level-progress-bar { height: 15px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--blue) 10%, var(--bg)); box-shadow: inset 0 1px 2px rgba(20,35,65,.06); }
.komul-level-progress-bar > span { display: block; height: 100%; min-width: 6px; border-radius: inherit; background: linear-gradient(90deg, #3d66df 0%, #3b94e6 55%, #64c7ed 100%); box-shadow: 0 0 12px rgba(73,133,230,.35); transition: width .35s ease; }
.komul-next-level { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.komul-next-level b { color: var(--text); font-size: 17px; }
.komul-next-level span { color: var(--text); font-weight: 700; }
.komul-next-level small { width: 100%; color: var(--muted); font-size: 12px; }
.komul-journey { display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); gap: 0; overflow-x: auto; padding: 16px 18px 20px; border-top: 1px solid var(--border); }
.komul-journey-step { position: relative; display: flex; min-width: 106px; flex-direction: column; align-items: center; gap: 6px; padding: 0 8px; color: var(--muted); text-align: center; }
.komul-journey-step:not(:last-child)::after { content: ''; position: absolute; z-index: 0; top: 17px; left: calc(50% + 21px); width: calc(100% - 42px); height: 2px; background: var(--border); }
.komul-journey-icon { position: relative; z-index: 1; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--card); filter: grayscale(.65); font-size: 22px; }
.komul-journey-step.reached { color: var(--text); }
.komul-journey-step.reached .komul-journey-icon { border-color: color-mix(in srgb, var(--blue) 36%, var(--border)); filter: none; box-shadow: 0 3px 10px rgba(66,116,222,.16); }
.komul-journey-step.reached:not(:last-child)::after { background: color-mix(in srgb, var(--blue) 55%, var(--border)); }
.komul-journey-step.active .komul-journey-icon { outline: 4px solid color-mix(in srgb, var(--blue) 14%, transparent); }
.komul-journey-step b { display: block; color: currentColor; font-size: 12px; line-height: 1.15; }
.komul-journey-step small { display: block; margin-top: 2px; font-size: 10px; white-space: nowrap; }
.komul-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0; }
.komul-stat-card { min-height: 148px; border-color: color-mix(in srgb, var(--blue) 12%, var(--border)); }
.komul-stat-value { margin-top: 13px; color: var(--text); font-size: 25px; font-weight: 850; letter-spacing: -.03em; line-height: 1; }
.komul-stat-value.positive, .komul-ranking-table .positive { color: #119a57; }
.komul-stat-value.negative, .komul-ranking-table .negative { color: #d63e3e; }
.komul-stat-card p { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.43; }
.komul-visibility-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 18px 0; border-color: color-mix(in srgb, var(--blue) 17%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 5%, var(--card)), var(--card) 55%); }
.komul-visibility-card.is-public { border-color: color-mix(in srgb, #18a568 26%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, #18a568 7%, var(--card)), var(--card) 55%); }
.komul-visibility-card > div { position: relative; min-height: 38px; padding-left: 50px; }
.komul-visibility-icon { position: absolute; top: 0; left: 0; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: color-mix(in srgb, var(--blue) 11%, var(--card)); font-size: 20px; }
.komul-visibility-card h3 { font-size: 16px; }
.komul-visibility-card p { max-width: 690px; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.42; }
.komul-visibility-card .btn { flex: none; }
.komul-ranking-table-card { overflow: hidden; margin-top: 20px; }
.komul-table-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 23px 24px 19px; border-bottom: 1px solid var(--border); }
.komul-table-heading h2 { margin-top: 4px; font-size: 21px; letter-spacing: -.02em; }
.komul-table-heading p { max-width: 650px; margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.komul-category-filter { display: grid; flex: none; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.komul-category-filter select { min-width: 168px; padding: 8px 28px 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font-size: 13px; font-weight: 600; }
.komul-ranking-table-wrap { overflow-x: auto; }
.komul-ranking-table { width: 100%; min-width: 790px; border-collapse: collapse; }
.komul-ranking-table th { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .35px; text-align: left; text-transform: uppercase; }
.komul-ranking-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 13px; vertical-align: middle; }
.komul-ranking-table tbody tr:last-child td { border-bottom: 0; }
.komul-ranking-table tbody tr:hover { background: color-mix(in srgb, var(--blue) 3%, var(--card)); }
.komul-position { display: inline-grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 850; }
.komul-position.top { width: auto; background: transparent; font-size: 21px; }
.komul-community-cell { display: flex; align-items: center; gap: 10px; min-width: 185px; }
.komul-community-cell:hover b { color: var(--blue); }
.komul-community-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 75%, #fff), color-mix(in srgb, var(--blue) 55%, #fff)); color: #fff; font-size: 19px; }
.komul-community-icon img { width: 100%; height: 100%; object-fit: cover; }
.komul-community-cell > span:last-child { display: grid; min-width: 0; gap: 1px; }
.komul-community-cell b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.komul-community-cell small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.komul-status-emoji { font-size: 18px; letter-spacing: 1px; white-space: nowrap; }
.komul-mrr-cell { color: var(--blue) !important; font-size: 14px !important; font-weight: 800; white-space: nowrap; }
.komul-history { color: var(--muted); font-size: 12px; white-space: nowrap; }
.komul-empty-row { padding: 28px !important; color: var(--muted) !important; line-height: 1.5; text-align: center; }
.komul-ranking-note { margin: 10px 0 4px; color: var(--muted); font-size: 11px; line-height: 1.45; text-align: center; }

@media (max-width: 760px) {
  .komul-ranking-hero { margin-top: 25px; }
  .komul-progress-main { padding: 19px 18px 13px; gap: 12px; }
  .komul-current-gem { width: 60px; height: 60px; border-radius: 18px; font-size: 33px; }
  .komul-progress-copy h2 { font-size: 21px; }
  .komul-global-rank { display: none; }
  .komul-level-progress { padding: 5px 18px 17px; }
  .komul-journey { padding: 15px 10px 18px; }
  .komul-stat-grid { grid-template-columns: 1fr; gap: 10px; }
  .komul-stat-card { min-height: 0; }
  .komul-visibility-card { align-items: flex-start; flex-direction: column; gap: 14px; }
  .komul-visibility-card .btn { width: 100%; }
  .komul-table-heading { align-items: flex-start; flex-direction: column; padding: 19px 17px 15px; }
  .komul-category-filter, .komul-category-filter select { width: 100%; }
}

/* Control de privacidad de la clasificación dentro del editor de comunidad. */
.komul-ranking-toggle { display: flex !important; align-items: flex-start; gap: 10px; margin: 2px 0 14px; padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--border)); border-radius: 10px; background: color-mix(in srgb, var(--blue) 4%, var(--card)); cursor: pointer; }
.komul-ranking-toggle input { width: 18px !important; height: 18px; flex: none; margin: 1px 0 0; accent-color: var(--blue); }
.komul-ranking-toggle span { display: grid; gap: 3px; }
.komul-ranking-toggle b { font-size: 13px; }
.komul-ranking-toggle small { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.35; }

/* ============ Calendar ============ */
.calhead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.calnav { display: flex; align-items: center; gap: 12px; }
.calmonth { font-weight: 800; font-size: 17px; text-transform: capitalize; min-width: 150px; text-align: center; }
.icon-nav { background: none; border: 1px solid var(--border); border-radius: 8px; width: 32px; height: 32px; font-size: 18px; color: var(--text); }
.icon-nav:hover { background: var(--bg); }
.calright { display: flex; align-items: center; gap: 10px; }
.calviewtoggle { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cvt { background: var(--card); border: none; padding: 6px 12px; color: var(--muted); }
.cvt.active { background: var(--bg); color: var(--text); }
.calgrid { margin-top: 16px; overflow: hidden; }
.calweekdays { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--border); }
.calweekdays > div { padding: 10px; text-align: center; font-weight: 700; font-size: 13px; color: var(--muted); }
.calcells { display: grid; grid-template-columns: repeat(7, 1fr); }
.calcell { min-height: 110px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.calcell:nth-child(7n) { border-right: none; }
.calcell.out { color: var(--muted); opacity: .5; }
.calcell .cd { font-size: 14px; font-weight: 600; }
.calcell .cd.today { background: #ef4444; color: #fff; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.calevent { background: var(--brand); color: #fff; border: none; border-radius: 6px; padding: 3px 6px; font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
@media (max-width: 640px) { .calcell { min-height: 64px; } }

/* ============ Members ============ */
.mfilters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.mcard { padding: 16px; border-bottom: 1px solid var(--border); }
.mcard:last-child { border-bottom: none; }
.mtop { display: flex; align-items: center; gap: 12px; }
.mname { font-weight: 700; font-size: 15px; }
.mhandle { color: var(--muted); font-size: 13px; }
.mbio { margin: 8px 0; font-size: 14px; line-height: 1.5; }
.mmeta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 13px; }
.mmeta .dot-online { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }

/* ============ Map ============ */
.mapwrap { position: relative; min-height: 520px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.mapbg { position: absolute; inset: 0; background:
  radial-gradient(circle at 25% 30%, #cfe8c9 0 12%, transparent 12%),
  radial-gradient(circle at 70% 55%, #cfe8c9 0 16%, transparent 16%),
  radial-gradient(circle at 45% 75%, #cfe8c9 0 10%, transparent 10%),
  #9ecae1; opacity: .55; }
.mapgate { position: relative; max-width: 420px; margin: 120px auto; text-align: center; z-index: 1; }
.maplist { position: relative; max-width: 520px; margin: 40px auto; z-index: 1; }

/* Real map (Leaflet) */
.maparea { position: relative; height: 460px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
#mapCanvas { width: 100%; height: 100%; background: var(--bg); }
.mapload { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.mapmarker img, .mapmarker span { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3);
  background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; }
.maprow { cursor: pointer; }
.maprow:hover { background: var(--bg); }
.leaflet-popup-content { font-family: var(--font); font-size: 14px; }

/* Mapa de miembros a pantalla completa */
#app.map-page { max-width: none; margin: 0; padding: 0; }
#app.map-page .tabsbar { margin: 0; background: var(--card); }
#app.map-page .tabsbar .tabs { max-width: 1080px; padding: 0 16px; }
#app.map-page .map-clayout { display: block; }
#app.map-page #tabcontent { width: 100%; }
body.map-page-active #sitefooter { display: none; }

.map-fullscreen-shell { --map-fullscreen-height: calc(100dvh - 108px); position: relative; width: 100%; height: var(--map-fullscreen-height); min-height: 430px; overflow: hidden; background: #82c5ed; }
.map-fullscreen-shell .map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; background: #82c5ed; }
.map-fullscreen-shell .mapload { z-index: 1100; background: color-mix(in srgb, #fff 86%, transparent); color: #31363c; font-weight: 700; }
.map-load-error { display: flex; max-width: 320px; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 12px; background: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.16); text-align: center; font-size: 14px; }
.map-load-error span { color: #667085; font-weight: 400; }

.map-fullscreen-shell .leaflet-control-zoom { overflow: hidden; border: 1px solid #d6d9dd; border-radius: 8px; box-shadow: 0 2px 9px rgba(0,0,0,.16); }
.map-fullscreen-shell .leaflet-control-zoom a { width: 36px; height: 36px; border: 0; border-bottom: 1px solid #e4e6e9; background: #fff; color: #22272e; line-height: 34px; font-weight: 400; }
.map-fullscreen-shell .leaflet-control-zoom a:last-child { border-bottom: 0; }
.map-fullscreen-shell .leaflet-control-zoom a:hover { background: #f5f6f7; color: #000; }
.map-fullscreen-shell .leaflet-control-attribution { padding: 2px 6px; color: #334155; background: rgba(255,255,255,.76); font-size: 11px; }
.map-fullscreen-shell .leaflet-control-attribution a { color: #1f5e8e; }

.fullmap-marker { background: transparent; border: 0; }
.fullmap-pin { display: block; width: 32px; height: 42px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.36)); transform-origin: 50% 100%; transition: transform .16s ease, filter .16s ease; }
.fullmap-marker:hover .fullmap-pin { transform: translateY(-3px) scale(1.07); filter: drop-shadow(0 5px 4px rgba(0,0,0,.28)); }
.fullmap-pin svg { display: block; width: 32px; height: 42px; }
.fullmap-pin path { fill: #17191c; }
.fullmap-pin circle { fill: #fff; }
.fullmap-cluster { border: 0; background: transparent; }
.fullmap-cluster > span { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 2px solid rgba(255,255,255,.95); border-radius: 50%; background: #17191c; box-shadow: 0 2px 7px rgba(0,0,0,.28); color: #fff; font-size: 12px; font-weight: 800; }

.map-members-overlay { position: absolute; z-index: 1200; top: 16px; left: 16px; }
.map-members-control { display: inline-flex; min-height: 38px; align-items: center; gap: 8px; border: 1px solid #d7dade; border-radius: 9px; padding: 7px 10px; background: rgba(255,255,255,.96); box-shadow: 0 2px 10px rgba(0,0,0,.14); color: #252a31; font-size: 13px; font-weight: 700; }
.map-members-control:hover { background: #fff; }
.map-members-control-icon { color: #17191c; font-size: 21px; font-weight: 900; line-height: .6; }
.map-members-control b { display: inline-flex; min-width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 50%; padding: 0 5px; background: #17191c; color: #fff; font-size: 11px; }
.map-members-panel { position: absolute; top: calc(100% + 8px); left: 0; width: min(310px, calc(100vw - 32px)); max-height: min(390px, calc(var(--map-fullscreen-height) - 105px)); overflow: auto; border: 1px solid #d7dade; border-radius: 11px; background: rgba(255,255,255,.98); box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.map-members-panel[hidden] { display: none; }
.map-members-panel-title { padding: 13px 14px 10px; border-bottom: 1px solid #e6e8eb; color: #5c6570; font-size: 12px; font-weight: 700; }
.map-members-list { padding: 5px; }
.map-member-row { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; border-radius: 8px; padding: 9px; background: transparent; color: #20252b; text-align: left; }
.map-member-row:hover { background: #f1f3f5; }
.map-member-row > span { display: flex; min-width: 0; flex: 1; flex-direction: column; line-height: 1.25; }
.map-member-row b, .map-member-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-member-row b { font-size: 13px; }
.map-member-row small { margin-top: 2px; color: #697386; font-size: 12px; }
.map-members-panel-empty { padding: 15px; color: #606a77; font-size: 13px; line-height: 1.5; }
.map-members-panel-empty a { color: #1f5e8e; font-weight: 700; }

.map-privacy-note { position: absolute; z-index: 1200; bottom: 14px; left: 8px; display: flex; max-width: min(380px, calc(100vw - 24px)); align-items: center; gap: 12px; border-radius: 6px; padding: 11px 10px 11px 13px; background: rgba(24,27,31,.96); box-shadow: 0 2px 9px rgba(0,0,0,.22); color: #fff; font-size: 12px; font-weight: 600; }
.map-privacy-note button { width: 22px; height: 22px; flex: none; border: 0; border-radius: 4px; background: transparent; color: #fff; font-size: 21px; line-height: 18px; opacity: .86; }
.map-privacy-note button:hover { background: rgba(255,255,255,.16); opacity: 1; }

.map-member-popup { display: flex; min-width: 205px; align-items: center; gap: 9px; padding: 2px; }
.map-member-popup > span:last-child { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.map-member-popup b { color: #20242a; font-size: 14px; }
.map-member-popup small { color: #687282; font-size: 12px; }
.map-member-popup a { margin-top: 3px; color: #215c9a; font-size: 12px; font-weight: 700; }
.map-member-popup a:hover { text-decoration: underline; }

.map-fullscreen-gate { display: flex; align-items: center; justify-content: center; background: #93cef2; }
.map-gate-art { position: absolute; inset: 0; opacity: .88; background:
  radial-gradient(ellipse at 14% 32%, #cbe6bf 0 6%, transparent 6.2%),
  radial-gradient(ellipse at 30% 67%, #c5dfb9 0 8%, transparent 8.2%),
  radial-gradient(ellipse at 57% 42%, #d5e9be 0 11%, transparent 11.2%),
  radial-gradient(ellipse at 82% 66%, #c7e0b9 0 9%, transparent 9.2%),
  radial-gradient(ellipse at 90% 18%, #dceabf 0 7%, transparent 7.2%),
  linear-gradient(128deg, rgba(255,255,255,.15) 0 16%, transparent 16% 44%, rgba(255,255,255,.12) 44% 52%, transparent 52%); }
.map-gate-card { position: relative; z-index: 1; width: min(410px, calc(100% - 32px)); padding: 30px 28px; border: 1px solid rgba(255,255,255,.9); border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: 0 12px 34px rgba(18,49,71,.2); text-align: center; }
.map-gate-icon { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 50%; background: #eef3f5; color: #20252b; font-size: 32px; font-weight: 900; }
.map-gate-card h2 { margin-top: 13px; color: #20252b; font-size: 22px; }
.map-gate-card p { margin-top: 8px; color: #667085; line-height: 1.5; }
.map-gate-card .btn { min-width: 190px; background: var(--join); color: #1c1c1c; }
.map-gate-card .btn:hover { background: var(--join-dark); }

@media (max-width: 680px) {
  #app.map-page .tabsbar .tabs { padding: 0 10px; }
  #app.map-page .tabsbar .tabs a { margin-right: 11px; font-size: 14px; }
  .map-fullscreen-shell { min-height: 460px; }
  .map-members-overlay { top: 10px; left: 10px; }
  .map-privacy-note { bottom: 10px; left: 6px; font-size: 11px; }
  .map-fullscreen-shell .leaflet-top.leaflet-right { top: 4px; right: 4px; }
}

/* ============ Settings ============ */
.setlayout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; max-width: 1000px; margin: 24px auto; align-items: start; }
@media (max-width: 760px) { .setlayout { grid-template-columns: 1fr; } }
.setnav { display: flex; flex-direction: column; gap: 2px; }
.setnav-item { padding: 11px 16px; border-radius: 10px; font-weight: 700; color: var(--text); }
.setnav-item:hover { background: var(--card); }
.setnav-item.active { background: var(--join); color: #1c1c1c; }
.setcontent h2 { font-size: 22px; margin-bottom: 6px; }
.setcontent h3 { font-size: 17px; }
.setrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.setrow:last-child { border-bottom: none; }
.tworow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .tworow { grid-template-columns: 1fr; } }
.setblock { padding: 16px 0; border-bottom: 1px solid var(--border); }
.setblock p { margin-top: 6px; font-size: 14px; }
.setblock select { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); }
.setlink { color: var(--blue); font-weight: 700; }
.setnote { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px; font-size: 14px; line-height: 1.5; }
.setnote code { background: var(--card); padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.balancebox { background: var(--bg); border-radius: 12px; padding: 24px; }
.balance { font-size: 34px; font-weight: 800; }
.themeopt { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; cursor: pointer; }
.themeopt input { width: 18px; height: 18px; }

/* Perfil: diseño inspirado en los ajustes de comunidad, con enlaces sociales editables */
.profile-settings-card { max-width: 780px; min-height: 940px; padding: 34px 32px 30px !important; }
.profile-settings-card h2 { margin-bottom: 26px; }
.profile-avatar-row { display: flex; align-items: center; gap: 18px; }
.profile-photo { width: 52px; height: 52px; font-size: 20px; border: 3px solid #151515; background: var(--brand); }
.profile-photo-action { cursor: pointer; font-size: 15px; }
.profile-form { margin-top: 28px; }
.profile-two-row { gap: 16px; }
.profile-fieldset { min-width: 0; min-height: 57px; margin: 0 0 7px; padding: 0 12px 6px; border: 1px solid #cfd3d8; border-radius: 5px; background: var(--card); }
.profile-fieldset:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 12%, transparent); }
.profile-fieldset legend { padding: 0 3px; color: #9aa2aa; font-size: 13px; line-height: 1; }
.profile-fieldset input { width: 100%; padding: 5px 0 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.profile-fieldset input::placeholder { color: #a5adb6; }
.profile-name-help { margin: 0 0 31px 13px; }
.profile-help { color: var(--muted); font-size: 12px; line-height: 1.45; }
.profile-url-field { position: relative; margin-bottom: 7px; }
.profile-url-field input { color: #9aa2aa; padding-right: 24px; cursor: default; }
.profile-lock { position: absolute; right: 12px; bottom: 11px; color: #9aa2aa; font-size: 17px; }
.profile-bio-field { position: relative; margin: 40px 0 27px; }
.profile-bio-field > label { position: absolute; z-index: 1; top: 15px; left: 13px; color: #f04438; font-size: 15px; pointer-events: none; }
.profile-bio-field textarea { width: 100%; min-height: 76px; resize: vertical; padding: 40px 12px 24px; border: 1px solid #f04438; border-radius: 5px; outline: 0; background: var(--card); color: var(--text); font-size: 15px; }
.profile-bio-field textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, #f04438 12%, transparent); }
.profile-count { position: absolute; right: 12px; bottom: 9px; color: var(--muted); font-size: 12px; }
.profile-location-field { margin-top: 0; }
.profile-map-link { display: inline-flex; align-items: center; gap: 10px; padding: 9px 0 17px; border: 0; background: transparent; color: #2563eb; font-weight: 600; font-size: 13px; }
.profile-map-link:hover { color: #1d4ed8; text-decoration: underline; }
.profile-map-link span { color: #8f969d; font-size: 29px; line-height: .8; font-weight: 400; }
.profile-accordion { border: 0; border-top: 1px solid transparent; margin: 0; }
.profile-accordion > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; list-style: none; cursor: pointer; color: var(--text); font-size: 16px; font-weight: 700; user-select: none; }
.profile-accordion > summary::-webkit-details-marker { display: none; }
.profile-accordion-chevron { color: #4b5563; font-size: 21px; font-weight: 400; line-height: 1; transition: transform .16s ease; }
.profile-accordion[open] .profile-accordion-chevron { transform: rotate(180deg); }
.profile-accordion-content { padding: 0 0 15px; }
.profile-social-help { margin: -2px 0 13px; max-width: 590px; }
.social-link-rows { display: grid; gap: 9px; }
.social-links-empty { padding: 13px; border: 1px dashed var(--border); border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 13px; line-height: 1.45; }
.social-link-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 32px; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); }
.social-network-icon { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: #fff; background: #64748b; font-size: 12px; font-weight: 800; line-height: 1; }
.social-network-icon.social-link-icon { flex: none; }
.social-website { background: #334155; font-size: 17px; }
.social-youtube { background: #ef4444; font-size: 13px; }
.social-instagram { background: linear-gradient(135deg, #8b3cf5, #ec4899 55%, #f59e0b); font-size: 18px; }
.social-facebook { background: #1877f2; font-size: 18px; }
.social-linkedin { background: #0a66c2; font-size: 11px; }
.social-tiktok { background: #161616; font-size: 17px; }
.social-x { background: #111827; font-size: 13px; }
.social-threads { background: #171717; font-size: 17px; }
.social-twitch { background: #7c3aed; font-size: 16px; }
.social-telegram { background: #229ed9; font-size: 14px; }
.social-whatsapp { background: #22c55e; font-size: 16px; }
.social-link-input { min-width: 0; }
.social-link-input b { display: block; margin-bottom: 2px; color: var(--text); font-size: 12px; }
.social-link-input input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.social-link-input input::placeholder { color: var(--muted); }
.social-link-remove { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: #94a3b8; font-size: 23px; line-height: 1; }
.social-link-remove:hover { background: #fee2e2; color: #dc2626; }
.social-link-add-row { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.social-link-add-row select { min-width: 180px; flex: 1; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: 14px; }
.social-link-add { color: var(--blue) !important; border-color: color-mix(in srgb, var(--blue) 30%, var(--border)) !important; }
.social-link-add:hover { background: color-mix(in srgb, var(--blue) 7%, var(--card)) !important; }
.social-link-add:disabled { color: var(--muted) !important; border-color: var(--border) !important; background: var(--bg) !important; }
.profile-save { min-width: 215px; margin-top: 22px; padding: 13px 18px; border: 1px solid #dedede; border-radius: 4px; background: #e5e5e5; color: #8d96a1; box-shadow: none; }
.profile-save:not(:disabled) { border-color: var(--join-dark); background: var(--join); color: #1c1c1c; }
.profile-save:not(:disabled):hover { background: var(--join-dark); }
.activity-social-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin: 11px 0 14px; }
.activity-social-links a { display: inline-flex; border-radius: 8px; transition: transform .14s ease, box-shadow .14s ease; }
.activity-social-links a:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.activity-social-links .social-network-icon { width: 29px; height: 29px; }
@media (max-width: 560px) {
  .profile-settings-card { min-height: 0; padding: 24px 18px 26px !important; }
  .profile-settings-card h2 { margin-bottom: 20px; }
  .profile-form { margin-top: 23px; }
  .profile-name-help { margin-bottom: 24px; }
  .profile-bio-field { margin-top: 30px; }
  .social-link-add-row { align-items: stretch; flex-direction: column; }
  .social-link-add-row select { width: 100%; }
  .social-link-add { width: 100%; }
  .profile-save { width: 100%; }
}

/* ============ Plan selection + subscribe ============ */
.create-intro-active #topbar,
.create-intro-active #sitefooter { display: none; }
.create-intro-active #app { max-width: none; min-height: 100vh; margin: 0; padding: 0; }
.create-intro { min-height: 100vh; display: flex; flex-direction: column; align-items: center; overflow: hidden; padding: clamp(34px, 6vw, 68px) 24px 42px; background: #fcfbf9; color: #17233b; text-align: center; }
.create-intro-brand { display: inline-flex; align-items: center; justify-content: center; margin-bottom: clamp(32px, 4vw, 48px); }
.create-intro-brand .logo { font-size: clamp(38px, 4vw, 50px); letter-spacing: -2px; }
.create-intro-copy { max-width: 760px; }
.create-intro h1 { margin: 0; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.2; letter-spacing: -.035em; font-weight: 900; }
.create-intro-copy p { max-width: 610px; margin: 14px auto 0; color: #334155; font-size: clamp(15px, 1.55vw, 18px); line-height: 1.55; }
.create-carousel { width: min(100%, 860px); margin: clamp(25px, 4.3vw, 44px) auto 0; }
.create-carousel-stage { position: relative; height: clamp(248px, 31vw, 350px); overflow: hidden; isolation: isolate; }
.create-carousel-slide { position: absolute; top: 0; left: 50%; width: min(66vw, 540px); height: 100%; overflow: hidden; padding: 0; border: 0; border-radius: 16px; background: #e8edf4; box-shadow: 0 7px 18px rgba(15, 23, 42, .15), 0 2px 5px rgba(15, 23, 42, .12); cursor: pointer; transition: transform .48s cubic-bezier(.2, .72, .22, 1), opacity .35s ease, filter .35s ease, box-shadow .35s ease; transform-origin: center center; opacity: .42; filter: saturate(.78) brightness(.91); }
.create-carousel-slide::before { content: ''; position: absolute; z-index: 1; inset: 45% 0 0; background: linear-gradient(180deg, transparent 0%, rgba(7, 18, 35, .08) 24%, rgba(7, 18, 35, .76) 100%); opacity: 0; pointer-events: none; transition: opacity .28s ease; }
.create-carousel-slide::after { content: ''; position: absolute; z-index: 3; inset: 0; border: 1px solid rgba(15, 23, 42, .12); border-radius: inherit; pointer-events: none; }
.create-carousel-slide:hover { opacity: .76; }
.create-carousel-slide.is-active { opacity: 1; filter: none; box-shadow: 0 16px 32px rgba(15, 23, 42, .19), 0 3px 8px rgba(15, 23, 42, .15); }
.create-carousel-slide.is-active::before { opacity: 1; }
.create-carousel-slide img { position: relative; z-index: 0; display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.create-slide-fallback { position: absolute; z-index: 0; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; background: radial-gradient(circle at 24% 18%, #f7d872 0, transparent 34%), linear-gradient(135deg, #253c88, #4b73dc 55%, #f19b38); color: #fff; text-align: center; }
.create-slide-fallback b { font-size: 34px; font-weight: 900; letter-spacing: -1.5px; }
.create-slide-fallback span { max-width: 210px; font-size: 13px; line-height: 1.35; opacity: .9; }
.create-carousel-slide.is-image-missing img { opacity: 0; }
.create-carousel-slide.is-image-missing .create-slide-fallback { display: flex; }
.create-slide-caption { position: absolute; z-index: 2; right: 16px; bottom: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 11px 14px 12px; border-radius: 11px; background: rgba(8, 168, 95, .96); color: #fff; box-shadow: 0 7px 18px rgba(8, 168, 95, .24); font-size: 13px; line-height: 1.3; text-align: left; opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .26s ease .16s, transform .26s ease .16s; }
.create-slide-caption strong { font-size: 14px; }
.create-slide-caption span { opacity: .92; }
.create-carousel-slide.is-active .create-slide-caption { opacity: 1; transform: translateY(0) scale(1); }
.create-carousel-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 17px; }
.create-carousel-arrow { width: 32px; height: 32px; padding: 0; border: 0; background: transparent; color: #8b9098; font-size: 31px; font-weight: 400; line-height: 1; transition: color .16s ease, transform .16s ease; }
.create-carousel-arrow:hover { color: #17233b; transform: scale(1.1); }
.create-carousel-arrow:focus-visible, .create-carousel-slide:focus-visible, .create-carousel-dots button:focus-visible, .create-community-cta:focus-visible { outline: 3px solid rgba(59, 91, 219, .36); outline-offset: 3px; }
.create-carousel-dots { display: flex; align-items: center; gap: 8px; }
.create-carousel-dots button { width: 12px; height: 12px; padding: 0; border: 0; border-radius: 50%; background: #dfe2e6; transition: transform .18s ease, background .18s ease; }
.create-carousel-dots button:hover { background: #aab0b8; }
.create-carousel-dots button.is-active { background: #3b70ee; transform: scale(1.08); }
.create-community-cta { width: min(100%, 488px); min-height: 50px; margin-top: clamp(27px, 4vw, 43px); border: 1px solid #e8bd57; border-radius: 6px; background: linear-gradient(180deg, #ffe092, #f7cc70); color: #17233b; box-shadow: 0 2px 5px rgba(99, 74, 27, .24); font: 800 15px/1 var(--font); transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.create-community-cta:hover { filter: saturate(1.05) brightness(.98); transform: translateY(-1px); box-shadow: 0 5px 11px rgba(99, 74, 27, .28); }
.create-community-cta span { margin-left: 8px; font-size: 17px; vertical-align: -1px; }
.create-intro-note { margin: 13px 0 0; color: #64748b; font-size: 13px; }
@media (max-width: 620px) {
  .create-intro { padding: 34px 16px 36px; }
  .create-intro-brand { margin-bottom: 29px; }
  .create-intro-copy p { max-width: 500px; }
  .create-carousel { width: calc(100% + 16px); }
  .create-carousel-stage { height: min(68vw, 310px); min-height: 212px; }
  .create-carousel-slide { width: min(79vw, 440px); border-radius: 13px; }
  .create-slide-caption { right: 12px; bottom: 12px; left: 12px; padding: 9px 11px; font-size: 11px; }
  .create-slide-caption strong { font-size: 12px; }
  .create-carousel-controls { margin-top: 14px; }
  .create-community-cta { margin-top: 28px; }
}

.planpage { max-width: 760px; margin: 30px auto 60px; text-align: center; }
.plantitle { font-size: 40px; font-weight: 800; }
.billwrap { display: inline-flex; align-items: center; gap: 10px; margin: 24px 0 8px; position: relative; }
.billtoggle { display: inline-flex; background: #e7e5e0; border-radius: 24px; padding: 4px; }
.billopt { border: none; background: transparent; padding: 8px 22px; border-radius: 20px; font-weight: 700; color: var(--text); }
.billopt.active { background: var(--card); box-shadow: var(--shadow); }
.billbadge { background: #16a34a; color: #fff; font-weight: 700; font-size: 13px; padding: 5px 10px; border-radius: 8px; }
.plangrid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; text-align: left; }
@media (max-width: 640px) { .plangrid { grid-template-columns: 1fr; } }
.plancard { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.plantop { margin-bottom: 18px; }
.planname { font-size: 26px; font-weight: 800; }
.planprice { font-size: 18px; font-weight: 800; color: var(--text); }
.planprice span { font-size: 14px; font-weight: 600; color: var(--muted); }
.featurelist { list-style: none; margin: 0 0 22px; padding: 0; }
.featurelist li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 15px; }
.feat { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; flex: none; }
.feat-yes { background: #16a34a; }
.feat-maybe { background: #cbd5e1; }
.feat-no { background: #cbd5e1; }
.btn.trial { width: 100%; background: var(--join); color: #1c1c1c; font-weight: 800; padding: 14px; font-size: 15px; }
.btn.trial:hover { background: var(--join-dark); }
.btn.trial:disabled { opacity: .6; }

.submodal { text-align: left; }
.cardfield { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--card); }
.cardfield.demo { color: var(--muted); font-size: 13px; line-height: 1.5; background: var(--bg); }
.cardfield.checkout-ready { display: flex; align-items: flex-start; gap: 10px; color: #155e75; border-color: #9ed7e5; background: #f0fbff; line-height: 1.35; }
.cardfield.checkout-ready > span:first-child { font-size: 18px; line-height: 1.25; }
.cardfield.checkout-ready b { display: block; color: #0f4c5c; margin-bottom: 2px; }
.cardfield.checkout-ready small { display: block; color: #397080; font-size: 12px; }
.cardfield.checkout-ready.admin-bypass { color: #7c4a03; border-color: #f0cd7c; background: #fff8e6; }
.cardfield.checkout-ready.admin-bypass b { color: #744000; }
.cardfield.checkout-ready.admin-bypass small { color: #8c641c; }
.submodal .field input { width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font-size: 16px; }

/* ============ Activity profiles ============ */
.profile-link:hover { color: var(--blue); }
.activity-layout { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 42px; align-items: start; max-width: 960px; margin: 32px auto 60px; }
.activity-main { min-width: 0; }
.activity-title { font-size: 18px; margin: 4px 0 16px; }
.activity-heat-card { padding: 22px 16px 18px; overflow: hidden; }
.activity-heatmap { display: flex; gap: 10px; min-width: 0; }
.activity-heat-labels { display: grid; grid-template-rows: repeat(7, 11px); gap: 3px; padding-top: 22px; color: var(--muted); font-size: 12px; line-height: 11px; width: 31px; flex: none; }
.activity-heat-labels span { white-space: nowrap; }
.activity-heat-scroll { min-width: 0; overflow-x: auto; overflow-y: visible; padding-bottom: 2px; scrollbar-width: thin; flex: 1; }
.activity-heat-months { display: flex; gap: 3px; min-width: max-content; height: 19px; align-items: flex-start; color: var(--muted); font-size: 12px; line-height: 15px; }
.activity-heat-months span { width: 11px; flex: 0 0 11px; position: relative; white-space: nowrap; }
.activity-heat-grid { display: flex; gap: 3px; min-width: max-content; }
.activity-heat-week { display: grid; grid-template-rows: repeat(7, 11px); gap: 3px; }
.activity-heat-cell { width: 11px; height: 11px; border-radius: 2px; background: #e4e4e4; display: block; }
.activity-heat-cell.out { visibility: hidden; }
.activity-heat-cell.l1 { background: #cfeadd; }
.activity-heat-cell.l2 { background: #93d8ba; }
.activity-heat-cell.l3 { background: #45bb88; }
.activity-heat-cell.l4 { background: #099d63; }
.activity-heat-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 16px 8px 0 41px; color: var(--muted); font-size: 12px; }
.activity-heat-help { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 0; }
.activity-heat-help:hover { color: var(--blue); text-decoration: underline; }
.activity-legend { display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.activity-legend span { margin: 0 4px; }
.activity-legend i { width: 11px; height: 11px; border-radius: 2px; display: block; background: #e4e4e4; }
.activity-legend i.l1 { background: #cfeadd; }
.activity-legend i.l2 { background: #93d8ba; }
.activity-legend i.l3 { background: #45bb88; }
.activity-legend i.l4 { background: #099d63; }
.activity-section { margin-top: 32px; }
.activity-section > h2, .activity-contributions-head h2 { font-size: 17px; margin-bottom: 16px; }
.activity-memberships-card { padding: 20px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px 20px; }
.activity-membership { display: flex; gap: 10px; align-items: center; min-width: 0; }
.activity-membership:hover b { color: var(--blue); }
.activity-community-icon { width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--blue)); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: none; font-size: 18px; }
.activity-community-icon img { width: 100%; height: 100%; object-fit: cover; }
.activity-community-icon.tiny { width: 22px; height: 22px; border-radius: 50%; font-size: 11px; }
.brand-activity-icon { width: 30px; height: 30px; border-radius: 8px; }
.activity-membership > span:last-child { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.activity-membership b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-membership small { color: var(--muted); font-size: 12px; margin-top: 3px; }
.activity-contributions-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.activity-contributions-head h2 { margin: 0; }
.activity-filter-wrap { position: relative; flex: none; }
.activity-filter-button { border: 1px solid var(--border); background: var(--card); color: var(--muted); border-radius: 22px; padding: 10px 14px; font-size: 13px; min-width: 225px; text-align: left; }
.activity-filter-button span { float: right; margin-left: 12px; font-size: 16px; line-height: 11px; }
.activity-filter-button:hover { border-color: #cfcfcf; color: var(--text); }
.activity-filter-menu { display: none; position: absolute; right: 0; top: calc(100% + 7px); z-index: 30; width: 250px; max-height: 320px; overflow: auto; padding: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.activity-filter-wrap.open .activity-filter-menu { display: block; }
.activity-filter-menu a { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 7px; font-size: 13px; font-weight: 600; }
.activity-filter-menu a:hover, .activity-filter-menu a.selected { background: var(--bg); color: var(--blue); }
.activity-contribution { margin-bottom: 16px; padding: 16px 16px 14px; }
.activity-contribution-head { display: flex; align-items: center; gap: 9px; }
.activity-contribution-author { display: flex; min-width: 0; flex-direction: column; line-height: 1.25; }
.activity-contribution-author > a { font-size: 14px; font-weight: 800; }
.activity-contribution-author span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-contribution-author span a:hover { color: var(--blue); }
.activity-mini-level { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; margin-left: -17px; align-self: flex-end; transform: translateY(3px); border: 2px solid var(--card); border-radius: 50%; background: var(--blue); color: #fff; font-size: 10px; font-weight: 800; position: relative; z-index: 1; }
.activity-post-content { display: block; padding: 12px 2px 0; }
.activity-post-content.with-media { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 16px; align-items: start; }
.activity-post-content h3 { font-size: 18px; line-height: 1.25; }
.activity-post-dot { width: 11px; height: 11px; display: inline-block; border-radius: 50%; background: var(--blue); margin: 0 7px 1px 0; }
.activity-contribution-body { white-space: pre-wrap; line-height: 1.55; margin-top: 8px; font-size: 15px; }
.activity-contribution-media { width: 130px; height: 88px; padding: 0; border: 0; border-radius: 9px; overflow: hidden; background: var(--bg); }
.activity-contribution-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.activity-contribution-media:hover { outline: 2px solid var(--blue); }
.activity-post-actions { display: flex; align-items: center; gap: 16px; min-height: 30px; margin-top: 12px; color: var(--muted); }
.activity-post-actions button { border: 0; background: transparent; color: var(--muted); padding: 3px 0; font-size: 14px; font-weight: 600; }
.activity-post-actions button:hover { color: var(--text); }
.activity-post-actions .likebtn.liked { color: var(--brand-dark); }
.activity-community-link { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.activity-community-link:hover { color: var(--blue); }
.activity-comment-contribution { padding-bottom: 16px; }
.activity-comment-context { margin: 13px 0 0 40px; color: var(--muted); font-size: 13px; }
.activity-comment-context a { color: var(--text); font-weight: 700; }
.activity-comment-context a:hover, .activity-open-post:hover { color: var(--blue); }
.activity-comment-contribution .activity-contribution-body { margin-left: 40px; }
.activity-open-post { display: inline-block; margin: 10px 0 0 40px; color: var(--blue); font-size: 13px; font-weight: 700; }
.activity-empty-contributions { padding: 28px; color: var(--muted); text-align: center; }
.activity-pagination { display: flex; align-items: center; gap: 12px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.activity-page-nav { border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; padding: 8px 4px; }
.activity-page-nav:hover:not(:disabled) { color: var(--blue); }
.activity-page-nav:disabled { opacity: .38; cursor: default; }
.activity-page-current { width: 42px; height: 42px; border-radius: 50%; background: #fde6a7; color: #6a5200; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.activity-page-count { margin-left: auto; }
.activity-profile-card { padding: 28px 16px 20px; text-align: center; position: sticky; top: 78px; }
.activity-ring { width: 198px; height: 198px; margin: 5px auto 18px; padding: 7px; border-radius: 50%; background: conic-gradient(var(--blue) calc(var(--pct) * 1%), #e4e4e4 0); position: relative; }
.activity-ring-inner { width: 100%; height: 100%; padding: 6px; background: var(--card); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.activity-ring-inner .activity-avatar { width: 100%; height: 100%; font-size: 42px; }
.activity-level-badge { position: absolute; right: 3px; bottom: 3px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 4px solid var(--card); background: var(--blue); color: #fff; border-radius: 50%; font-size: 19px; font-weight: 800; }
.activity-level-name { color: var(--blue); font-weight: 800; font-size: 13px; }
.activity-level-next { color: var(--muted); font-size: 13px; margin: 7px 0 16px; }
.activity-level-next b { color: var(--blue); }
.activity-profile-card h2 { font-size: 24px; line-height: 1.2; }
.activity-handle { color: var(--muted); font-size: 14px; font-weight: 600; margin-top: 2px; }
.activity-bio { text-align: left; white-space: pre-wrap; line-height: 1.55; min-height: 28px; margin: 14px 0 16px; }
.activity-profile-meta { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 12px 0; text-align: left; display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.activity-profile-meta span { display: flex; align-items: center; gap: 8px; }
.activity-online-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #08a66a; flex: none; }
.activity-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 10px 0 14px; }
.activity-stats > div { min-width: 0; display: flex; flex-direction: column; border-left: 1px solid var(--border); }
.activity-stats > div:first-child { border-left: 0; }
.activity-stats b { font-size: 17px; }
.activity-stats span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.activity-side-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
.activity-side-action { width: 100%; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; letter-spacing: .1px; }
.follow-button { background: var(--join); color: #1c1c1c; }
.follow-button:hover { background: var(--join-dark); }
.follow-button.following { background: var(--card); border: 1px solid var(--border); color: var(--text); }

@media (max-width: 900px) {
  .activity-layout { grid-template-columns: 1fr; max-width: 760px; gap: 28px; }
  .activity-profile-card { position: static; max-width: 480px; width: 100%; margin: 0 auto; }
}
@media (max-width: 600px) {
  .activity-layout { margin-top: 20px; }
  .activity-heat-card { padding-left: 10px; padding-right: 10px; }
  .activity-heat-footer { margin-left: 4px; }
  .activity-section { margin-top: 25px; }
  .activity-memberships-card { grid-template-columns: 1fr; padding: 16px; gap: 14px; }
  .activity-contributions-head { align-items: flex-start; flex-direction: column; }
  .activity-filter-wrap, .activity-filter-button { width: 100%; }
  .activity-filter-menu { left: 0; right: auto; width: 100%; }
  .activity-post-content.with-media { grid-template-columns: 1fr; }
  .activity-contribution-media { width: 100%; height: 175px; }
  .activity-community-link { max-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .activity-pagination { gap: 9px; }
  .activity-page-count { display: none; }
}

/* ============ Site footer + editable pages ============ */
#sitefooter { border-top: 1px solid var(--border); margin-top: 60px; padding: 24px 16px 40px; }
.footer-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 14px; font-weight: 600; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.fsep { color: var(--muted); font-size: 13px; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.footer-brand .logo { font-size: 20px; }

.footer-copyright {
  max-width: 1080px;
  margin: 12px auto 0;
  padding: 0 8px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: .01em;
  opacity: .82;
}

.admin-visit-counter {
  width:max-content;
  max-width:calc(100% - 32px);
  min-height:30px;
  margin:9px auto 0;
  padding:5px 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  border:1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius:999px;
  background:color-mix(in srgb, var(--card) 86%, transparent);
  color:var(--muted);
  box-shadow:0 1px 3px rgba(15,23,42,.04);
  font-size:11.5px;
  font-weight:600;
  line-height:1;
  letter-spacing:.005em;
}
.admin-visit-counter[hidden] { display:none !important; }
.admin-visit-counter strong {
  color:var(--text);
  font-size:12px;
  font-weight:850;
}
.admin-visit-eye {
  width:15px;
  height:15px;
  flex:none;
  color:var(--blue);
}

/* ============ Programa de afiliados ============ */
.affiliate-page { max-width: 1080px; margin: 34px auto 70px; padding: 0 16px; }
.affiliate-hero { max-width: 780px; margin: 0 auto; text-align: center; }
.affiliate-hero h1 { color: var(--text); font-size: clamp(29px, 4vw, 43px); line-height: 1.14; letter-spacing: -.035em; font-weight: 900; }
.affiliate-hero p { margin: 18px auto 0; color: var(--text); font-size: clamp(15px, 1.7vw, 18px); line-height: 1.5; }
.affiliate-primary-cta { min-width: 234px; min-height: 49px; margin-top: 31px; padding: 13px 24px; border: 1px solid #f0c35e; border-radius: 6px; background: linear-gradient(180deg, #ffdc82 0%, #f8cb6a 100%); color: #182235; box-shadow: 0 3px 7px rgba(61, 49, 19, .22); font: 800 15px/1 var(--font); letter-spacing: -.01em; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.affiliate-primary-cta:hover { filter: saturate(1.05) brightness(.98); transform: translateY(-1px); box-shadow: 0 6px 13px rgba(61, 49, 19, .26); }
.affiliate-primary-cta:focus-visible, .affiliate-preview button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 46%, transparent); outline-offset: 3px; }
.affiliate-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin: 62px 0 0; padding: 0; list-style: none; }
.affiliate-step { min-width: 0; }
.affiliate-preview { height: 116px; display: flex; overflow: hidden; border: 1px solid #dedede; border-radius: 10px; background: #fff; box-shadow: 0 2px 6px rgba(15, 23, 42, .16); color: #151b24; }
.affiliate-link-preview { display: block; padding: 10px 11px; }
.affiliate-preview-label { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 12px; font-weight: 800; }
.affiliate-preview-label span { width: 15px; height: 15px; display: inline-grid; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; font-size: 10px; line-height: 1; transform: rotate(-45deg); }
.affiliate-link-row { display: flex; min-width: 0; height: 39px; overflow: hidden; border: 1px solid #e3e3e3; border-radius: 4px; }
.affiliate-link-row input { width: 100%; min-width: 0; border: 0; background: #fff; color: #354052; padding: 8px 10px; font-size: 12px; outline: none; }
.affiliate-link-row button, .affiliate-earn-preview button { flex: none; border: 0; background: #f9ce70; color: #172033; font: 800 12px/1 var(--font); }
.affiliate-link-row button { width: 72px; border-left: 1px solid #f1c25d; }
.affiliate-link-row button:hover, .affiliate-earn-preview button:hover { background: #f4c45c; }
.affiliate-account-preview { position: relative; align-items: center; justify-content: center; flex-direction: column; gap: 5px; padding: 12px 16px; overflow: hidden; text-align: center; background: linear-gradient(145deg, #fff 0%, #fffaf0 100%); border-color: #e8dfc8; }
.affiliate-account-preview::before { content: ""; position: absolute; width: 138px; height: 138px; top: -90px; left: -45px; border-radius: 50%; background: rgba(252, 212, 114, .2); }
.affiliate-account-preview::after { content: ""; position: absolute; width: 96px; height: 96px; right: -60px; bottom: -62px; border-radius: 50%; background: rgba(81, 137, 223, .09); }
.affiliate-account-preview > * { position: relative; z-index: 1; }
.affiliate-account-brand { display: flex; align-items: center; justify-content: center; min-height: 31px; line-height: 1; }
.affiliate-account-brand .logo { display: inline-flex; align-items: center; font-size: 31px; letter-spacing: -1.7px; line-height: 1; white-space: nowrap; }
.affiliate-account-copy { display: flex; min-width: 0; flex-direction: column; align-items: center; }
.affiliate-account-preview h3 { margin: 0; max-width: 100%; color: #111827; font-size: 16px; font-weight: 900; line-height: 1.18; text-wrap: balance; }
.affiliate-recommendation { display: inline-flex; align-items: center; justify-content: center; gap: 5px; margin: 5px 0 0; max-width: 100%; color: #556070; font-size: 12px; line-height: 1.2; white-space: nowrap; }
.affiliate-recommendation strong { color: #303b4c; font-weight: 800; }
.affiliate-mini-avatar { width: 18px; height: 18px; display: inline-grid; place-items: center; flex: none; border: 2px solid #fff4e8; border-radius: 50%; background: #e29b70; box-shadow: 0 1px 2px rgba(91, 52, 32, .18); color: #fff; font-size: 7px; line-height: 1; }
.affiliate-earn-preview { align-items: center; gap: 14px; padding: 17px 23px; }
.affiliate-balance { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.affiliate-balance span { color: #768092; font-size: 10px; }
.affiliate-balance b { color: #172033; font-size: 15px; }
.affiliate-earn-preview button { min-width: 78px; height: 35px; margin-left: auto; border-radius: 4px; cursor: default; }
.affiliate-step h2 { margin: 17px 0 8px; color: var(--text); font-size: 19px; line-height: 1.25; }
.affiliate-step h2 span { margin-right: 4px; }
.affiliate-step p { color: var(--text); font-size: 16px; line-height: 1.52; }
.affiliate-benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; max-width: 910px; margin: 76px auto 0; }
.affiliate-benefits article { display: flex; gap: 15px; align-items: flex-start; }
.affiliate-benefit-icon { width: 27px; height: 27px; display: inline-grid; place-items: center; flex: none; border-radius: 8px; background: #fff1bf; font-size: 18px; }
.affiliate-benefits h2 { margin: 0 0 8px; color: var(--text); font-size: 19px; line-height: 1.3; }
.affiliate-benefits p { color: var(--text); font-size: 16px; line-height: 1.52; }

/* Resumen de afiliación dentro de Ajustes → Afiliados. */
.affiliate-dashboard-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.affiliate-dashboard-stats > div { display: flex; min-height: 72px; flex-direction: column; justify-content: center; padding: 12px 15px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); }
.affiliate-dashboard-stats b { color: var(--text); font-size: 24px; line-height: 1; }
.affiliate-dashboard-stats span { margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.affiliate-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.affiliate-actions a { color: var(--blue); font-size: 13px; font-weight: 700; }
.affiliate-actions a:hover { text-decoration: underline; }
.affiliate-referrals { border-top: 1px solid var(--border); padding-top: 17px; }
.affiliate-referrals h3 { margin-bottom: 4px; font-size: 15px; }
.affiliate-referral-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.affiliate-referral-row:last-child { border-bottom: 0; }
.affiliate-referral-row > div { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.affiliate-referral-row b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.affiliate-referral-row span, .affiliate-referral-row time { color: var(--muted); font-size: 12px; }
.affiliate-referral-row time { white-space: nowrap; }

@media (max-width: 800px) {
  .affiliate-page { margin-top: 26px; }
  .affiliate-steps { grid-template-columns: 1fr; gap: 33px; max-width: 500px; margin-right: auto; margin-left: auto; }
  .affiliate-benefits { grid-template-columns: 1fr; gap: 28px; max-width: 500px; margin-top: 52px; }
}
@media (max-width: 520px) {
  .affiliate-page { padding: 0 10px; }
  .affiliate-hero p br { display: none; }
  .affiliate-primary-cta { width: 100%; }
  .affiliate-preview { height: 108px; }
  .affiliate-earn-preview { padding: 16px 14px; gap: 10px; }
  .affiliate-earn-preview button { min-width: 67px; }
  .affiliate-step h2, .affiliate-benefits h2 { font-size: 18px; }
  .affiliate-step p, .affiliate-benefits p { font-size: 15px; }
  .affiliate-dashboard-stats { grid-template-columns: 1fr; }
}

.pagedoc { max-width: 760px; margin: 30px auto 40px; }
.pagedoc h1 { font-size: 30px; font-weight: 800; }
.pagebody { margin-top: 18px; line-height: 1.7; font-size: 16px; }
.pagemeta { margin-top: 28px; font-size: 13px; }
.rich-page-content > :first-child { margin-top: 0; }
.rich-page-content > :last-child { margin-bottom: 0; }
.rich-page-content p { margin: 0 0 16px; }
.rich-page-content h2 { font-size: 22px; margin: 30px 0 12px; }
.rich-page-content h3 { font-size: 18px; margin: 24px 0 10px; }
.rich-page-content ul, .rich-page-content ol { margin: 0 0 16px 22px; padding-left: 18px; }
.rich-page-content li + li { margin-top: 5px; }
.rich-page-content blockquote { margin: 18px 0; padding: 10px 16px; border-left: 4px solid var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--card)); color: var(--muted); }
.rich-page-content hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.rich-page-content a { color: var(--blue); text-decoration: underline; font-weight: 600; overflow-wrap: anywhere; }
.rich-page-content img { display: block; max-width: 100%; height: auto; margin: 20px 0; border-radius: 10px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.pagebody-empty { color: var(--muted); }

/* Editor ligero de páginas: formato, enlaces e imágenes sin escribir HTML. */
.rich-editor { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--card); box-shadow: 0 1px 2px rgba(15,23,42,.03); }
.rich-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-height: 48px; padding: 7px 8px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 65%, var(--card)); }
.rich-tool { min-width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 7px; padding: 0 7px; background: transparent; color: var(--text); font: 700 14px/1 var(--font); cursor: pointer; transition: .15s ease; }
.rich-tool:hover, .rich-tool:focus-visible { border-color: var(--border); background: var(--card); color: var(--blue); outline: none; }
.rich-tool:active { transform: translateY(1px); }
.rich-tool-italic { font-family: Georgia, serif; font-size: 18px; font-style: italic; }
.rich-tool-underline { text-decoration: underline; }
.rich-tool-label { font-size: 11px; letter-spacing: -.03em; }
.rich-tool-clear { font-size: 12px; color: var(--muted); }
.rich-tool-image { position: relative; cursor: pointer; font-size: 16px; }
.rich-tool-divider { width: 1px; height: 22px; margin: 0 2px; background: var(--border); }
.rich-editor-canvas { position: relative; }
.rich-editor-content { min-height: 240px; padding: 15px 16px 18px; outline: none; line-height: 1.65; color: var(--text); cursor: text; }
.rich-editor-content:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--blue) 21%, transparent); }
.rich-editor-content:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.rich-editor-content p { margin: 0 0 13px; }
.rich-editor-content h2 { font-size: 21px; margin: 20px 0 10px; }
.rich-editor-content ul { margin: 0 0 13px 24px; padding-left: 16px; }
.rich-editor-content a { color: var(--blue); text-decoration: underline; font-weight: 600; }
.rich-editor-content img { display: block; max-width: min(100%, 680px); height: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); }
.rich-link-panel { display: flex; align-items: end; gap: 7px; padding: 10px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--blue) 5%, var(--card)); }
.rich-link-panel[hidden] { display: none; }
.rich-link-panel label { display: none; }
.rich-link-panel input { flex: 1; min-width: 130px; height: 34px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--card); color: var(--text); font: 14px var(--font); outline: none; }
.rich-link-panel input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 13%, transparent); }
.rich-link-cancel { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 7px; background: var(--card); color: var(--muted); font-size: 20px; line-height: 1; }
.rich-link-cancel:hover { color: var(--text); background: var(--bg); }
.rich-editor-footer { min-height: 34px; display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--border); color: var(--muted); background: color-mix(in srgb, var(--bg) 45%, var(--card)); font-size: 12px; }
.rich-editor-footer [data-rich-status] { font-weight: 600; text-align: right; }
.rich-editor-footer [data-rich-status].error { color: #dc2626; }
.page-editor-intro { margin: -6px 0 18px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.modal.page-editor-dialog { max-width: 860px; }
.page-editor-dialog .rich-editor-content { min-height: 270px; }

@media (max-width: 560px) {
  .rich-toolbar { gap: 3px; padding: 6px; }
  .rich-tool { min-width: 30px; padding: 0 6px; }
  .rich-tool-divider { margin: 0; }
  .rich-editor-content { min-height: 220px; padding: 13px; }
  .rich-editor-footer { display: block; line-height: 1.45; }
  .rich-editor-footer [data-rich-status] { display: block; text-align: left; margin-top: 2px; }
}

/* ============ Support ============ */
.support-page { max-width: 760px; margin: 32px auto 72px; }
.support-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 34px 32px; box-shadow: 0 1px 2px rgba(15,23,42,.03); }
.support-kicker { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.support-card h1 { font-size: 25px; margin: 0 0 36px; }
.support-card h2 { font-size: 16px; margin: 0 0 22px; }
.support-login-card h1 { margin-bottom: 12px; }
.support-login-card p, .support-copy { color: var(--muted); line-height: 1.55; margin: 0; }
.support-intro { font-size: 16px; font-weight: 700; margin: 0 0 20px; }
.support-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.support-chip { border: 1px solid var(--border); background: var(--card); color: var(--muted); padding: 10px 16px; border-radius: 999px; font: inherit; font-size: 14px; cursor: pointer; transition: .15s ease; }
.support-chip:hover { border-color: #9ca3af; color: var(--text); }
.support-chip.active { background: #909397; border-color: #909397; color: #fff; }
.support-divider { height: 1px; background: var(--border); margin: 31px 0 28px; }
.support-admins { display: grid; gap: 4px; }
.support-admin { display: flex; align-items: center; gap: 15px; padding: 10px 0; }
.support-avatar { width: 48px; height: 48px; font-size: 14px; }
.support-admin-info { flex: 1; min-width: 0; }
.support-admin-info b { font-size: 16px; }
.support-role { color: var(--blue); font-weight: 700; font-size: 13px; margin-left: 8px; }
.support-presence { margin-top: 5px; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.support-presence i { width: 14px; height: 14px; border-radius: 50%; background: #b6bcc5; display: inline-block; }
.support-presence.online { color: var(--text); }
.support-presence.online i { background: #08a85f; }
.support-chat, .support-mail-btn { background: #f8cf70; color: #111827; border: 1px solid #f3c45c; border-radius: 5px; padding: 11px 16px; font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.support-chat:hover, .support-mail-btn:hover { background: #f5c75d; color: #111827; }
.support-chat span { font-size: 18px; margin-left: 5px; vertical-align: -1px; }
.support-email { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 18px; display: flex; gap: 7px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.support-email a { color: var(--blue); font-weight: 700; }
.support-other-contact { display: grid; justify-items: start; }
.support-other-contact .support-copy { max-width: 590px; }
.support-mail-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%; margin-top: 20px; line-height: 1.3; text-align: left; white-space: normal; }
.support-mail-icon { flex: 0 0 auto; font-size: 16px; line-height: 1; }
.support-mail-btn span:last-child { overflow-wrap: anywhere; }
.support-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
@media (max-width: 600px) { .support-page { margin: 18px auto 44px; } .support-card { border-radius: 10px; padding: 25px 18px; } .support-card h1 { margin-bottom: 28px; } .support-admin { align-items: flex-start; } .support-chat { padding: 10px 12px; } .support-role { display: block; margin: 3px 0 0; } .support-mail-btn { width: 100%; text-align: center; } }

/* ============ Admin panel ============ */
.adminlogin { max-width: 420px; margin: 60px auto; }
.adminerr { background: #fee2e2; color: #b91c1c; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.adminwrap { max-width: 1000px; margin: 24px auto; }
.adminhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.adminhead h1 { font-size: 26px; }
.adminrow { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.adminrow:last-child { border-bottom: none; }
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 560px) { .statgrid { grid-template-columns: repeat(2, 1fr); } }
.statbox { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.statbox b { font-size: 26px; font-weight: 700; }
.statbox span { color: var(--muted); font-size: 13px; }
.setcontent { position: relative; }
.setcontent.admin-is-loading { cursor: wait; }
.setcontent.admin-is-loading::after { content: "Actualizando…"; position: absolute; top: 12px; right: 14px; z-index: 2; padding: 5px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--muted); box-shadow: 0 2px 7px rgba(15,23,42,.08); font-size: 12px; font-weight: 700; }
.admin-load-error { padding: 8px 0; }
.admin-load-error h2 { color: #b42318; }
.admin-load-error p { margin: 10px 0 18px; color: var(--muted); line-height: 1.5; }
.setcontent input[type=color] { height: 42px; padding: 4px; cursor: pointer; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.switch input { display: none; }
.slider { position: absolute; inset: 0; background: var(--border); border-radius: 24px; transition: .2s; cursor: pointer; }
.slider:before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider:before { transform: translateX(20px); }

/* ---------- Paginación del muro de comunidad (30 posts por página) ---------- */
#postPagination { margin: 26px 0 10px; }
.feed-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 4px 2px;
}
.feed-page-numbers {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}
.feed-page-nav,
.feed-page-number {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.feed-page-nav {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 8px;
}
.feed-page-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}
.feed-page-nav:hover:not(:disabled),
.feed-page-number:hover:not(.active) {
  color: var(--text);
  background: color-mix(in srgb, var(--brand) 7%, var(--card));
  border-color: var(--border);
}
.feed-page-number.active {
  color: #241800;
  background: linear-gradient(135deg, #ffd979, #f4b63f);
  border-color: rgba(176, 116, 0, .18);
  box-shadow: 0 8px 20px rgba(219, 155, 28, .16);
  cursor: default;
}
.feed-page-nav:disabled {
  opacity: .36;
  cursor: default;
}
.feed-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 2px;
}
.feed-page-count {
  margin-left: auto;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
@media (max-width: 760px) {
  #postPagination { margin-top: 20px; }
  .feed-pagination {
    flex-wrap: wrap;
    gap: 6px;
  }
  .feed-page-numbers {
    justify-content: center;
    gap: 3px;
  }
  .feed-page-number {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
  .feed-page-ellipsis { width: 20px; }
  .feed-page-nav {
    min-height: 38px;
    padding: 0 4px;
    font-size: 13px;
  }
  .feed-page-next { margin-left: 2px; }
  .feed-page-count {
    width: 100%;
    margin-left: 0;
    padding-top: 3px;
    text-align: center;
    font-size: 12px;
  }
}
@media (max-width: 480px) {
  .feed-page-nav span:not([aria-hidden="true"]) { display: none; }
  .feed-page-nav { font-size: 22px; padding: 0 8px; }
  .feed-page-number { width: 34px; height: 34px; }
}

/* ===== Administración de categorías de comunidades ===== */
.cat-pill-category-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  font-size: 16px;
  line-height: 1;
}
.cat-pill-category-icon.is-image {
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg);
}
.cat-pill-category-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-category-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.admin-category-heading h2 { margin-bottom: 5px; }
.admin-category-heading p { max-width: 680px; line-height: 1.55; }
.admin-category-list {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
}
.admin-category-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.admin-category-row:last-child { border-bottom: 0; }
.admin-category-row:hover { background: color-mix(in srgb, var(--brand) 3%, var(--card)); }
.admin-category-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  font-size: 25px;
  line-height: 1;
  background: color-mix(in srgb, var(--brand) 8%, var(--bg));
  border: 1px solid var(--border);
  overflow: hidden;
}
.admin-category-icon.is-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-category-copy { flex: 1; min-width: 0; }
.admin-category-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 800;
}
.admin-category-protected {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #6d4b00;
  background: #fff2c7;
  border: 1px solid #f0d988;
}
.admin-category-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}
.admin-category-actions button:disabled { opacity: .42; cursor: not-allowed; }
.admin-category-modal { min-width: min(600px, 90vw); }
.admin-category-icon-editor {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 6px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--brand) 3%, var(--card));
}
.admin-category-icon-preview {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 48px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.admin-category-icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-category-icon-controls .field { margin: 0 0 9px; }
.admin-category-upload-button { width: fit-content; cursor: pointer; }
.admin-category-upload-button.is-uploading { opacity: .55; pointer-events: none; }
.admin-category-quick-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.admin-category-quick-icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  font-size: 20px;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.admin-category-quick-icon:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--brand) 8%, var(--card));
  border-color: color-mix(in srgb, var(--brand) 28%, var(--border));
}
@media (max-width: 700px) {
  .admin-category-heading { flex-direction: column; }
  .admin-category-heading .btn { width: 100%; }
  .admin-category-row { align-items: flex-start; flex-wrap: wrap; }
  .admin-category-copy { min-width: 160px; }
  .admin-category-actions { width: 100%; padding-left: 62px; }
  .admin-category-actions .btn { flex: 1; }
  .admin-category-icon-editor { grid-template-columns: 1fr; }
  .admin-category-icon-preview { margin: 0 auto; }
}


/* ============ Publicaciones: diseño minimalista + menú de acciones ============ */
.post.post-clean { padding: 18px 18px 14px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 13px; box-shadow: 0 1px 2px rgba(0,0,0,.025); }
.post.post-clean:hover { border-color: color-mix(in srgb, var(--border) 70%, var(--text) 30%); }
.post.post-clean.pinned { border: 1px solid color-mix(in srgb, var(--join) 70%, var(--border)); box-shadow: inset 3px 0 0 var(--join), 0 1px 2px rgba(0,0,0,.025); }
.post-clean .phead { align-items: flex-start; }
.post-clean .post-author-copy { flex: 1; min-width: 0; }
.post-clean .pname { font-size: 14px; font-weight: 750; }
.post-clean .ptime { margin-top: 1px; font-size: 12px; }
.post-clean .post-pin-meta { color: var(--muted); font-weight: 650; }
.post-clean .pmain { gap: 16px; margin-top: 10px; }
.post-clean .ptitle { margin: 0 0 5px; font-size: 17px; line-height: 1.28; }
.post-clean .post-reader-preview .text { color: color-mix(in srgb, var(--text) 78%, var(--muted)); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-clean .post-read-more { margin-top: 2px; font-size: 12px; }
.post-clean .pthumb { width: 112px; height: 82px; border-radius: 9px; }
.post-clean .pfoot { min-height: 30px; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--border) 75%, transparent); }
.post-clean .pfoot button { min-height: 28px; padding: 3px 6px; border-radius: 7px; font-size: 13px; }
.post-clean .pfoot button:hover { background: var(--bg); }
.post-clean .lastcomment { font-size: 12px; }
.post-comments-off, .post-reader-comments-disabled { color: var(--muted); font-size: 11px; font-weight: 700; }

.post-action-wrap { position: relative; flex: none; }
.post-menu-trigger { width: 34px; height: 34px; display: grid; place-items: center; padding: 0 0 7px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font: 800 19px/1 var(--font); letter-spacing: 1px; cursor: pointer; }
.post-menu-trigger:hover, .post-menu-trigger[aria-expanded="true"] { background: var(--bg); color: var(--text); }
.post-action-menu { position: absolute; z-index: 90; top: calc(100% + 6px); right: 0; width: 224px; padding: 7px; border: 1px solid var(--border); border-radius: 11px; background: var(--card); box-shadow: 0 14px 36px rgba(0,0,0,.16); }
.post-action-menu[hidden] { display: none !important; }
.post-menu-item { display: flex; width: 100%; min-height: 38px; align-items: center; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: 650 13px/1.25 var(--font); text-align: left; cursor: pointer; }
.post-menu-item:hover { background: var(--bg); }
.post-menu-item.danger { color: #d63636; }
.post-menu-item.danger:hover { background: color-mix(in srgb, #d63636 8%, var(--card)); }

/* Lector de post: más limpio, compacto y ordenado */
.post-reader-modal { width: min(790px, calc(100vw - 32px)); max-width: 790px; max-height: min(88dvh, 820px); border-radius: 14px; }
.post-reader { min-height: 360px; max-height: min(88dvh, 820px); }
.post-reader-header-clean { padding: 14px 18px 10px; border-bottom: 0; box-shadow: none; }
.post-reader-header-clean .post-reader-profile { font-size: 14px; }
.post-reader-header-clean .post-reader-meta { font-size: 12px; }
.post-reader-header-actions { gap: 5px; }
.post-reader-header-actions .reader-menu .post-action-menu { top: 38px; }
.post-reader-close { width: 34px; height: 34px; font-size: 17px; border-color: transparent; }
.post-reader-close:hover { color: var(--text); border-color: var(--border); background: var(--bg); transform: none; }
.post-reader-scroll-clean { padding: 8px 28px 22px; }
.post-reader-title { margin: 0 0 9px; font-size: clamp(20px, 2.5vw, 25px); line-height: 1.22; letter-spacing: -.015em; }
.post-reader-body { font-size: 15px; line-height: 1.55; }
.post-reader-more { margin-top: 3px; font-size: 13px; }
.post-reader-media { gap: 12px; margin-top: 15px; }
.post-reader-video, .post-reader-image { border-radius: 10px; }
.post-reader-actions-clean { gap: 14px; margin-top: 14px; padding: 10px 0; border-top: 0; border-bottom: 1px solid var(--border); }
.post-reader-like { padding: 6px 9px; border-radius: 8px; font-size: 13px; }
.post-reader-comment-total { font-size: 13px; }
.post-reader-comments { margin-top: 12px; }
.post-reader-comment-list { gap: 9px; }
.post-reader-composer { position: sticky; bottom: -22px; z-index: 3; margin: 14px -28px -22px; padding: 12px 28px 14px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(8px); }
.post-reader-disabled-note { margin-top: 12px; padding: 10px 12px; border-radius: 9px; background: var(--bg); text-align: center; }

.post-mini-modal { width: min(470px, calc(100vw - 30px)); padding: 0; overflow: hidden; border-radius: 13px; }
.post-mini-dialog { padding: 20px; }
.post-mini-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.post-mini-dialog-head h2 { margin: 2px 0 0; font-size: 21px; }
.post-mini-dialog-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.post-dialog-kicker { color: var(--blue); font-size: 10px; font-weight: 850; letter-spacing: .13em; }
.post-mini-dialog form { display: grid; gap: 14px; }
.post-mini-dialog .field { margin: 0; }
.post-mini-dialog select, .post-mini-dialog textarea { width: 100%; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font: 14px var(--font); }
.post-mini-dialog select { min-height: 42px; padding: 8px 10px; }
.post-mini-dialog textarea { min-height: 120px; padding: 10px; resize: vertical; line-height: 1.5; }
.post-mini-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 2px; }

@media (max-width: 560px) {
  .post.post-clean { padding: 15px 14px 12px; border-radius: 10px; }
  .post-clean .pmain { flex-direction: column-reverse; gap: 10px; }
  .post-clean .pthumb { width: 100%; height: 190px; }
  .post-action-menu { position: fixed; left: 12px; right: 12px; bottom: 12px; top: auto; width: auto; border-radius: 14px; z-index: 320; }
  .post-reader-modal { width: 100%; max-width: none; max-height: 100dvh; border-radius: 0; }
  .post-reader { min-height: 100dvh; max-height: 100dvh; }
  .post-reader-scroll-clean { padding: 7px 16px 18px; }
  .post-reader-composer { bottom: -18px; margin: 12px -16px -18px; padding: 10px 16px 12px; }
}

/* Mis comunidades: usa la misma portada real que Descubrir */
.ccard .cover.my-community-cover { background-size: cover; background-position: center; background-repeat: no-repeat; overflow: hidden; }
.ccard .cover.my-community-cover.no-cover { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 78%, #fff), var(--blue)); }
.ccard .cover.my-community-cover.no-cover img { width: 100%; height: 100%; object-fit: cover; }
.ccard .cover .my-community-fallback { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 16px; background: rgba(255,255,255,.16); color: #fff; font-size: 30px; font-weight: 900; }


/* Membresías caducadas: bloqueo claro sin romper el diseño de la comunidad. */
.membership-expired-overlay{background:rgba(15,23,42,.58);backdrop-filter:blur(5px)}
.membership-expired-modal{width:min(520px,calc(100vw - 32px));padding:0!important;border-radius:22px!important;overflow:hidden;box-shadow:0 26px 70px rgba(15,23,42,.28)}
.membership-expired-card{padding:34px 34px 30px;text-align:center;background:linear-gradient(180deg,#fff 0%,#fbfcff 100%)}
.membership-expired-icon{width:68px;height:68px;margin:0 auto 14px;border-radius:22px;display:grid;place-items:center;font-size:30px;background:linear-gradient(135deg,#fff4dd,#ffe5b4);box-shadow:inset 0 0 0 1px rgba(217,119,6,.16)}
.membership-expired-icon.small{width:48px;height:48px;margin:0;flex:0 0 auto;border-radius:15px;font-size:21px}
.membership-expired-kicker{display:inline-block;font-size:11px;font-weight:900;letter-spacing:.13em;color:#b45309;margin-bottom:8px}
.membership-expired-card h2{font-size:25px;line-height:1.2;margin:0 0 12px;color:var(--text,#16181d)}
.membership-expired-card p{font-size:15px;line-height:1.65;color:var(--muted,#616a79);margin:0}
.membership-expired-note{display:flex;gap:10px;text-align:left;align-items:flex-start;margin:22px 0;padding:14px 15px;border-radius:14px;background:#f7f8fb;color:#505867;font-size:13px;line-height:1.45}
.membership-expired-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}
.membership-renew-primary{background:linear-gradient(135deg,#1769ff,#5147ff)!important;border-color:transparent!important;color:#fff!important;box-shadow:0 8px 20px rgba(23,105,255,.22)}
.membership-expired-lock{margin:18px 0;padding:24px;display:flex;align-items:center;gap:16px;border:1px solid rgba(180,83,9,.16);background:linear-gradient(135deg,rgba(255,248,235,.96),rgba(255,255,255,.98));box-shadow:0 10px 30px rgba(30,41,59,.06)}
.membership-expired-lock>div:nth-child(2){flex:1;min-width:0}
.membership-expired-lock h2{font-size:20px;margin:2px 0 5px}
.membership-expired-lock p{margin:0;color:var(--muted,#697386);line-height:1.5}
@media(max-width:640px){.membership-expired-card{padding:28px 22px 24px}.membership-expired-actions{flex-direction:column-reverse}.membership-expired-actions .btn{width:100%}.membership-expired-lock{align-items:flex-start;flex-wrap:wrap}.membership-expired-lock .btn{width:100%}}


/* ============ Contacto profesional ============ */
.contact-overlay { padding:22px; background:rgba(11,17,31,.58); backdrop-filter:blur(5px); }
.modal.contact-modal { position:relative; display:grid; grid-template-columns:minmax(245px, .82fr) minmax(0, 1.75fr); width:min(940px,100%); max-width:940px; max-height:min(92vh,820px); padding:0; overflow:auto; border:1px solid color-mix(in srgb,var(--border) 80%,#fff); border-radius:22px; box-shadow:0 30px 80px rgba(9,15,29,.34),0 8px 24px rgba(9,15,29,.18); }
.contact-modal-close { position:absolute; top:15px; right:15px; z-index:5; width:36px; height:36px; border:1px solid color-mix(in srgb,var(--border) 78%,transparent); border-radius:50%; background:color-mix(in srgb,var(--card) 90%,transparent); color:var(--muted); font-size:24px; line-height:1; box-shadow:0 4px 14px rgba(15,23,42,.10); }
.contact-modal-close:hover { color:var(--text); background:var(--card); transform:translateY(-1px); }
.contact-brand-panel { position:relative; isolation:isolate; overflow:hidden; display:flex; flex-direction:column; min-height:100%; padding:34px 30px 30px; background:linear-gradient(145deg,color-mix(in srgb,#3a4aa0 88%,#111827),color-mix(in srgb,var(--blue) 88%,#2440a3)); color:#fff; }
.contact-brand-panel::before,.contact-brand-panel::after { content:""; position:absolute; z-index:-1; border-radius:50%; background:rgba(255,255,255,.09); }
.contact-brand-panel::before { width:240px; height:240px; right:-125px; top:-75px; }
.contact-brand-panel::after { width:170px; height:170px; left:-90px; bottom:-70px; background:rgba(245,195,59,.17); }
.contact-brand-wordmark { margin-bottom:44px; }
.contact-brand-wordmark .logo { font-size:28px; filter:drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.contact-brand-icon { display:grid; width:58px; height:58px; place-items:center; margin-bottom:20px; border:1px solid rgba(255,255,255,.2); border-radius:18px; background:rgba(255,255,255,.11); box-shadow:inset 0 1px rgba(255,255,255,.12),0 14px 28px rgba(9,22,69,.20); }
.contact-brand-icon svg { width:30px; height:30px; }
.contact-brand-kicker { margin-bottom:8px; color:#f8d87f; font-size:11px; font-weight:900; letter-spacing:.14em; }
.contact-brand-panel h2 { margin:0 0 12px; font-size:29px; line-height:1.08; letter-spacing:-.035em; }
.contact-brand-panel p { margin:0; color:rgba(255,255,255,.82); font-size:14px; line-height:1.65; }
.contact-brand-points { display:grid; gap:10px; margin-top:auto; padding-top:34px; }
.contact-brand-points span { display:flex; align-items:center; gap:9px; color:rgba(255,255,255,.9); font-size:12.5px; font-weight:600; }
.contact-brand-points i { display:grid; width:21px; height:21px; place-items:center; flex:none; border-radius:7px; background:rgba(255,255,255,.13); color:#ffe39a; font-style:normal; font-weight:900; }
.contact-form-panel { padding:34px 36px 28px; background:var(--card); }
.contact-form-heading { padding-right:42px; margin-bottom:23px; }
.contact-form-kicker { color:var(--blue); font-size:10px; font-weight:900; letter-spacing:.16em; }
.contact-form-heading h2 { margin:5px 0 5px; font-size:25px; letter-spacing:-.035em; }
.contact-form-heading p { margin:0; color:var(--muted); font-size:12.5px; }
.contact-form-heading p b,.contact-field span>b { color:#d84b3f; }
.contact-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px 16px; }
.contact-span-2 { grid-column:1/-1; }
.contact-field { display:grid; gap:6px; min-width:0; }
.contact-field>span { color:var(--text); font-size:12.5px; font-weight:700; }
.contact-field>span em { margin-left:5px; color:var(--muted); font-size:10.5px; font-style:normal; font-weight:500; }
.contact-field input,.contact-field textarea { box-sizing:border-box; width:100%; border:1px solid color-mix(in srgb,var(--border) 92%,#cbd5e1); border-radius:10px; background:color-mix(in srgb,var(--card) 96%,var(--bg)); color:var(--text); transition:border-color .15s ease,box-shadow .15s ease,background .15s ease; }
.contact-field input { min-height:43px; padding:9px 11px; }
.contact-field textarea { min-height:118px; padding:11px 12px; resize:vertical; line-height:1.55; }
.contact-field input::placeholder,.contact-field textarea::placeholder { color:color-mix(in srgb,var(--muted) 74%,transparent); }
.contact-field input:focus,.contact-field textarea:focus { outline:none; border-color:color-mix(in srgb,var(--blue) 76%,var(--border)); background:var(--card); box-shadow:0 0 0 3px color-mix(in srgb,var(--blue) 12%,transparent); }
.contact-captcha-card { overflow:hidden; padding:13px 14px 12px; border:1px solid color-mix(in srgb,var(--blue) 20%,var(--border)); border-radius:13px; background:linear-gradient(135deg,color-mix(in srgb,var(--blue) 6%,var(--card)),var(--card)); }
.contact-captcha-head,.contact-captcha-head>div,.contact-captcha-body { display:flex; align-items:center; }
.contact-captcha-head { justify-content:space-between; gap:12px; margin-bottom:10px; }
.contact-captcha-head>div { gap:9px; min-width:0; }
.contact-captcha-head strong,.contact-captcha-head small { display:block; }
.contact-captcha-head strong { font-size:12px; }
.contact-captcha-head small { margin-top:2px; color:var(--muted); font-size:10.5px; }
.contact-captcha-shield { display:grid; width:29px; height:29px; place-items:center; border-radius:9px; background:color-mix(in srgb,var(--blue) 12%,var(--card)); color:var(--blue); font-weight:900; }
#contactCaptchaRefresh { display:grid; width:31px; height:31px; place-items:center; padding:0; border:1px solid var(--border); border-radius:9px; background:var(--card); color:var(--muted); font-size:18px; }
#contactCaptchaRefresh:hover { color:var(--blue); transform:rotate(-20deg); }
.contact-captcha-body { gap:13px; }
.contact-captcha-image { width:190px; max-width:43%; overflow:hidden; border-radius:9px; background:#f7f8fa; box-shadow:0 4px 12px rgba(15,23,42,.08); }
.contact-captcha-image img { display:block; width:100%; height:58px; object-fit:cover; }
.contact-captcha-body label { display:grid; flex:1; gap:5px; color:var(--text); font-size:11px; font-weight:700; }
#contactCaptchaAnswer { min-width:0; width:100%; box-sizing:border-box; padding:9px 10px; border:1px solid var(--border); border-radius:9px; background:var(--card); color:var(--text); font-weight:800; letter-spacing:.18em; text-transform:uppercase; }
#contactCaptchaAnswer:focus { outline:none; border-color:var(--blue); box-shadow:0 0 0 3px color-mix(in srgb,var(--blue) 12%,transparent); }
.contact-captcha-card>p { margin:8px 0 0; color:var(--muted); font-size:10.5px; }
.contact-captcha-card.is-loading .contact-captcha-image { background:linear-gradient(100deg,#edf1fa 25%,#f8fafc 40%,#edf1fa 55%); background-size:220% 100%; animation:captcha-shimmer 1.1s infinite linear; }
.contact-captcha-card.is-loading img { visibility:hidden; }
.contact-captcha-card.is-error { border-color:color-mix(in srgb,#dc2626 42%,var(--border)); }
.contact-honeypot { position:absolute!important; left:-9999px!important; width:1px!important; height:1px!important; overflow:hidden!important; }
.contact-form-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:18px; }
.contact-form-footer p { max-width:310px; margin:0; color:var(--muted); font-size:10.5px; line-height:1.45; }
.contact-send-button { display:inline-flex; min-width:164px; min-height:43px; align-items:center; justify-content:center; gap:8px; padding:10px 17px; border:0; border-radius:10px; background:linear-gradient(135deg,var(--brand),color-mix(in srgb,var(--brand) 72%,var(--blue))); color:#fff; box-shadow:0 8px 18px color-mix(in srgb,var(--brand) 24%,transparent); font:800 13px/1 var(--font); transition:transform .15s ease,box-shadow .15s ease,filter .15s ease; }
.contact-send-button svg { width:18px; height:18px; }
.contact-send-button:hover:not(:disabled) { transform:translateY(-1px); filter:brightness(1.03); box-shadow:0 11px 22px color-mix(in srgb,var(--brand) 30%,transparent); }
.contact-send-button:disabled { opacity:.65; cursor:wait; }
.contact-form-status { min-height:18px; margin-top:9px; color:var(--muted); font-size:11.5px; text-align:right; }
.contact-form-status.is-error { color:#c8372d; }
.contact-success { display:flex; min-height:540px; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:28px 24px; }
.contact-success-icon { display:grid; width:70px; height:70px; place-items:center; margin-bottom:19px; border-radius:22px; background:linear-gradient(135deg,#16a34a,#22c55e); color:#fff; box-shadow:0 14px 28px rgba(22,163,74,.22); font-size:34px; font-weight:900; }
.contact-success>span { color:#16a34a; font-size:10px; font-weight:900; letter-spacing:.15em; }
.contact-success h2 { margin:8px 0 9px; font-size:27px; letter-spacing:-.04em; }
.contact-success p { max-width:440px; margin:0; color:var(--muted); font-size:14px; line-height:1.6; }
.contact-success-close { margin-top:22px; min-width:120px; padding:10px 18px; border:0; border-radius:9px; background:var(--brand); color:#fff; font-weight:800; }
@media (max-width:860px) { .topnav-contact-label { display:none; } .topnav-contact { padding-inline:8px; } .modal.contact-modal { grid-template-columns:220px minmax(0,1fr); } .contact-brand-panel { padding:28px 22px; } .contact-form-panel { padding:30px 26px 24px; } }
@media (max-width:700px) { .contact-overlay { padding:0; align-items:stretch; } .modal.contact-modal { grid-template-columns:1fr; max-height:100dvh; border-radius:0; } .contact-brand-panel { min-height:auto; padding:24px 22px 22px; } .contact-brand-wordmark { margin-bottom:24px; } .contact-brand-icon { width:46px; height:46px; margin-bottom:13px; border-radius:14px; } .contact-brand-icon svg { width:25px; height:25px; } .contact-brand-panel h2 { font-size:25px; } .contact-brand-points { display:none; } .contact-form-panel { padding:25px 20px 24px; } }
@media (max-width:480px) { .contact-form-grid { grid-template-columns:1fr; gap:13px; } .contact-span-2 { grid-column:auto; } .contact-captcha-body { align-items:stretch; flex-direction:column; } .contact-captcha-image { width:100%; max-width:none; } .contact-captcha-image img { height:70px; } .contact-form-footer { align-items:stretch; flex-direction:column; } .contact-send-button { width:100%; } .contact-form-status { text-align:left; } }


/* Contacto: mejora de contraste del logotipo sobre fondo azul */
/* La variante gráfica de Contacto ya incorpora la K amarilla. */


/* ============================================================
   Identidad corporativa KOMUL · logo gráfico nº 1
   ============================================================ */
.logo.brand-logo-img {
  display:block;
  width:auto;
  height:26px;
  max-width:104px;
  object-fit:contain;
  flex:none;
  line-height:1;
}
#brand .brand-logo-img { height:26px; max-width:104px; }
.contact-brand-wordmark .brand-logo-img { height:30px; max-width:140px; filter:drop-shadow(0 2px 4px rgba(0,0,0,.10)); }
.footer-brand .brand-logo-img { height:18px; max-width:72px; }
.poweredby .brand-logo-img { height:18px; max-width:72px; }
.create-intro-brand .brand-logo-img { height:44px; max-width:174px; }
.affiliate-account-brand .brand-logo-img { height:30px; max-width:119px; }
.admin-brand-preview {
  display:flex;
  align-items:center;
  min-height:72px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--card);
}
.admin-brand-preview .brand-logo-img { height:42px; max-width:166px; }
@media (max-width:720px) {
  #brand .brand-logo-img { height:24px; max-width:95px; }
}


/* ============================================================
   Administración · Accesos especiales
   ============================================================ */
.cardfield.checkout-ready.special-bypass {
  color:#184f3a;
  border-color:#a7dbc5;
  background:linear-gradient(135deg,#effcf6,#f8fffc);
}
.cardfield.checkout-ready.special-bypass b { color:#0d6847; }
.cardfield.checkout-ready.special-bypass small { color:#477866; }

.special-access-heading {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px;
}
.special-access-heading h2 { margin:3px 0 6px; }
.special-access-heading p { max-width:660px; line-height:1.55; }
.special-access-eyebrow {
  color:var(--blue);
  font-size:10px;
  font-weight:900;
  letter-spacing:.13em;
}
.special-access-summary {
  min-width:122px;
  padding:12px 14px;
  display:grid;
  text-align:center;
  border:1px solid var(--border);
  border-radius:13px;
  background:color-mix(in srgb,var(--brand) 4%,var(--card));
}
.special-access-summary strong { font-size:24px; line-height:1; }
.special-access-summary span { margin-top:5px; color:var(--muted); font-size:10.5px; }
.special-access-note { border-left:3px solid var(--blue); }
.special-access-search {
  height:42px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--card);
}
.special-access-search span { color:var(--muted); font-size:20px; line-height:1; }
.special-access-search input {
  width:100%;
  padding:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
}
.special-access-user-list {
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:13px;
  background:var(--card);
}
.special-access-user {
  display:flex;
  align-items:center;
  gap:11px;
  padding:12px 13px;
  border-bottom:1px solid var(--border);
}
.special-access-user:last-child { border-bottom:0; }
.special-access-user.is-authorized {
  background:linear-gradient(90deg,color-mix(in srgb,#1fa66d 6%,var(--card)),var(--card) 44%);
}
.special-access-user-copy { flex:1; min-width:0; }
.special-access-user-name { font-weight:850; }
.special-access-user-copy > .muted {
  margin-top:2px;
  overflow:hidden;
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.special-access-badges { display:flex; gap:5px; flex-wrap:wrap; margin-top:6px; }
.special-badge {
  padding:4px 7px;
  border:1px solid color-mix(in srgb,var(--blue) 24%,var(--border));
  border-radius:999px;
  background:color-mix(in srgb,var(--blue) 5%,var(--card));
  color:var(--text);
  font-size:10px;
  font-weight:750;
}
.special-badge-create {
  border-color:#b7dfcd;
  background:#effbf5;
  color:#176044;
}
.special-badge.is-muted { border-color:var(--border); background:var(--bg); color:var(--muted); }

.special-access-modal { width:min(720px,88vw); }
.special-access-profile {
  display:flex;
  align-items:center;
  gap:11px;
  padding-bottom:15px;
  border-bottom:1px solid var(--border);
}
.special-access-profile h2 { margin:0; font-size:20px; }
.special-access-profile p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.special-access-status {
  margin-left:auto;
  padding:5px 8px;
  border:1px solid var(--border);
  border-radius:999px;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
}
.special-access-status.is-on { border-color:#a9d9c4; background:#effbf5; color:#176044; }
.special-access-section {
  margin-top:16px;
  padding:15px;
  border:1px solid var(--border);
  border-radius:12px;
  background:color-mix(in srgb,var(--card) 96%,var(--bg));
}
.special-access-section-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.special-access-section-head h3 { margin:0; font-size:15px; }
.special-access-section-head p { margin:5px 0 0; max-width:520px; color:var(--muted); font-size:11.5px; line-height:1.45; }
.special-switch { position:relative; width:42px; height:24px; flex:none; }
.special-switch input { position:absolute; opacity:0; pointer-events:none; }
.special-switch span {
  position:absolute; inset:0;
  border-radius:999px;
  background:#cbd2dc;
  cursor:pointer;
  transition:.18s ease;
}
.special-switch span::after {
  content:"";
  position:absolute; width:18px; height:18px; left:3px; top:3px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 4px rgba(15,23,42,.22);
  transition:.18s ease;
}
.special-switch input:checked + span { background:#159866; }
.special-switch input:checked + span::after { transform:translateX(18px); }
.special-access-fields {
  display:grid;
  grid-template-columns:1fr 1.4fr;
  gap:10px;
  margin-top:12px;
}
.special-access-fields .field,
.special-grant-form .field { margin:0; }
.special-grant-form {
  display:grid;
  grid-template-columns:1.5fr 1fr auto;
  align-items:end;
  gap:9px;
  margin-top:13px;
}
.special-grant-form .btn { min-height:40px; }
.special-current-grants { display:grid; gap:7px; margin-top:13px; }
.special-grant-row {
  display:flex;
  align-items:center;
  gap:9px;
  padding:9px 10px;
  border:1px solid var(--border);
  border-radius:9px;
  background:var(--card);
}
.special-grant-icon {
  width:32px; height:32px; display:grid; place-items:center;
  border-radius:9px; background:var(--bg); font-size:15px;
}
.special-grant-copy { flex:1; min-width:0; display:grid; gap:2px; }
.special-grant-copy strong { font-size:12.5px; }
.special-grant-copy span { color:var(--muted); font-size:10.5px; }
.special-access-empty {
  padding:12px;
  border:1px dashed var(--border);
  border-radius:9px;
  color:var(--muted);
  font-size:11px;
  text-align:center;
}
.special-access-modal-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:16px;
}
.special-revoke-all { color:#b42318 !important; }
@media (max-width:700px) {
  .special-access-heading { flex-direction:column; }
  .special-access-summary { width:100%; }
  .special-access-fields,
  .special-grant-form { grid-template-columns:1fr; }
  .special-grant-form .btn { width:100%; }
  .special-access-user { align-items:flex-start; flex-wrap:wrap; }
  .specialAccessManage { margin-left:46px; }
  .special-access-modal-actions { align-items:stretch; flex-direction:column-reverse; }
  .special-access-modal-actions .btn { width:100%; }
}


/* Acceso privado al Panel de administración desde el perfil corporativo */
.activity-side-action.activity-admin-shortcut {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  border:1px solid rgba(43,91,219,.22);
  background:linear-gradient(135deg, rgba(43,91,219,.10), rgba(248,180,36,.10));
  color:var(--text);
  box-shadow:0 5px 16px rgba(35,59,120,.08);
  font-size:11px;
  font-weight:900;
  letter-spacing:.035em;
}
.activity-side-action.activity-admin-shortcut:hover {
  transform:translateY(-1px);
  border-color:rgba(43,91,219,.34);
  box-shadow:0 8px 20px rgba(35,59,120,.12);
}
.activity-admin-shortcut svg {
  width:17px;
  height:17px;
  flex:none;
  color:var(--blue);
}


/* Sidebar: cargas robustas y estados de acceso */
.sidebar-inline-loading,
.sidebar-access-note,
.sidebar-load-error {
  display:flex;
  align-items:center;
  gap:9px;
  color:var(--muted);
  font-size:11.5px;
  line-height:1.4;
}
.sidebar-inline-loading {
  min-height:44px;
  padding:8px 0;
}
.sidebar-inline-loading > span {
  width:14px;
  height:14px;
  flex:none;
  border:2px solid var(--border);
  border-top-color:var(--blue);
  border-radius:50%;
  animation:suggestion-spin .75s linear infinite;
}
.sidebar-access-note {
  margin:8px 0 4px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:9px;
  background:color-mix(in srgb, var(--bg) 72%, transparent);
}
.sidebar-access-icon { font-size:13px; }
.sidebar-load-error {
  min-height:68px;
  padding:9px 0;
  align-items:flex-start;
}
.sidebar-load-error.compact {
  min-height:48px;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
}
.sidebar-load-error > div {
  min-width:0;
  display:grid;
  gap:2px;
}
.sidebar-load-error strong {
  color:var(--text);
  font-size:11.5px;
}
.sidebar-load-error span:not(.sidebar-load-error-icon) {
  font-size:10.5px;
}
.sidebar-load-error-icon {
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  flex:none;
  border:1px solid var(--border);
  border-radius:50%;
  color:var(--blue);
}
.sidebar-retry-btn {
  min-height:29px;
  padding:5px 9px;
  border:1px solid var(--border);
  border-radius:7px;
  background:var(--card);
  color:var(--text);
  font:inherit;
  font-size:10.5px;
  font-weight:750;
  cursor:pointer;
}
.sidebar-retry-btn:hover {
  border-color:color-mix(in srgb, var(--blue) 42%, var(--border));
  background:var(--bg);
}
.sidebar-empty-note { padding:8px 0; }

/* KOMUL - buscador de cabecera estable entre comunidades - 20260814 */
/* Mantiene el buscador con el mismo tamano en todas las comunidades de escritorio,
   independientemente de la longitud del nombre de la comunidad. */
@media (min-width: 1180px) {
  .topbar-inner {
    max-width: 1240px;
  }

  #topnav .searchform {
    flex: 0 0 170px;
    width: 170px;
    min-width: 170px;
    max-width: 170px;
    margin-left: auto;
    margin-right: 0;
  }

  #topnav .searchform input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

/* KOMUL - galeria multiple de imagenes en publicaciones - 20260814 */
.co-image-chip { position: relative; padding-right: 8px; }
.co-image-chip.is-primary { border-color: color-mix(in srgb, var(--accent) 58%, var(--border)); }
.co-primary-badge { padding: 2px 6px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: 10px; }
.co-image-chip button[data-gallery-main], .co-image-chip button[data-gallery-move] { color: var(--muted); font-size: 13px; }
.co-image-chip button[data-gallery-main]:hover { color: var(--accent); }
.co-image-chip button:disabled { opacity: .35; cursor: default; }
.post-gallery-count { position: absolute; right: 6px; bottom: 6px; padding: 3px 7px; border-radius: 999px; background: rgba(0,0,0,.78); color: #fff; font-size: 10px; font-weight: 800; line-height: 1.2; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.post-reader-gallery { width: 100%; display: grid; gap: 10px; }
.post-reader-gallery.single { grid-template-columns: minmax(0, 620px); }
.post-reader-gallery.multiple { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-reader-gallery.multiple .post-reader-image { width: 100%; }
.post-reader-gallery.multiple .post-reader-image img { width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; }
.post-editor-gallery-block { display: grid; gap: 10px; padding: 12px; border: 1px dashed var(--border); border-radius: 10px; background: var(--card); }
.post-editor-gallery-head { display: grid; gap: 2px; }
.post-editor-gallery-head b { font-size: 13px; }
.post-editor-gallery-head span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.post-editor-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 9px; }
.post-editor-gallery-item { overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); }
.post-editor-gallery-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg); }
.post-editor-gallery-controls { display: grid; grid-template-columns: 1fr auto auto auto; gap: 3px; padding: 6px; }
.post-editor-gallery-controls button { min-width: 28px; min-height: 28px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--text); font-size: 11px; cursor: pointer; }
.post-editor-gallery-controls button:hover { border-color: var(--accent); }
.post-editor-gallery-controls button.danger:hover { color: #fff; background: #d63636; border-color: #d63636; }
.post-editor-gallery-controls button:disabled { opacity: .35; cursor: default; }
@media (max-width: 700px) {
  .post-reader-gallery.multiple { grid-template-columns: 1fr; }
  .post-reader-gallery.multiple .post-reader-image img { aspect-ratio: auto; max-height: 520px; }
  .post-editor-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-editor-gallery-controls { grid-template-columns: 1fr auto auto auto; }
}

/* KOMUL - banner comercial Home + analytics privada - 20260814 */
.komul-home-promo {
  display: block;
  width: min(729px, calc(100% - 24px));
  aspect-ratio: 729 / 90;
  margin: 18px auto 18px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  cursor: pointer;
  background: #0b0f17;
  box-shadow: 0 13px 28px rgba(15,23,42,.24), 0 0 0 1px rgba(217,164,65,.16), 0 0 22px rgba(217,164,65,.13);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.komul-home-promo::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.komul-home-promo img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}
.komul-home-promo:hover {
  transform: translateY(-2px);
  filter: brightness(1.025);
  box-shadow: 0 17px 34px rgba(15,23,42,.29), 0 0 0 1px rgba(217,164,65,.25), 0 0 29px rgba(217,164,65,.20);
}
.komul-home-promo:focus-visible {
  outline: 3px solid color-mix(in srgb, #d9a441 70%, white);
  outline-offset: 4px;
}
@media (max-width: 720px) {
  .komul-home-promo { width: calc(100% - 8px); margin: 15px auto 16px; border-radius: 8px; }
}

/* Invitaciones: una sección propia de Perfil, inspirada en el flujo de
   compartir de una comunidad pero adaptada a pagos y privacidad de Komul. */
.invite-settings-card { max-width: 780px; padding: 31px 32px 34px !important; }
.invite-settings-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.invite-settings-head h2 { margin: 0 0 4px; }
.invite-settings-head p { margin: 0; color: var(--muted); font-size: 14px; }
.invite-title-mark { width: 43px; height: 43px; display: grid; place-items: center; flex: none; border: 1px solid #e9c869; border-radius: 13px; background: linear-gradient(145deg, #fff7d9, #f8d26e); color: #5c4811; font-size: 22px; box-shadow: 0 5px 14px rgba(149, 108, 20, .12); }
.invite-community-picker { display: grid; gap: 7px; margin-bottom: 9px; color: var(--text); font-size: 13px; font-weight: 800; }
.invite-community-picker select { width: 100%; height: 44px; padding: 0 38px 0 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font: inherit; font-size: 14px; }
.invite-community-picker select:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 13%, transparent); }
.invite-community-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 19px; color: var(--muted); font-size: 12px; font-weight: 700; }
.invite-community-meta > span:not(.invite-role-tag) { padding-left: 8px; border-left: 1px solid var(--border); }
.invite-role-tag { padding: 4px 8px; border-radius: 999px; background: color-mix(in srgb, var(--blue) 10%, var(--card)); color: var(--blue); }
.invite-panel { margin-top: 13px; padding: 19px; border: 1px solid var(--border); border-radius: 13px; background: linear-gradient(145deg, color-mix(in srgb, var(--card) 96%, #fff4d4), var(--card)); }
.invite-panel-heading { display: flex; align-items: flex-start; gap: 12px; }
.invite-panel-heading h3 { margin: 0 0 4px; font-size: 16px; }
.invite-panel-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.invite-panel-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 10px; background: #eef3ff; color: #2d5dca; font-size: 20px; font-weight: 800; line-height: 1; }
.invite-panel-icon.mail { background: #fff0dc; color: #c65a0a; font-size: 17px; }
.invite-panel-icon.csv { background: #e6f8ee; color: #078850; font-size: 10px; letter-spacing: .02em; }
.invite-link-row { display: flex; min-width: 0; margin-top: 16px; overflow: hidden; border: 1px solid #d6dae0; border-radius: 8px; background: var(--card); }
.invite-link-row input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--blue); padding: 12px 13px; font-size: 14px; font-weight: 700; }
.invite-link-row input:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--blue) 26%, transparent); }
.invite-copy { min-width: 112px; margin: 0; border: 0; border-left: 1px solid #e1b947; border-radius: 0; background: linear-gradient(180deg, #ffe399, #f8cc69); color: #312506; box-shadow: none; }
.invite-copy:hover { background: #f6c45b; }
.invite-email-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 16px; }
.invite-email-form input { min-width: 0; height: 44px; padding: 0 12px; border: 1px solid #d6dae0; border-radius: 8px; background: var(--card); color: var(--text); font: inherit; font-size: 14px; }
.invite-email-form input:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 13%, transparent); }
.invite-email-form .btn { min-width: 157px; }
.invite-payment-note { display: flex; gap: 9px; align-items: flex-start; margin-top: 14px; padding: 10px 11px; border: 1px solid #f3d7a3; border-radius: 8px; background: #fff9ed; color: #75501b; }
.invite-payment-note.free { border-color: #b8e6cb; background: #f0fbf4; color: #17623f; }
.invite-payment-note > span { line-height: 1.35; }
.invite-payment-note p { margin: 0; font-size: 12px; line-height: 1.48; }
.invite-email-unavailable { display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; padding: 11px 12px; border: 1px dashed var(--border); border-radius: 8px; background: var(--bg); color: var(--muted); }
.invite-email-unavailable > span { width: 19px; height: 19px; display: grid; place-items: center; flex: none; border-radius: 50%; background: #f3c34f; color: #322706; font-weight: 900; }
.invite-email-unavailable p, .invite-csv-disabled { margin: 0; font-size: 13px; line-height: 1.45; }
.invite-csv-panel { padding-bottom: 17px; }
.invite-csv-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.invite-csv-actions .btn { min-width: 196px; }
.invite-csv-actions span { font-size: 12px; }
.invite-history { margin-top: 24px; padding-top: 19px; border-top: 1px solid var(--border); }
.invite-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.invite-history-heading h3 { margin: 0; font-size: 15px; }
.invite-history-heading > span { min-width: 24px; padding: 3px 7px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }
.invite-history ul { margin: 8px 0 0; padding: 0; list-style: none; }
.invite-history-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.invite-history-row:last-child { border-bottom: 0; }
.invite-history-row > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.invite-history-row b { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.invite-history-row span:not(.invite-status) { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.invite-status { flex: none; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.invite-status.pending { background: #fff2c7; color: #725512; }
.invite-status.accepted { background: #def7e8; color: #14633e; }
.invite-status.expired { background: #f0f1f3; color: #68707b; }
.invite-history-empty { margin: 11px 0 0; font-size: 13px; }
.invite-empty-state, .invite-accept-page { max-width: 650px; margin: 44px auto; text-align: center; }
.invite-empty-state { padding: 44px 24px; border: 1px dashed var(--border); border-radius: 14px; background: var(--bg); }
.invite-empty-state h2, .invite-accept-page h1 { margin: 14px 0 8px; }
.invite-empty-state p, .invite-accept-page p { max-width: 510px; margin-right: auto; margin-left: auto; line-height: 1.55; }
.invite-empty-icon, .invite-accept-icon { width: 52px; height: 52px; display: inline-grid; place-items: center; border-radius: 16px; background: #fff0cb; color: #8b6112; font-size: 26px; font-weight: 800; }
.invite-accept-page { padding: 44px 28px !important; }
.invite-accept-page .spinner { justify-content: center; }
.invite-accept-icon.success { background: #ddf7e8; color: #167044; }
.invite-accept-icon.error { background: #fee2e2; color: #b42318; }
.invite-accept-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.invite-load-error { padding: 17px; border: 1px solid #fecaca; border-radius: 10px; background: #fff8f8; color: #a61b1b; }
.invite-load-error p { margin: 0 0 12px; }
@media (max-width: 560px) {
  .invite-settings-card { padding: 24px 18px 27px !important; }
  .invite-panel { padding: 16px; }
  .invite-link-row { flex-direction: column; overflow: visible; border: 0; background: transparent; }
  .invite-link-row input { width: 100%; border: 1px solid #d6dae0; border-radius: 8px; font-size: 12px; }
  .invite-copy { width: 100%; min-height: 42px; border: 1px solid #e1b947; border-radius: 8px; }
  .invite-email-form { grid-template-columns: 1fr; }
  .invite-email-form .btn, .invite-csv-actions .btn { width: 100%; }
  .invite-csv-actions { align-items: stretch; }
  .invite-community-meta > span:not(.invite-role-tag) { padding-left: 0; border-left: 0; }
  .invite-history-row { align-items: flex-start; }
  .invite-history-row b, .invite-history-row span:not(.invite-status) { max-width: 190px; }
  .invite-accept-page { margin: 25px 10px; padding: 35px 20px !important; }
}
