
/* badge */
.badge-strip{display:inline-flex;align-items:center;gap:3px;vertical-align:middle}.badge-pic{display:inline-block;object-fit:contain;vertical-align:middle}.badge-pic-empty{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:var(--panel-2);border:1px solid var(--line);color:var(--text-muted);font-size:11px;font-weight:700}.badge-more{font-size:var(--font-size-xs);color:var(--text-subtle)}.badge-profile{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 14px}.badge-profile-label{font-size:var(--font-size-sm);color:var(--text-muted)}.badge-profile .badge-pic{width:34px;height:34px}.badge-profile a{margin-inline-start:auto;font-size:var(--font-size-sm)}.profile-card .badge-profile{margin:0;gap:8px}.profile-card .badge-profile .badge-strip{order:3;flex-basis:100%;flex-wrap:wrap}.profile-card .badge-profile .badge-pic{width:30px;height:30px}.badge-wall{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}.badge-card{display:flex;gap:12px;align-items:flex-start;padding:14px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel)}.badge-card.locked{opacity:.55}.badge-card .badge-pic{width:48px;height:48px;flex:none}.badge-card b{display:block}.badge-card p{margin:2px 0 6px;font-size:var(--font-size-sm);color:var(--text-muted)}.badge-how{font-size:var(--font-size-xs);color:var(--text-subtle)}.badge-have{display:block;margin-top:3px;font-size:var(--font-size-xs);color:var(--brand);font-weight:600}.badge-admin-pic{width:32px;height:32px;object-fit:contain;vertical-align:middle}

/* comments */

/* =========================================================
 * COMMENTS MAIN CONTENT
 * ========================================================= */

.comments-content-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}


/* =========================================================
 * SPACE BEFORE ADD COMMENT
 * ========================================================= */

.comments-content-wrap .comments-form,
.comments-content-wrap .comments-login-notice {
    margin-top: 16px;
}

.comments-block {
    margin-top: 32px;
}


/* =========================================================
 * HEADER
 * ========================================================= */

.comments-header {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 18px;
    padding: 12px 16px;

    box-sizing: border-box;

    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);

    background: #fff;
}

.comments-title-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.comments-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    width: 30px;
    height: 30px;

    border-radius: 8px;

    background: var(--panel-2);
    color: var(--text-muted);
}

.comments-title-icon svg,
.comments-title-icon i {
    width: 16px;
    height: 16px;
}

.comments-title {
    margin: 0;

    font-size: 1.25rem;
    line-height: 1.3;
}

.comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 26px;
    height: 24px;
    padding: 0 7px;

    box-sizing: border-box;

    border: 1px solid var(--line);
    border-radius: 999px;

    background: var(--panel-2);
    color: var(--text-muted);

    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1;
}


/* =========================================================
 * ADD COMMENT
 * ========================================================= */

.comments-form {
    margin-top: 16px;
    margin-bottom: 0;
    padding: 16px;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-2);
}

.comments-form-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comments-textarea {
    width: 100%;
    min-height: 105px;
    padding: 11px 12px;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--text);
    font: inherit;
    line-height: 1.5;
    resize: vertical;
}

.comments-textarea:focus {
    outline: none;
    border-color: var(--text-muted);
}

.comments-form-actions {
    display: flex;
    justify-content: flex-end;
}

.comments-login-notice {
    margin-bottom: 24px;
    padding: 13px 15px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--panel-2);
    color: var(--text-muted);
}


/* =========================================================
 * EMPTY
 * ========================================================= */

.comments-empty {
    padding: 28px 16px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--panel-2);
    color: var(--text-muted);
    text-align: center;
}


/* =========================================================
 * COMMENTS LIST
 * ========================================================= */

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comments-item {
    position: relative;
    padding: 17px 18px;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}


/* =========================================================
 * COMMENT HEADER
 * ========================================================= */

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

.comments-author {
    min-width: 0;
}

.comments-author-profile {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.comments-author-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
}

.comments-author-avatar img {
    display: block;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.comments-author-name {
    min-width: 0;
    font-weight: 600;
    line-height: 1.4;
}

.comments-date {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    white-space: nowrap;
}

.comments-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.comments-author-role {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    line-height: 1.3;
}

/* =========================================================
 * COMMENT CONTENT
 * ========================================================= */

.comments-content {
    color: var(--text);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.comments-content > :first-child {
    margin-top: 0;
}

.comments-content > :last-child {
    margin-bottom: 0;
}

.comments-content p {
    margin-top: 0;
    margin-bottom: 10px;
}

.comments-content p:last-child {
    margin-bottom: 0;
}


/* =========================================================
 * ACTIONS
 * ========================================================= */

.comments-item-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
}

.comments-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 11px;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-2);
    color: var(--text);
    text-decoration: none;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition:
        opacity .15s ease,
        background-color .15s ease;
}

.comments-action-button:hover {
    text-decoration: none;
    opacity: .88;
    background: var(--panel);
}

.comments-delete-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.comments-delete-form .comments-action-button {
    font-family: inherit;
}


/* =========================================================
 * PAGINATION
 * ========================================================= */

.comments-pagination {
    margin-top: 22px;
}


/* =========================================================
 * EDIT PAGE
 * ========================================================= */

.comments-edit-page {
    width: 100%;
    max-width: 760px;
    margin: 28px auto;
}

.comments-edit-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.comments-edit-heading {
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-soft);
}

.comments-edit-heading h2 {
    display: block;
    margin: 0;
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1.3;
    font-weight: 600;
}

.comments-edit-heading p {
    display: block;
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

.comments-edit-label {
    display: block;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
}

.comments-edit-textarea {
    width: 100%;
    min-height: 190px;
    padding: 12px 13px;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-2);
    color: var(--text);
    font: inherit;
    line-height: 1.6;
    resize: vertical;
}

.comments-edit-textarea:focus {
    outline: none;
    border-color: var(--text-muted);
}

.comments-edit-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
}

.comments-edit-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.comments-edit-cancel:hover {
    text-decoration: none;
}


/* =========================================================
 * MOBILE
 * ========================================================= */

@media (max-width: 600px) {

    .comments-block {
        margin-top: 26px;
    }

    .comments-header {
        margin-bottom: 14px;
    }

    .comments-title {
        font-size: 1.15rem;
    }

    .comments-form {
        padding: 13px;
    }

    .comments-item {
        padding: 14px;
    }

    .comments-item-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .comments-date {
        white-space: normal;
    }


    /* COMMENT ACTIONS */

    .comments-item-actions {
        justify-content: flex-end;
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .comments-action-button {
        min-height: 36px;
        width: auto;
    }

    .comments-delete-form {
        display: inline-flex;
        width: auto;
    }


    /* COMMENT FORM */

    .comments-form-actions {
        justify-content: flex-end;
    }

    .comments-form-actions .btn {
        width: auto;
    }


    /* EDIT PAGE */

    .comments-edit-page {
        margin: 20px auto;
    }

    .comments-edit-form {
        padding: 14px;
    }

    .comments-edit-heading {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }

    .comments-edit-heading h2 {
        font-size: 1.15rem;
    }

    .comments-edit-actions {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 8px;
    }

    .comments-edit-actions .btn,
    .comments-edit-cancel {
        width: auto;
        box-sizing: border-box;
    }

    .comments-author-profile {
        gap: 9px;
    }

    .comments-author-avatar,
    .comments-author-avatar img {
        width: 40px;
        height: 40px;
    }



}


/* follow */
.follow-you{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:6px;background:var(--panel-2);color:var(--text-muted);font-size:var(--font-size-xs);font-weight:400;vertical-align:middle}.follow-list .follow-row{display:flex;align-items:center;gap:12px;padding:12px 16px;border-top:1px solid var(--line-soft)}.follow-list .follow-row:first-child{border-top:0}.follow-row-main{flex:1;min-width:0}.follow-row-name{font-weight:600}.follow-bio{color:var(--text-muted);font-size:var(--font-size-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.follow-row .member-action-form{margin:0;flex:none}[data-action=follow]:not(.is-done):not(.btn-primary){color:var(--brand);border-color:var(--brand)}[data-action=follow].is-done:hover{color:var(--danger);border-color:var(--danger);background:var(--danger-soft)}.follow-suggest{border-bottom:1px solid var(--line-soft)}.follow-suggest-head{padding:12px 16px 0;color:var(--text-muted);font-size:var(--font-size-sm)}

/* market */
.market-filter-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}.market-filter-row .tabs{margin:0}.market-search{margin-inline-start:auto;width:200px;height:32px;padding:0 10px}.market-search input{font-size:var(--font-size-sm)}.market-filter-row .icon-btn{width:32px;height:32px}.market-cat-form select{width:auto;max-width:220px;height:32px;padding:0 8px;font-size:var(--font-size-sm)}@media(max-width:640px){.market-search{width:100%;margin-inline-start:0;order:2}.market-filter-row .icon-btn{order:3}}.market-connect{padding:18px 16px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--panel-2);text-align:center}.market-connect p:first-child{max-width:520px;margin:0 auto 12px}.market-connect .btn-lg{margin:4px 0 8px}.market-token-fold{margin-top:14px}.market-token-fold summary{cursor:pointer}.market-token-fold .admin-form{margin-top:10px}@media(max-width:640px){.plugin-item{flex-direction:column;gap:10px}.plugin-ops{justify-content:flex-start}.market-account-card .btn-row{margin-inline-start:0}.admin-toolbar form.inline{margin:0}}.market-other{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;margin:0 0 14px;border-radius:var(--radius-sm);background:var(--warning-soft,var(--info-soft));color:var(--text)}.market-other svg{width:20px;height:20px;flex:none;margin-top:2px;color:var(--warning,var(--info))}.market-other p{margin:0 0 6px}.market-other-stop{background:var(--danger-soft)}.market-other-stop svg{color:var(--danger)}.market-tabs{margin-bottom:12px}.market-free{background:var(--success-soft,#dcfce7);color:var(--success,#15803d)}.market-paid{background:#fff1e6;color:#c2410c}[data-theme=dark] .market-paid{background:rgba(194,65,12,.25);color:#fdba74}.market-account{display:inline-flex;align-items:center;gap:6px;margin-inline-start:auto;color:var(--text-muted);font-size:var(--font-size-sm);white-space:nowrap}.market-account svg{width:16px;height:16px}.market-account b{color:var(--text)}.market-account-card{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:14px 16px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--panel-2)}.market-account-card>svg{width:28px;height:28px;color:var(--brand);flex:none}.market-account-card>div:first-of-type{flex:1;min-width:200px}.market-account-card .btn-row{margin-inline-start:auto}.plugin-ops small{display:block;text-align:right;margin-top:4px}.plugin-ops .btn[disabled]{opacity:.5;cursor:default}.market-foot{margin-top:14px}.market-theme-blank{display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:var(--text-subtle)}.market-theme-blank .icon{width:40px;height:40px}.market-theme-badges{margin:2px 0}.theme-ops small{display:block;width:100%}.market-publish-themes{margin-top:18px;padding:14px 16px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--panel-2)}.market-publish-themes h3{margin:0 0 4px;font-size:var(--font-size-md)}.market-publish-themes p{margin:0}.market-publish-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.market-publish-list .muted{font-weight:400}

/* market */
.market-shots-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:8px}.market-shot{position:relative;aspect-ratio:3/2;border:1px solid var(--line);border-radius:var(--radius-sm);overflow:hidden;background:var(--panel-2);user-select:none;-webkit-user-select:none}.market-shot img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none;-webkit-user-drag:none}.market-shots.is-js .market-shot{cursor:grab}.market-shot.is-dragging{opacity:.45;pointer-events:none;outline:2px dashed var(--brand);outline-offset:-2px}.market-shots.is-sorting,.market-shots.is-sorting *{cursor:grabbing}.market-shot:first-child{border:2px solid var(--brand)}.market-shot-cover{display:none;position:absolute;left:5px;bottom:5px;padding:1px 7px;border-radius:4px;background:var(--brand);color:var(--brand-text,#fff);font-size:11px;font-weight:600;line-height:1.5}.market-shot:first-child .market-shot-cover{display:block}.market-shot-x,.market-shot-grip{position:absolute;top:5px;display:flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:0;border-radius:50%;background:rgba(0,0,0,.62);color:#fff;font-size:16px;line-height:1;cursor:pointer}.market-shot-x{right:5px}.market-shot-x:hover{background:var(--danger,#dc2626)}.market-shot-grip{left:5px;cursor:grab;touch-action:none}.market-shot-grip:hover{background:rgba(0,0,0,.8)}.market-shot-x:focus-visible,.market-shot-grip:focus-visible{outline:2px solid var(--brand);outline-offset:1px}.market-shot-keep{position:absolute;left:5px;top:5px;display:flex;gap:4px;align-items:center;margin:0;padding:1px 6px;border-radius:4px;background:var(--panel);font-size:var(--font-size-xs)}.market-shots.is-js .market-shot-keep,.market-shots:not(.is-js) .market-shot-x,.market-shots:not(.is-js) .market-shot-grip{display:none}.market-shot-add{position:relative;aspect-ratio:3/2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;margin:0;border:1px dashed var(--text-subtle);border-radius:var(--radius-sm);color:var(--text-muted);font-size:var(--font-size-sm);font-weight:500;cursor:pointer}.market-shot-add:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-soft)}.market-shot-add .icon{width:20px;height:20px}.market-shot-add[hidden],.market-shots-error[hidden]{display:none}.market-shots.is-js .market-shot-add input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.market-shots:not(.is-js) .market-shot-add{grid-column:1/-1;aspect-ratio:auto;align-items:stretch;border:0;cursor:default}.market-shots:not(.is-js) .market-shot-add .icon,.market-shots:not(.is-js) .market-shot-add span{display:none}.market-shots-error{margin:6px 0 0;color:var(--danger,#dc2626);font-size:var(--font-size-sm)}

/* pages */
.pages-page h1{margin-bottom:4px}.pages-page .post-content{margin-top:16px}.pages-page .post-content h2{margin-top:26px}.pages-page .post-content h3{margin-top:18px}

/* profileplus */
/* ------------------------------------------------------------------
 * Profile Plus — modern centered profile header
 * Everything is scoped under .profileplus-* and uses the core theme
 * variables, so light/dark and custom brand colours all follow the site.
 * Direction-neutral (margin-inline / inset-inline) for RTL language packs.
 * ------------------------------------------------------------------ */

/* the region the core wraps around our header */
.region-user-profile-after { margin-bottom: 0; }

.profileplus-head {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  text-align: center;
}
.profileplus-head .profileplus-cover { order: 1; }
.profileplus-head .profileplus-actions { order: 4; }
.profileplus-head .profileplus-main { order: 2; }
.profileplus-head .profileplus-stats { order: 3; }

/* --- cover ------------------------------------------------------- */

.profileplus-cover {
  height: 88px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  position: relative;
  flex: none;
}
/* the thin brand accent line along the bottom edge */
.profileplus-cover::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 55%, transparent) 50%, transparent);
}
.profileplus-cover-soft {
  background: linear-gradient(180deg, var(--brand-soft), color-mix(in srgb, var(--panel) 88%, var(--brand-soft)) 55%, var(--panel));
}

/* --- action buttons ---------------------------------------------- */

.profileplus-actions {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  z-index: 2;
}

/* --- avatar ------------------------------------------------------- */

.profileplus-avatar {
  margin-top: calc(var(--profileplus-size, 112px) / -2);
  position: relative;
  z-index: 1;
}
.profileplus-avatar .avatar {
  border: 4px solid var(--panel);
  box-shadow: var(--shadow);
}
/* only image avatars get the panel backing (a letter avatar keeps its gradient) */
.profileplus-avatar img.avatar { background: var(--panel); }
/* the stock green dot is hidden here: online is shown with a brand-coloured ripple */
.profileplus-avatar .online-dot { display: none; }
/* while online the avatar ring itself takes the brand colour (follows the site brand setting) */
.profileplus-avatar .avatar-online .avatar { border-color: var(--brand); }
/* a wave-like circle that expands from the avatar edge and fades, in the brand colour */
.profileplus-avatar .avatar-online::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--brand);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .profileplus-avatar .avatar-online::before { animation: profileplus-ripple 2.4s ease-out infinite; }
}
@keyframes profileplus-ripple {
  0%   { transform: scale(1);    opacity: .7; }
  70%  { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* --- live online pill --------------------------------------------- */

.profileplus-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  background: var(--success-soft);
  color: var(--success);
  font-size: var(--font-size-xs);
  font-weight: 600;
}
.profileplus-online i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex: none;
}
@media (prefers-reduced-motion: no-preference) {
  .profileplus-online i { animation: profileplus-pulse 2.2s ease-out infinite; }
}
@keyframes profileplus-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 45%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* --- name, share button, flags ------------------------------------ */

.profileplus-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 20px 2px;
  font-size: var(--font-size-2xl);
}
.profileplus-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.profileplus-share .icon { width: 14px; height: 14px; }
.profileplus-share:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* --- bio ----------------------------------------------------------- */

.profileplus-bio {
  max-width: 60ch;
  margin: 6px auto 0;
  color: var(--text-muted);
}

/* --- social + website icon chips ----------------------------------- */

.profileplus-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-inline: 16px;
}
.profileplus-btn {
  --profileplus-c: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-muted);
  text-decoration: none;
  transition: color .16s, border-color .16s, background .16s, transform .16s;
}
.profileplus-btn .icon { width: 18px; height: 18px; flex: none; }
.profileplus-btn:hover,
.profileplus-btn:focus-visible {
  color: var(--profileplus-c);
  border-color: color-mix(in srgb, var(--profileplus-c) 42%, transparent);
  background: color-mix(in srgb, var(--profileplus-c) 10%, var(--panel-2));
  transform: translateY(-2px);
}
/* brand colours, as custom properties (dark mode uses lighter marks) */
.profileplus-telegram  { --profileplus-c: #229ed9; }
.profileplus-instagram { --profileplus-c: #d62976; }
.profileplus-x         { --profileplus-c: #0f1419; }
.profileplus-github    { --profileplus-c: #24292f; }
[data-theme="dark"] .profileplus-x,
[data-theme="dark"] .profileplus-github { --profileplus-c: #e7e9ea; }
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .profileplus-x,
  [data-theme="auto"] .profileplus-github { --profileplus-c: #e7e9ea; }
}
/* the website chip is a wider pill with the domain */
.profileplus-btn.profileplus-site {
  width: auto;
  max-width: 250px;
  padding-inline: 12px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  color: var(--text);
}
.profileplus-btn.profileplus-site span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- meta line ------------------------------------------------------ */

.profileplus-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  padding-inline: 16px;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}
.profileplus-meta span,
.profileplus-meta .slot { display: inline-flex; align-items: center; gap: 4px; }
.profileplus-meta .icon { width: 14px; height: 14px; color: var(--text-subtle); }
.profileplus-meta a { color: var(--text-muted); }

/* --- statistics cards ------------------------------------------------ */

.profileplus-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding: 16px 20px 18px;
  border-top: 1px solid var(--line-soft);
}
.profileplus-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 96px;
  padding: 10px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
  transition: border-color .16s, color .16s, transform .16s;
}
.profileplus-stat b { font-size: var(--font-size-xl); line-height: 1.25; }
.profileplus-stat span { color: var(--text-muted); font-size: var(--font-size-xs); margin-top: 2px; }
.profileplus-stat small { color: var(--text-subtle); font-size: var(--font-size-xs); }
.profileplus-stat:hover { border-color: color-mix(in srgb, var(--brand) 55%, transparent); }

/* --- entrance animation (skipped when the visitor prefers stillness) - */

@media (prefers-reduced-motion: no-preference) {
  .profileplus-main  { animation: profileplus-rise .4s ease-out both; }
  .profileplus-stats { animation: profileplus-rise .4s .09s ease-out both; }
}
@keyframes profileplus-rise {
  from { opacity: 0; transform: translateY(10px); }
}

/* --- settings form group (Settings → Profile) ----------------------- */

.profileplus-form {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.profileplus-form-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-md);
  font-weight: 600;
}
.profileplus-form-head .icon { color: var(--brand); width: 16px; height: 16px; }
.profileplus-form-hint { color: var(--text-muted); font-size: var(--font-size-sm); margin: 4px 0 10px; }

/* --- narrow screens --------------------------------------------------- */

@media (max-width: 640px) {
  .profileplus-cover { height: 64px; }
  .profileplus-actions {
    position: static;
    justify-content: center;
    margin: 12px 12px 0;
    padding-bottom: 2px;
  }
  .profileplus-avatar { margin-top: -42px; }
  .profileplus-avatar .avatar { width: 84px; height: 84px; }
  .profileplus-avatar .avatar-letter { font-size: 37px; }
  .profileplus-name { margin-top: 8px; font-size: var(--font-size-xl); }
  .profileplus-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px 14px 14px; }
  .profileplus-stat { min-width: 0; padding: 8px 12px; }
  .profileplus-btn.profileplus-site { max-width: 200px; }
}


/* report */
.report-act.report-flagged{color:var(--danger)}.report-quote{border-inline-start:3px solid var(--line);padding:8px 12px;margin:0 0 16px;color:var(--text-muted);background:var(--panel-2);border-radius:var(--radius-sm)}.report-quote b{color:var(--text)}.report-group{border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);margin-bottom:14px}.report-group-head{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;padding:10px 14px;border-bottom:1px solid var(--line)}.report-group-head .flag{margin-inline-start:auto}.report-excerpt{padding:10px 14px;color:var(--text-muted);font-size:var(--font-size-sm);border-bottom:1px solid var(--line)}.report-list{list-style:none;margin:0;padding:6px 14px}.report-list li{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline;padding:6px 0;border-bottom:1px dashed var(--line)}.report-list li:last-child{border-bottom:0}.report-note{flex-basis:100%;color:var(--text)}.report-ops{display:flex;gap:8px;padding:10px 14px;border-top:1px solid var(--line);flex-wrap:wrap}.report-ops .action-form{display:inline}

/* xstyle */
/* X Style: a topic row that carries .xstyle-head is laid out as a post of a timeline.
   Grid: the avatar in the first column; head, title (core .row-main) and body stacked in the second. */
.topic-row:has(> .slot .xstyle-head) {
  --xstyle-like: #f91880;
  display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; row-gap: 4px;
  padding: 14px 16px 8px; cursor: pointer;
}
.topic-row:has(> .slot .xstyle-head) > * { grid-column: 2; }
.topic-row:has(> .slot .xstyle-head) > .slot[data-slot="topic_list.item.after"] { display: contents; }
.topic-row:has(> .slot .xstyle-head) > .row-avatar { grid-column: 1; grid-row: 1 / span 3; padding-top: 2px; }
.topic-row:has(> .slot .xstyle-head) > .row-main { grid-row: 2; }
.topic-row:has(> .slot .xstyle-head) .row-meta,
.topic-row:has(> .slot .xstyle-head) > .row-cat,
.topic-row:has(> .slot .xstyle-head) .row-icon-pin { display: none; }
.topic-row:has(> .slot .xstyle-head) .row-title { margin: 0; font-size: var(--font-size-lg); font-weight: 600; line-height: 1.4; }
.topic-row.read:has(> .slot .xstyle-head) .row-title a { font-weight: 500; }

/* a member's own list (no avatar): one column, and the name is not repeated */
.topic-row:has(> .slot .xstyle-head):not(:has(> .row-avatar)) { grid-template-columns: minmax(0, 1fr); }
.topic-row:has(> .slot .xstyle-head):not(:has(> .row-avatar)) > * { grid-column: 1; }
.topic-row:not(:has(> .row-avatar)) .xstyle-name, .topic-row:not(:has(> .row-avatar)) .xstyle-name + .xstyle-dot { display: none; }

.xstyle-head { grid-row: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; font-size: var(--font-size-sm); color: var(--text-subtle); line-height: 1.4; }
.xstyle-pinned { flex-basis: 100%; display: inline-flex; align-items: center; gap: 4px; font-size: var(--font-size-xs); font-weight: 600; color: var(--text-subtle); }
.xstyle-pinned .icon { width: 12px; height: 12px; }
.xstyle-who { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.xstyle-head .xstyle-name { font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xstyle-head .xstyle-name:hover { color: var(--text); text-decoration: underline; }
.xstyle-time { color: var(--text-subtle); white-space: nowrap; }
.xstyle-time:hover { color: var(--text-subtle); text-decoration: underline; }
.xstyle-cat { margin-inline-start: auto; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-muted); font-size: var(--font-size-xs); white-space: nowrap; }
.xstyle-cat:hover { border-color: var(--text-subtle); color: var(--text); }

.xstyle-body { grid-row: 3; min-width: 0; }
/* paragraphs stay paragraphs (one line break each), with a little air between them */
.xstyle-text { color: var(--text); line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.xstyle-more { display: inline-block; margin-top: 2px; color: var(--brand); font-size: var(--font-size-sm); }
.xstyle-more:hover { text-decoration: underline; }
.xstyle-tags { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 6px; font-size: var(--font-size-sm); }
.xstyle-tags a { color: var(--brand); }
.xstyle-tags a:hover { text-decoration: underline; }

/* up to four pictures, the way a timeline shows them: one wide, two side by side, one tall beside two, or four squares; "+N" on the fourth */
.xstyle-media { display: grid; gap: 2px; max-width: 560px; margin-top: 12px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel-2); }
.xstyle-pic { position: relative; display: block; min-width: 0; min-height: 0; padding: 0; border: 0; background: none; cursor: zoom-in; }
a.xstyle-media .xstyle-pic { cursor: pointer; }
.xstyle-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.xstyle-media-1 img { height: auto; max-height: 420px; }
.xstyle-media-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: 260px; }
.xstyle-media-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); height: 280px; }
.xstyle-media-3 > :first-child { grid-row: 1 / span 2; }
.xstyle-media-4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); height: 280px; }
.xstyle-plus { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); color: #fff; font-size: 1.4rem; font-weight: 600; }
/* a video: its cover and a play button, the player takes its place when pressed */
.xstyle-video { position: relative; display: flex; align-items: center; justify-content: center; max-width: 560px; margin-top: 12px; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #1c1c1e; }
.xstyle-video img, .xstyle-video video, .xstyle-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.xstyle-video.is-file video { object-fit: contain; background: #000; }
.xstyle-play { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); cursor: pointer; transition: transform .12s, background .12s; }
.xstyle-play:hover { background: var(--brand); transform: scale(1.06); }
.xstyle-tri { display: block; width: 0; height: 0; margin-left: 5px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
.xstyle-badge { position: absolute; z-index: 1; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: var(--font-size-xs); }
.xstyle-badge .icon { width: 13px; height: 13px; }
.xstyle-video.playing .xstyle-play, .xstyle-video.playing .xstyle-badge { display: none; }
/* the picture viewer */
.xstyle-viewer { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .92); }
.xstyle-viewer[hidden] { display: none; }
.xstyle-viewer img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 4px; }
.xstyle-viewer button { position: absolute; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.xstyle-viewer button:hover { background: rgba(255, 255, 255, .24); }
.xstyle-v-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.xstyle-v-next { right: 16px; top: 50%; transform: translateY(-50%); }
.xstyle-v-close { top: 16px; right: 16px; }
.xstyle-viewer.single .xstyle-v-prev, .xstyle-viewer.single .xstyle-v-next, .xstyle-viewer.single .xstyle-count { display: none; }
.xstyle-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .8); font-size: var(--font-size-sm); }
.xstyle-mature { display: flex; align-items: center; gap: 8px; max-width: 560px; margin-top: 12px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 16px; background: var(--panel-2); color: var(--text-muted); font-size: var(--font-size-sm); }
.xstyle-mature .icon { width: 18px; height: 18px; flex: none; }
.xstyle-mature:hover { color: var(--text); }

/* fixed columns (replies, like, views, last reply, then bookmark and share), so the buttons line up from one row to the next */
.xstyle-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr) auto; align-items: center; gap: 8px; max-width: 600px; margin-top: 8px; margin-inline-start: -8px; color: var(--text-subtle); font-size: var(--font-size-sm); }
.xstyle-actions > * { justify-self: start; }
.xstyle-actions .action-form { display: inline-flex; margin: 0; }
.xstyle-act { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 5px 8px; border: 0; border-radius: 999px; background: none; color: var(--text-subtle); font: inherit; line-height: 1; cursor: pointer; white-space: nowrap; }
.xstyle-act .icon { width: 17px; height: 17px; flex: none; }
.xstyle-act span:empty { display: none; }
.xstyle-reply:hover { color: var(--brand); background: var(--brand-soft, var(--panel-2)); }
.xstyle-like:hover, .xstyle-like.active { color: var(--xstyle-like); }
.xstyle-like:hover { background: color-mix(in srgb, var(--xstyle-like) 10%, transparent); }
.xstyle-like.active .icon { fill: var(--xstyle-like); }
.xstyle-views { cursor: default; }
.xstyle-last { max-width: 100%; overflow: hidden; }
.xstyle-last time { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xstyle-last span { overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.xstyle-last time { color: var(--text-subtle); }
.xstyle-last:hover { color: var(--text); background: var(--panel-2); }
.xstyle-end { justify-self: end; display: inline-flex; align-items: center; gap: 2px; }
.xstyle-end .action-form { display: inline-flex; margin: 0; }
.xstyle-bookmark span { display: none; } /* the core script writes Bookmark / Bookmarked into it: it stays the tooltip only */
.xstyle-bookmark:hover, .xstyle-bookmark.active { color: var(--brand); }
.xstyle-bookmark:hover { background: var(--panel-2); }
.xstyle-bookmark.active .icon { fill: var(--brand); }
.xstyle-share:hover { color: var(--brand); background: var(--panel-2); }

@media (max-width: 640px) {
  .topic-row:has(> .slot .xstyle-head) { grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; padding: 12px 12px 8px; }
  .topic-row:has(> .slot .xstyle-head) .row-avatar .avatar { width: 36px; height: 36px; }
  .topic-row:has(> .slot .xstyle-head) .row-title { font-size: 15px; }
  .xstyle-cat { display: none; }
  .xstyle-media, .xstyle-video { border-radius: 12px; }
  .xstyle-media-2, .xstyle-media-3, .xstyle-media-4 { height: 200px; }
  .xstyle-v-prev, .xstyle-v-next { display: none !important; }
  .xstyle-last, .xstyle-actions > span:empty { display: none; } /* no room for the last reply (or its empty place) beside the buttons on a phone; the topic shows it */
  .xstyle-actions { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
}

