: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); }
#userarea { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }

/* 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; } }

/* 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; }

/* Descubrimiento dentro de la pestaña Comunidad */
.suggested-communities-card { padding: 16px; }
.suggestions-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.suggestions-kicker, .community-create-kicker { display: block; color: var(--brand-dark); font-size: 10px; font-weight: 900; letter-spacing: .7px; line-height: 1.2; }
.suggestions-head h3 { margin-top: 3px; font-size: 16px; font-weight: 800; line-height: 1.25; }
.suggestions-all { color: var(--blue); font-size: 13px; font-weight: 700; white-space: nowrap; padding-top: 2px; }
.suggestions-all:hover { text-decoration: underline; }
.suggestions-list { display: grid; gap: 8px; }
.suggestions-loading { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; min-height: 54px; }
.suggestions-loading span { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: suggestion-spin .75s linear infinite; flex: none; }
@keyframes suggestion-spin { to { transform: rotate(360deg); } }
.suggested-community { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 62px; padding: 5px; border: 1px solid transparent; border-radius: 10px; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.suggested-community:hover { background: var(--bg); border-color: var(--border); transform: translateY(-1px); }
.suggested-community:focus-visible { outline: 3px solid rgba(245, 158, 11, .34); outline-offset: 2px; }
.suggested-cover { width: 52px; height: 52px; border-radius: 9px; background-size: cover; background-position: center; overflow: hidden; flex: none; }
.suggested-cover-empty { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand), var(--blue)); color: #fff; font-size: 22px; }
.suggested-cover img { width: 100%; height: 100%; object-fit: cover; }
.suggested-copy { min-width: 0; display: grid; gap: 2px; }
.suggested-copy strong { overflow: hidden; color: var(--text); font-size: 14px; font-weight: 800; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.suggested-copy > span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.suggested-arrow { color: var(--blue); font-size: 18px; font-weight: 700; line-height: 1; }
.community-create-card { position: relative; overflow: hidden; border-color: rgba(245, 158, 11, .24); background: linear-gradient(135deg, rgba(245, 158, 11, .14), var(--card) 62%); box-shadow: 0 7px 20px rgba(217, 119, 6, .12), var(--shadow); }
.community-create-card::after { content: ''; position: absolute; width: 154px; height: 154px; border-radius: 50%; right: -70px; top: -75px; border: 26px solid rgba(59, 91, 219, .08); pointer-events: none; }
.community-create-icon { position: absolute; top: 16px; right: 18px; z-index: 1; width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .8); color: var(--brand-dark); box-shadow: 0 3px 9px rgba(217, 119, 6, .14); font-size: 19px; }
.community-create-body { position: relative; z-index: 1; padding: 18px; }
.community-create-body h3 { margin-top: 5px; font-size: 20px; font-weight: 900; letter-spacing: -.02em; }
.community-create-body p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 8px 26px 16px 0; }
.btn.community-create-button { width: 100%; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid rgba(180, 106, 0, .32); border-radius: 9px; background: var(--brand); box-shadow: 0 4px 11px rgba(217, 119, 6, .26); font-size: 14px; font-weight: 800; transition: background .16s ease, box-shadow .16s ease, transform .16s ease; }
.btn.community-create-button:hover:not(:disabled) { background: var(--brand-dark); box-shadow: 0 7px 15px rgba(217, 119, 6, .30); transform: translateY(-1px); }
.btn.community-create-button:focus-visible { outline: 3px solid rgba(245, 158, 11, .42); outline-offset: 2px; }
@media (max-width: 900px) { .suggested-communities-card, .community-create-card { max-width: 540px; } }
@media (max-width: 480px) { .community-create-body { padding: 17px; } .community-create-body p { margin-right: 36px; } }

/* 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; }
}

/* ============ Discover (home) — Skool style ============ */
.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: 650px; margin: 22px auto 0; display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 20px; box-shadow: var(--shadow); }
.disc-search .dss-icon { color: #8a8a8a; font-size: 17px; }
.disc-search input { flex: 1; border: none; outline: none; background: transparent; color: var(--text); font-size: 16px; font-family: var(--font); }
.disc-search input::placeholder { color: #8a8a8a; }
.cat-wrap { position: relative; margin: 24px 0 28px; padding: 0 42px; }
.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); }

/* ============ 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; }

/* ============ 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); }
