
/* access */
.access-lock{display:inline-flex;vertical-align:-2px;margin-inline-end:4px;color:var(--text-subtle)}.access-lock .icon{width:14px;height:14px}.access-when{display:none}.access-row .form-help{margin-top:4px}.access-pw{display:flex;gap:8px;justify-content:center;margin-top:12px}.access-pw input{max-width:220px}.access-hidden{margin:12px 0 0;padding:12px 14px;border:1px dashed var(--line);border-radius:var(--radius);background:var(--panel-2);color:var(--text-muted);font-size:var(--font-size-sm)}.access-hidden b{color:var(--text)}.access-shown{margin-top:12px;padding:12px 14px;border:1px solid var(--success);border-radius:var(--radius);background:var(--success-soft)}.access-shown > .access-shown-head{display:flex;align-items:center;gap:6px;margin-bottom:6px;color:var(--success);font-size:var(--font-size-sm);font-weight:600}.access-shown .icon{width:15px;height:15px}.access-private{color:var(--text-muted);font-style:italic}

/* announce */
.announce-bar{display:flex;align-items:center;gap:8px;padding:9px 14px;margin-bottom:12px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);font-size:var(--font-size-md)}.announce-icon{display:inline-flex;color:var(--brand);flex:none}.announce-icon svg{width:18px;height:18px}.announce-label{color:var(--brand);flex:none}.announce-list{position:relative;flex:1;min-width:0;height:1.6em;overflow:hidden}.announce-item{position:absolute;inset:0;display:flex;align-items:center;gap:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0;transform:translateY(110%);transition:opacity .35s,transform .35s}.announce-item.on{opacity:1;transform:none}.announce-item.off{opacity:0;transform:translateY(-110%)}.announce-item a{color:var(--text);font-weight:550}.announce-item a:hover{color:var(--brand)}.announce-item time{color:var(--text-subtle);font-size:var(--font-size-xs);flex:none}.announce-nav{display:inline-flex;gap:2px;flex:none;margin-inline-start:auto}.announce-nav button{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border:0;border-radius:var(--radius-sm);background:none;color:var(--text-subtle);cursor:pointer;padding:0}.announce-nav button:hover{background:var(--panel-2);color:var(--text)}.announce-nav svg{width:16px;height:16px}[dir="rtl"] .announce-nav svg{transform:scaleX(-1)}.col-right .announce-bar{flex-wrap:wrap}.col-right .announce-list{flex-basis:100%}.col-right .announce-nav{order:-1;margin-inline-start:auto}@media(max-width:640px){.announce-bar{margin:0 calc(-1 * var(--page-x,12px)) 10px;border-radius:0;border-left:0;border-right:0;padding:8px var(--page-x,12px);font-size:var(--font-size-sm)}.announce-item time{display:none}}

/* back_to_top */

    #back-to-top {
      position: fixed;
      bottom: 24px;
      inset-inline-end: 24px;
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: var(--panel);
      color: var(--text-muted);
      box-shadow: var(--shadow-md);
      cursor: pointer;
      opacity: 0;
      visibility: hidden;
      transform: translateY(10px);
      transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background .12s, color .12s, border-color .12s;
    }
    #back-to-top.show {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }
    #back-to-top:hover {
      background: var(--panel-2);
      color: var(--brand);
      border-color: var(--brand);
    }
    #back-to-top .icon {
      width: 18px;
      height: 18px;
    }

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

/* featured */
.featured-badge{display:inline-flex;vertical-align:-2px;margin-right:3px;align-items:center}.featured-badge .icon{width:14px;height:14px;}.featured-bold{font-weight:700}.featured-red,.featured-red a{color:#d93025}.featured-orange,.featured-orange a{color:#e7672e}.featured-green,.featured-green a{color:#188038}.featured-blue,.featured-blue a{color:#1a73e8}.featured-purple,.featured-purple a{color:#7b3fe4}.featured-menu{position:relative;display:inline-block}.featured-menu summary{list-style:none;cursor:pointer}.featured-menu summary::-webkit-details-marker{display:none}.featured-form{position:absolute;left:0;top:calc(100% + 6px);z-index:30;min-width:230px;padding:12px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 8px 24px rgba(0,0,0,.12)}.featured-form .form-row{margin-bottom:8px}.featured-form select{width:100%}.topic-bar .featured-form{left:auto;right:0}

/* growth */
/* Growth: the pages (head and tabs, hero, overview boxes, calendar, leaderboards, levels) and the sidebar card. */
.growth-page{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.growth-page>*{min-width:0}
.growth-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px}
.growth-head h1{margin:0;font-size:var(--font-size-2xl)}
.growth-tabs{margin:0}
.growth-pill{display:inline-block;padding:0 6px;border:1px solid var(--line);border-radius:var(--radius-pill);background:var(--panel-2);color:var(--text-muted);font-size:var(--font-size-xs);font-weight:600;line-height:1.6;white-space:nowrap;vertical-align:middle}
/* buttons */
.growth-go{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 18px;height:40px;border:0;border-radius:999px;background:var(--brand);color:var(--brand-text,#fff);font:inherit;font-weight:650;cursor:pointer;box-shadow:0 4px 12px color-mix(in srgb,var(--brand) 25%,transparent);transition:transform .12s}
.growth-go:hover{transform:translateY(-1px);color:var(--brand-text,#fff);text-decoration:none}
.growth-go:disabled{opacity:.7;cursor:default;transform:none}
.growth-go svg,.growth-done svg{width:17px;height:17px}
.growth-go b{padding:1px 8px;border-radius:999px;background:color-mix(in srgb,#fff 24%,transparent);font-size:var(--font-size-sm)}
.growth-done{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border-radius:999px;background:var(--success-soft);color:var(--success);font-weight:650}
.growth-done:hover{color:var(--success);text-decoration:none}
/* layout: two columns on wide screens, one below 900px */
.growth-top2{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:14px}
.growth-split{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:14px;align-items:start}
.growth-split-cal{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}
.growth-col{display:flex;flex-direction:column;gap:14px;min-width:0}
/* the warm cards (the streak, the level): the one tinted surface of a page */
.growth-warm{padding:16px 18px;border-radius:var(--radius);background:var(--brand-soft);color:color-mix(in srgb,var(--brand) 55%,var(--text))}
.growth-warm-line{display:flex;align-items:center;gap:6px;margin:0;font-size:var(--font-size-sm)}
.growth-warm-line svg{width:16px;height:16px;flex:none}
.growth-warm .growth-go{box-shadow:none}
.growth-streak-num{display:flex;align-items:baseline;gap:8px;margin-top:12px;color:color-mix(in srgb,var(--brand) 35%,var(--text))}
.growth-streak-num svg{width:22px;height:22px;align-self:center;color:var(--brand)}
.growth-streak-num b{font-size:2rem;font-weight:600;line-height:1}
.growth-streak-num span{font-size:var(--font-size-sm)}
.growth-steps{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin-top:14px}
.growth-seg{text-align:center;font-size:var(--font-size-xs);line-height:1.3}
.growth-seg i{display:block;height:6px;margin-bottom:5px;border-radius:3px;background:color-mix(in srgb,var(--brand) 22%,transparent)}
.growth-seg.on i{background:var(--brand)}
.growth-seg span{display:inline-flex;align-items:center;gap:2px}
.growth-seg svg{width:12px;height:12px}
.growth-level-top{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.growth-level-top b{font-size:1.75rem;font-weight:600;line-height:1;color:color-mix(in srgb,var(--brand) 35%,var(--text))}
.growth-level-top small{margin-inline-start:auto;font-size:var(--font-size-xs)}
.growth-warm-bar{height:8px;margin:14px 0 6px;border-radius:4px;background:color-mix(in srgb,var(--brand) 22%,transparent);overflow:hidden}
.growth-warm-bar i{display:block;height:100%;border-radius:inherit;background:var(--brand)}
.growth-level p{margin:0;font-size:var(--font-size-xs)}
/* my card and the three numbers (overview) */
.growth-me .card-body{display:flex;align-items:center;gap:14px;height:100%}
.growth-me-main{flex:1;min-width:0}
.growth-me-name{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.growth-me-name .user-link{font-size:var(--font-size-md);font-weight:600}
.growth-lvtag{padding:1px 8px;border:1px solid color-mix(in srgb,var(--brand) 40%,var(--line));border-radius:999px;color:var(--brand);font-size:var(--font-size-xs);font-weight:600;white-space:nowrap}
.growth-me-main small{color:var(--text-muted);font-size:var(--font-size-xs)}
.growth-thin{display:block;height:6px;margin:10px 0 6px;border-radius:3px;background:var(--line);overflow:hidden}
.growth-thin i{display:block;height:100%;border-radius:inherit;background:var(--brand)}
.growth-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.growth-stats a{display:flex;flex-direction:column;gap:2px;padding:12px 16px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);color:var(--text)}
.growth-stats a:hover{border-color:color-mix(in srgb,var(--brand) 40%,var(--line));text-decoration:none}
.growth-stats small{color:var(--text-muted);font-size:var(--font-size-xs)}
.growth-stats b{font-size:var(--font-size-xl);font-weight:600;line-height:1.2}
/* today's tasks: one row each */
.growth-tasks{list-style:none;margin:0;padding:0}
.growth-task{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line-soft)}
.growth-task:last-child{border:0}
.growth-ic{flex:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:var(--brand-soft);color:var(--brand)}
.growth-ic svg{width:16px;height:16px}
.growth-task-main{flex:1;min-width:0}
.growth-task-name{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px}
.growth-task-name a,.growth-task-name span{color:var(--text);font-weight:500}
.growth-task-name small{color:var(--text-muted);font-size:var(--font-size-xs)}
.growth-task .growth-thin{margin:6px 0 0}
.growth-task-num{flex:none;display:inline-flex;align-items:center;justify-content:flex-end;gap:3px;min-width:44px;color:var(--text-muted);font-size:var(--font-size-xs);font-variant-numeric:tabular-nums;white-space:nowrap}
.growth-task.is-done .growth-task-num{color:var(--brand);font-weight:600}
.growth-task-num svg{width:13px;height:13px}
.growth-tasks+.growth-chips{margin:0 0 6px 44px}
.growth-note{display:flex;align-items:center;gap:6px;margin:8px 0 0;color:var(--text-muted);font-size:var(--font-size-xs)}
.growth-note svg{width:13px;height:13px;color:var(--brand)}
/* lists: top members, today's check-ins */
.growth-toplist .growth-n{width:18px}
.growth-n.top{color:var(--brand)}
.growth-page .growth-toplist li>b{color:var(--text-muted);font-weight:500}
.growth-toplist li.me .user-link{font-weight:600}
.growth-pts{padding:1px 8px;border-radius:999px;background:var(--brand-soft)}
/* overview lists */
.growth-box .card-head a{font-size:var(--font-size-sm)}
.growth-toplist,.growth-rows{list-style:none;margin:0;padding:0}
.growth-toplist li,.growth-rows li{display:flex;align-items:center;gap:9px;padding:6px 0;border-bottom:1px solid var(--line-soft)}
.growth-toplist li:last-child,.growth-rows li:last-child{border:0}
.growth-toplist li>b,.growth-rows li>b{margin-inline-start:auto;color:var(--brand);font-size:var(--font-size-sm);white-space:nowrap}
.growth-toplist .user-link{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.growth-who{display:flex;flex-direction:column;min-width:0}
.growth-who small{color:var(--text-muted);font-size:var(--font-size-xs)}
.growth-earn-group{margin:14px 0 2px;color:var(--text-muted);font-size:var(--font-size-xs);font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.growth-earn-group:first-of-type{margin-top:4px}
.growth-earn-intro{margin:0 0 6px}
.growth-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:-6px}
.growth-chip{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border:1px solid var(--line);border-radius:999px;color:var(--text);font-size:var(--font-size-xs)}
.growth-chip b{color:var(--brand)}
.growth-chip.ok{border-color:transparent;background:var(--success-soft);color:var(--success)}
.growth-chip svg{width:12px;height:12px}
a.growth-chip:hover{border-color:var(--brand);text-decoration:none}
.growth-more-list{list-style:none;margin:0;padding:0}
.growth-more-list li{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--line-soft);font-size:var(--font-size-sm)}
.growth-more-list li:last-child{border:0}
.growth-more-list li b{margin-inline-start:auto;color:var(--brand)}
.growth-box .growth-earn-intro{margin:14px 0 0}
/* calendar: checked days tinted circles, today ringed (solid once checked in) */
.growth-cal-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.growth-cal-head h3{margin:0;font-size:var(--font-size-md)}
.growth-cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px 4px;justify-items:center}
.growth-cal .wd{padding-bottom:2px;color:var(--text-subtle);font-size:var(--font-size-xs)}
.growth-cal .d{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;color:var(--text);font-size:var(--font-size-sm)}
.growth-cal .d.pad{visibility:hidden}
.growth-cal .d.on{background:var(--brand-soft);color:color-mix(in srgb,var(--brand) 55%,var(--text));font-weight:600}
.growth-cal .d.today{box-shadow:inset 0 0 0 1.5px var(--brand)}
.growth-cal .d.on.today{background:var(--brand);color:#fff;box-shadow:none}
.growth-cal .d.ahead{color:var(--text-subtle)}
.growth-cal-foot{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line-soft)}
.growth-cal-foot span{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;background:var(--panel-2);color:var(--text-muted);font-size:var(--font-size-xs)}
.growth-cal-foot svg{width:13px;height:13px}
/* leaderboards */
.growth-board-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px}
.growth-board-head .tabs{margin:0}
.growth-board-sub{margin:-6px 0 0}
.growth-mine{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:999px;background:var(--brand-soft);color:var(--brand);font-size:var(--font-size-sm);font-weight:600}
.growth-mine svg{width:14px;height:14px}
.growth-podium{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.12fr) minmax(0,1fr);gap:14px;align-items:end;margin-top:26px}
.growth-top.r1,.growth-top.r2,.growth-top.r3{--tint:rgba(122,167,255,.16);--ring:#7aa7ff;--num:#4c7fe8;display:block;min-width:0;padding:44px 10px 18px;border:1px solid var(--line-soft);border-radius:16px;background:linear-gradient(180deg,var(--tint) 0%,var(--panel) 100%);text-align:center}
.growth-top.r1{--tint:rgba(255,178,36,.2);--ring:#f5a623;--num:#e8641c;padding-top:50px;transform:translateY(-14px)}
.growth-top.r3{--tint:rgba(240,138,155,.16);--ring:#f08a9b;--num:#e2576f}
.growth-top.empty{min-height:110px;border-style:dashed;background:none}
.growth-top.me{box-shadow:0 0 0 2px var(--brand)}
.growth-pic{position:relative;display:inline-block;line-height:0}
.growth-crown{position:absolute;z-index:1;top:-28px;left:50%;width:40px;height:40px;transform:translateX(-50%);color:var(--ring);line-height:normal}
.growth-crown svg{width:40px;height:40px;fill:currentColor}
.growth-crown i{position:absolute;top:14px;left:0;right:0;color:#fff;font-size:12px;font-style:normal;font-weight:700;text-align:center}
.growth-top .avatar{width:72px;height:72px;font-size:28px;border:3px solid var(--ring)}
.growth-name{margin-top:10px;overflow:hidden;font-weight:600;white-space:nowrap;text-overflow:ellipsis}
.growth-val{margin-top:8px;color:var(--num);font-weight:700;font-size:1.15rem}
.growth-sub{margin-top:2px;overflow:hidden;color:var(--text-muted);font-size:var(--font-size-xs);white-space:nowrap;text-overflow:ellipsis}
.growth-table ol{list-style:none;margin:0;padding:4px 16px}
.growth-table li{padding:10px 0;border-bottom:1px solid var(--line-soft)}
.growth-table li:last-child{border:0}
.growth-table .growth-row{display:flex;align-items:center;gap:10px}
.growth-n{flex:none;width:28px;color:var(--text-subtle);font-weight:600;text-align:center}
.growth-table li.me{margin:0 -16px;padding-inline:16px;background:var(--brand-soft)}
.growth-table .growth-row>b{margin-inline-start:auto;white-space:nowrap}
/* levels: reached ones ticked, the current one tinted, the ones ahead as open circles */
.growth-ladder{list-style:none;margin:0 0 8px;padding:0}
.growth-ladder li{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:var(--radius-sm)}
.growth-ladder li>svg{flex:none;width:16px;height:16px;color:var(--text-subtle)}
.growth-ladder li.past>svg,.growth-ladder li.now>svg{color:var(--brand)}
.growth-ladder li b{font-weight:500}
.growth-ladder li .muted{margin-inline-start:auto;font-variant-numeric:tabular-nums}
.growth-ladder li.now{background:var(--brand-soft)}
.growth-ladder li.now b{font-weight:600}
.growth-ladder li.past .growth-pill{border-color:color-mix(in srgb,var(--brand) 40%,var(--line));color:var(--brand)}
.growth-ladder li.now .growth-pill{border-color:var(--brand);background:var(--brand);color:#fff}
/* sidebar card */
.growth-sidecard .card-head{gap:8px}
.growth-more{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;color:var(--text-muted)}
.growth-more:hover{background:var(--panel-2);color:var(--text)}
.growth-more svg{width:15px;height:15px}
.growth-card{display:flex;flex-direction:column;gap:10px}
.growth-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.growth-wd{display:flex;flex-direction:column;align-items:center;gap:5px}
.growth-wd i{color:var(--text-subtle);font-size:11px;font-style:normal;font-weight:500;line-height:1}
.growth-wd.today i{color:var(--brand);font-weight:700}
.growth-wd b{display:flex;align-items:center;justify-content:center;width:100%;max-width:26px;aspect-ratio:1;border:1px solid var(--line);border-radius:50%;background:var(--panel-2);color:#fff}
.growth-wd b.on{border-color:var(--brand);background:var(--brand)}
.growth-wd.today b:not(.on){border:2px dashed var(--brand);background:var(--brand-soft)}
.growth-wd b.ahead{opacity:.45}
.growth-wd b svg{width:12px;height:12px;stroke-width:3}
.growth-inline{margin:0}
.growth-card .growth-go,.growth-card .growth-done{width:100%}
/* in the sidebar the check-in is the second action: soft, so New Topic in the member card above stays the one solid button */
.growth-card .growth-go{background:var(--brand-soft);color:var(--brand);box-shadow:none}
.growth-card .growth-go:hover{background:color-mix(in srgb,var(--brand) 18%,var(--panel));color:var(--brand)}
.growth-card .growth-go b{background:color-mix(in srgb,var(--brand) 16%,transparent)}
.growth-hint{margin:0;color:var(--text-muted);font-size:var(--font-size-xs);text-align:center}
.growth-lv{display:block;padding-top:10px;border-top:1px solid var(--line-soft);color:var(--text)}
.growth-lv:hover{text-decoration:none}
.growth-card.just-done .growth-done{animation:growth-pop .4s ease}
@keyframes growth-pop{0%{transform:scale(.9)}60%{transform:scale(1.04)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.growth-card.just-done *{animation:none}}
@media (max-width:900px){.growth-top2,.growth-split,.growth-split-cal{grid-template-columns:minmax(0,1fr)}.growth-split-cal>.growth-col{order:-1}}
@media (max-width:640px){
.growth-head h1{font-size:var(--font-size-xl)}
.growth-head{flex-wrap:nowrap;flex-direction:column;align-items:stretch}
.growth-tabs{width:100%;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}
.growth-tabs .tab{flex:none}
.growth-stats{gap:8px}
.growth-stats a{padding:10px 12px}
.growth-stats b{font-size:var(--font-size-lg)}
.growth-cal .d{width:100%;max-width:38px;height:auto;aspect-ratio:1}
.growth-tasks+.growth-chips{margin-inline-start:0}
.growth-podium{gap:8px;margin-top:22px}
.growth-top.r1,.growth-top.r2,.growth-top.r3{padding:30px 6px 12px;border-radius:12px}
.growth-top.r1{padding-top:34px;transform:translateY(-10px)}
.growth-top .avatar{width:52px;height:52px;font-size:20px;border-width:2px}
.growth-crown{top:-20px;width:28px;height:28px}.growth-crown svg{width:28px;height:28px}.growth-crown i{top:9px;font-size:10px}
.growth-name{font-size:var(--font-size-sm)}
.growth-val{font-size:var(--font-size-md)}
}
/* the Leaderboard card of the right column (board.php): a segmented switch, then the top members of the board */
.growth-topcard .card-body{padding-top:4px}
.growth-top-tabs{display:flex;gap:2px;margin:0 0 6px;padding:3px;border-radius:9px;background:var(--panel-2)}
.growth-top-tab{flex:1;min-width:0;padding:5px 2px;border:0;border-radius:7px;background:none;color:var(--text-muted);font:inherit;font-size:var(--font-size-xs);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.growth-top-tab:hover{color:var(--text)}
.growth-top-tab.active{background:var(--panel);color:var(--text);font-weight:600;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.growth-top-list{list-style:none;margin:0;padding:0}
.growth-top-list[hidden]{display:none}
.growth-top-list li{display:flex;align-items:center;gap:9px;padding:6px 2px;font-size:var(--font-size-sm)}
.growth-top-list .avatar{width:26px;height:26px;flex:none}
.growth-top-rank{display:inline-grid;place-items:center;width:20px;height:20px;flex:none;border-radius:50%;color:var(--text-subtle);font-size:11px;font-weight:700}
.growth-top-rank.r1{background:#fac775;color:#633806}.growth-top-rank.r2{background:#d3d1c7;color:#444441}.growth-top-rank.r3{background:#f0997b;color:#712b13}
.growth-top-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.growth-top-name .user-link{color:var(--text)}
.growth-top-value{display:inline-flex;align-items:center;gap:3px;flex:none;color:var(--text-muted);font-size:var(--font-size-xs);font-variant-numeric:tabular-nums}
.growth-top-value .icon{width:13px;height:13px;color:var(--brand)}
.growth-top-list li.me{margin:0 -6px;padding-inline:8px;border-radius:9px;background:var(--brand-soft)}
.growth-top-list li.growth-top-you{margin-top:4px}
.growth-top-list li.me .growth-top-name,.growth-top-list li.me .growth-top-value{color:var(--brand);font-weight:600}
.growth-top-empty{padding:8px 2px}
.growth-guest{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px}
.growth-guest-main{min-width:0}
.growth-guest h2{margin:0 0 6px;overflow-wrap:anywhere;font-size:var(--font-size-xl);color:var(--text)}
.growth-guest p{margin:0 0 16px;font-size:var(--font-size-sm)}
.growth-guest-btns{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.growth-guest-btns .btn{height:40px;border-radius:999px;padding:0 18px}
.growth-guest .growth-streak-num{flex:none;margin:0;flex-direction:column;align-items:center;gap:2px}
.growth-ways{list-style:none;margin:0;padding:0}
.growth-ways li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-top:1px solid var(--line-soft)}
.growth-ways li:first-child{border-top:0}
.growth-ways span{display:flex;flex-direction:column;min-width:0}
.growth-ways small{color:var(--text-muted);font-size:var(--font-size-xs)}
.growth-ways b{color:var(--brand);font-weight:650}
@media (max-width:640px){.growth-guest{flex-direction:column;align-items:stretch;padding:18px}.growth-guest .growth-streak-num{flex-direction:row;align-items:baseline}}


/* image_gallery */
/* ============================================================
   Image Gallery — assets/gallery.css
   Two parts:
     1. The grid (.imgallery) — wraps consecutive <img> tags inside
        a post into a responsive grid.
     2. The lightbox (.imgallery-lightbox) — a full-screen overlay
        with prev/next navigation, opened by clicking a gallery image.

   All colours come from the forum's CSS variables, so the gallery
   follows light/dark themes and any brand-colour override.
   ============================================================ */

/* ---------- 1. Grid ---------- */
[data-imgallery] {
  display: grid;
  grid-template-columns: repeat(var(--imgallery-cols, 2), 1fr);
  gap: 6px;
  margin: 12px 0;
  /* Cap each image's height so a row of three portraits doesn't push
     the rest of the topic down by 3000 pixels. */
  --imgallery-cell-h: 220px;
}

/* Column-count modifiers — set by the PHP hook based on image count.
   .imgallery-2 → two columns, .imgallery-3 → three, and so on up to 5. */
.imgallery-2 { --imgallery-cols: 2; }
.imgallery-3 { --imgallery-cols: 3; }
.imgallery-4 { --imgallery-cols: 4; --imgallery-cell-h: 180px; }
.imgallery-5 { --imgallery-cols: 5; --imgallery-cell-h: 160px; }

/* On small screens, cap the column count at 2 so thumbnails stay big enough to tap. */
@media (max-width: 540px) {
  [data-imgallery] { --imgallery-cols: 2 !important; --imgallery-cell-h: 140px; }
  .imgallery-2     { --imgallery-cols: 2 !important; }
}

[data-imgallery] img[data-imgallery-item] {
  width: 100%;
  height: var(--imgallery-cell-h);
  object-fit: cover;
  border-radius: var(--radius-sm, 8px);
  cursor: zoom-in;
  background: var(--panel-2, #f8f9fb);
  border: 1px solid var(--line-soft, #eff1f4);
  transition: transform .2s cubic-bezier(.22, .61, .2, 1), box-shadow .2s, filter .2s;
  display: block;
}

[data-imgallery] img[data-imgallery-item]:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
  filter: brightness(1.05);
  z-index: 1;
}

[data-imgallery] img[data-imgallery-item]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* When images live inside the grid, the .post-image-max setting of the
   forum shouldn't make them tiny — override it for gallery items only. */
.post-content [data-imgallery] img[data-imgallery-item] {
  max-width: none;
}

/* ---------- 1b. Single-image gallery ---------- */
/* A post whose body is a single image gets wrapped in a one-cell
   gallery so it can open the lightbox, but the image should NOT be
   shrunk to a thumbnail — it keeps its natural display size and
   only becomes clickable (cursor: zoom-in, inherited above). */
.imgallery-single {
  display: block;
  grid-template-columns: none;
  gap: 0;
  --imgallery-cell-h: auto;
}

.imgallery-single img[data-imgallery-item] {
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  /* Keep a subtle border so the clickable region is visible even
     when the image is transparent / has white background. */
  background: var(--panel-2, #f8f9fb);
}

/* Single images should respect the post's normal image max width —
   they are NOT exempt like grid thumbnails. This overrides the
   .post-content [data-imgallery] img { max-width: none } rule above
   for the single-image case only. (Same specificity, later in the
   file, so it wins.) */
.post-content .imgallery-single img[data-imgallery-item] {
  max-width: 100%;
}

/* On small screens the single image still displays at its natural
   size, capped to the viewport width. */
@media (max-width: 540px) {
  .imgallery-single img[data-imgallery-item] {
    max-width: 100%;
  }
}

/* ---------- 2. Lightbox ---------- */
[data-imgallery-lightbox] {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 10, 14, .92);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: imgallery-fade-in .25s cubic-bezier(.22, .61, .2, 1);
}

[data-imgallery-lightbox][hidden] {
  display: none;
}

@keyframes imgallery-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* The big image */
.imgallery-stage {
  margin: 0;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.imgallery-stage img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
  animation: imgallery-zoom-in .25s cubic-bezier(.22, .61, .2, 1);
}

@keyframes imgallery-zoom-in {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* Caption (the image's alt text, if any) */
.imgallery-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80vw;
  padding: 6px 14px;
  border-radius: var(--radius-pill, 999px);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: var(--font-size-sm, 12px);
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.imgallery-caption:empty { display: none; }

/* Counter ("3 / 7") */
.imgallery-counter {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: var(--radius-pill, 999px);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: var(--font-size-xs, 11px);
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.imgallery-counter:empty { display: none; }

/* Close button (top-right) */
.imgallery-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .15s, transform .15s;
}
.imgallery-close:hover {
  background: rgba(255, 255, 255, .18);
  transform: scale(1.05);
}
.imgallery-close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }

/* Prev / next buttons (vertically centred on each side) */
.imgallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .15s, transform .15s;
}
.imgallery-nav:hover {
  background: rgba(255, 255, 255, .18);
}
.imgallery-prev:hover { transform: translateY(-50%) scale(1.05) translateX(-2px); }
.imgallery-next:hover { transform: translateY(-50%) scale(1.05) translateX(2px); }
.imgallery-nav svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; }

.imgallery-prev { inset-inline-start: 16px; }
.imgallery-next { inset-inline-end: 16px; }

/* On small screens, move the prev/next buttons to the bottom and make
   them bigger so they're easy to tap. */
@media (max-width: 540px) {
  [data-imgallery-lightbox] { padding: 12px; }
  .imgallery-stage,
  .imgallery-stage img { max-width: 95vw; max-height: 70vh; }
  .imgallery-nav {
    top: auto;
    bottom: 24px;
    transform: none;
    width: 56px;
    height: 56px;
  }
  .imgallery-prev:hover,
  .imgallery-next:hover { transform: scale(1.05); }
  .imgallery-prev { inset-inline-start: 16px; }
  .imgallery-next { inset-inline-end: 16px; }
  .imgallery-caption { bottom: 90px; }
  .imgallery-close { width: 36px; height: 36px; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  [data-imgallery-lightbox],
  .imgallery-stage img,
  [data-imgallery] img[data-imgallery-item] {
    animation: none !important;
    transition: none !important;
  }
}

/* Print: hide the lightbox; galleries print as simple image grids. */
@media print {
  [data-imgallery-lightbox] { display: none !important; }
  [data-imgallery] img[data-imgallery-item] { height: auto; cursor: default; }
}


/* latest_comments */
.latest-comments-list{display:flex;flex-direction:column;gap:0}
.latest-comments-item{display:flex;flex-direction:column;gap:4px;padding:10px 0;border-bottom:1px solid var(--line-soft,var(--line))}
.latest-comments-item:first-child{padding-top:0}
.latest-comments-item:last-child{border-bottom:none;padding-bottom:0}
.latest-comments-head{display:flex;align-items:center;gap:6px;min-width:0}
.latest-comments-user{font-size:var(--font-size-sm);font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.latest-comments-user .user-link{color:var(--text)}
.latest-comments-time{margin-inline-start:auto;flex:none;color:var(--text-subtle);font-size:var(--font-size-xs)}
.latest-comments-topic{display:flex;align-items:center;gap:4px;font-size:var(--font-size-sm);color:var(--text-subtle);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.latest-comments-topic .icon{flex:none;width:13px;height:13px;color:var(--text-subtle)}
.latest-comments-topic span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.latest-comments-body{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:var(--font-size-md);line-height:1.45;color:var(--text-muted,var(--text));transition:color .15s}
.latest-comments-body:hover{color:var(--brand-hover,var(--brand))}
@media (max-width: 640px) {
  /* 2. Scale up discussion/post contents so they are super readable on mobile */
  .latest-comments-body {
    font-size: 16px!important; 
    line-height: 1.5!important;
  }

  /* 3. Slightly larger row titles in topic lists */
  .latest-comments-topic {
    font-size: 15px!important;
  }
}
.latest-comments-no-avatar{display:inline-block;width:24px;height:24px;border-radius:50%;background:var(--panel-2,var(--panel));border:1px solid var(--line)}
[dir="rtl"] .latest-comments-time{margin-inline-start:0;margin-inline-end:auto}

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

/* messages */
.page-messages .layout-main{max-width:100%}.chat{display:grid;grid-template-columns:300px 1fr;height:calc(100vh - 140px);min-height:420px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);overflow:hidden}.chat-list{border-inline-end:1px solid var(--line);overflow-y:auto}.chat-list-head{padding:12px 16px;border-bottom:1px solid var(--line)}.chat-list-head h3{margin:0}.chat-item{display:flex;gap:10px;padding:10px 14px;border-bottom:1px solid var(--line);color:inherit;text-decoration:none}.chat-item:hover,.chat-item.active{background:var(--panel-2)}.chat-item-main{flex:1;min-width:0}.chat-item-top{display:flex;justify-content:space-between;gap:8px}.chat-item-top time{color:var(--text-muted);font-size:var(--font-size-xs);white-space:nowrap}.chat-item-last{color:var(--text-muted);font-size:var(--font-size-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-item.unread .chat-item-last{color:var(--text);font-weight:600}.chat-item.unread b::after{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--brand);margin-inline-start:6px;vertical-align:middle}.chat-pane{display:flex;flex-direction:column;min-width:0;min-height:0}.chat-head{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--line)}.chat-head-tools{margin-inline-start:auto;display:flex;gap:6px}.chat-back{display:none;color:inherit}.chat-who{display:flex;flex-direction:column;min-width:0;line-height:1.25}.chat-who small{color:var(--text-muted);font-size:var(--font-size-xs)}.chat-more{text-align:center;color:var(--text-muted);font-size:var(--font-size-xs);padding:4px 0}.chat-log{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:14px;display:flex;flex-direction:column;gap:4px}.chat-day{text-align:center;margin:10px 0 4px;color:var(--text-muted);font-size:var(--font-size-xs)}.chat-msg{display:flex;align-items:center;gap:4px}.chat-msg.me{justify-content:flex-end}.bubble{max-width:75%;padding:8px 12px;border-radius:18px;background:var(--panel-2);line-height:1.4}.chat-msg.me .bubble{background:var(--brand);color:#fff}.chat-msg.me .bubble a{color:#fff;text-decoration:underline}.bubble .post-content{display:inline}.bubble .post-content p{display:inline;margin:0}.bubble .post-content p+p::before{content:"\A";white-space:pre}.chat-meta{display:inline-flex;align-items:center;gap:4px;margin-inline-start:8px;vertical-align:bottom;font-size:10px;opacity:.75;white-space:nowrap}.chat-edited{font-style:italic}.chat-tick{display:inline-flex;line-height:0}.chat-tick svg{width:16px;height:11px}.chat-tick .chat-tick-2{display:none}.chat-tick.is-read .chat-tick-2{display:inline}.chat-msg.me .chat-meta:has(.is-read){opacity:1}.chat-item-last .chat-tick{margin-inline-end:3px;vertical-align:-1px;color:var(--text-muted)}.chat-item-last .chat-tick.is-read{color:var(--brand)}.chat-tools{display:none;gap:2px}.chat-msg.me:hover .chat-tools,.chat-msg.show-tools .chat-tools,.chat-tools:focus-within{display:inline-flex}.chat-tool{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--text-muted);cursor:pointer}.chat-tool:hover{background:var(--panel-2);color:var(--text)}.chat-tool svg{width:15px;height:15px}.chat-recalled{justify-content:center}.chat-note{padding:2px 10px;border-radius:999px;background:var(--panel-2);color:var(--text-muted);font-size:var(--font-size-xs)}.chat-editing{display:flex;align-items:center;gap:8px;padding:6px 14px;border-top:1px solid var(--line);background:var(--panel-2);color:var(--text-muted);font-size:var(--font-size-sm)}.chat-editing svg{width:15px;height:15px}.chat-editing span{flex:1}.chat-editing[hidden]{display:none}.chat-editing+.chat-input{border-top:0}.chat-input{display:flex;gap:8px;padding:10px 14px;border-top:1px solid var(--line);align-items:flex-end}.chat-input textarea{flex:1;resize:none;min-height:38px;max-height:140px}.chat-empty{padding:40px 20px;text-align:center}.chat-none .chat-empty{margin:auto}@media (max-width:760px){.chat{grid-template-columns:1fr;height:auto;min-height:0}.chat:not(.chat-open) .chat-list{overflow:visible;border-inline-end:0}.chat-open .chat-list{display:none}.chat:not(.chat-open) .chat-pane{display:none}.chat-open{position:fixed;left:0;right:0;top:0;z-index:85;height:100vh;height:100dvh;height:var(--chat-vh,100dvh);border:0;border-radius:0}body.page-messages-chat{overflow:hidden}.chat-open .chat-head{padding:8px 10px}.chat-open .chat-head .btn{padding-inline:8px}.chat-open .chat-log{padding:10px}.chat-open .chat-input{padding:8px 10px calc(8px + env(safe-area-inset-bottom))}.chat-open .chat-input textarea{font-size:16px}.chat-back{display:inline-flex;padding:4px}.bubble{max-width:88%}.chat-msg.me:hover .chat-tools{display:none}.chat-msg.show-tools .chat-tools{display:inline-flex}}

/* nsfw */
.nsfw-badge{display:inline-block;margin-inline-start:4px;padding:0 6px;border-radius:4px;background:#e0245e;color:#fff;font-size:10px;font-weight:700;letter-spacing:.3px;line-height:1.7;vertical-align:middle}.topic-title .nsfw-badge{font-size:12px;line-height:1.8;padding:0 8px}.nsfw-row.is-promoted{margin:0 0 10px;padding:8px 10px;border:1px solid rgba(224,36,94,.35);border-radius:6px;background:rgba(224,36,94,.04)}.nsfw-row.is-promoted .form-help{margin-top:2px;color:#666;font-size:12px}.nsfw-hidden-pill{display:inline-block;padding:0 6px;border-radius:4px;background:#6b7280;color:#fff;font-size:10px;font-weight:700;letter-spacing:.3px;line-height:1.7;vertical-align:middle}

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

/* reactions */
.reactions{display:flex;align-items:center;gap:3px;flex-wrap:wrap;margin-top:10px;position:relative}
.reactions-pills{display:flex;align-items:center;gap:4px;flex-wrap:wrap;min-width:0}
.reactions-pill{display:inline-flex;align-items:center;gap:4px;padding:3px 8px 3px 5px;border-radius:999px;background:var(--panel-2,var(--panel));border:1px solid var(--line-soft,var(--line));cursor:pointer;font-size:var(--font-size-xs);line-height:1.4;color:var(--text);user-select:none;transition:background .12s,border-color .12s,transform .12s}
.reactions-pill:hover{background:var(--brand-soft,var(--panel));border-color:var(--brand)}
.reactions-pill:active{transform:scale(.94)}
.reactions-pill.active{background:var(--brand-soft,var(--panel));border-color:var(--brand);color:var(--brand-hover,var(--brand))}
.reactions-pill[aria-disabled="true"]{cursor:default;opacity:.85}
.reactions-pill[aria-disabled="true"]:hover{background:var(--panel-2,var(--panel));border-color:var(--line-soft,var(--line))}
.reactions-count{font-variant-numeric:tabular-nums;font-weight:600;color:var(--text-muted,var(--text))}
.reactions-pill.active .reactions-count{color:var(--brand-hover,var(--brand))}

.reactions-more{display:inline-flex;align-items:center}
.reactions-more>summary{list-style:none;cursor:pointer;font-size:var(--font-size-xs);color:var(--text-subtle);padding:3px 6px;border-radius:999px;user-select:none}
.reactions-more>summary::-webkit-details-marker{display:none}
.reactions-more>summary:hover{color:var(--brand-hover,var(--brand));text-decoration:underline}
.reactions-more[open]>summary{color:var(--brand)}
.reactions-more-list{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}

.reactions-add{flex:none;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;border:1px solid var(--line-soft,var(--line));background:transparent;color:var(--text-muted);cursor:pointer;padding:0;transition:background .12s,border-color .12s,color .12s,transform .12s}
.reactions-add:hover{background:var(--brand-soft,var(--panel));border-color:var(--brand);color:var(--brand-hover,var(--brand))}
.reactions-add:active{transform:scale(.92)}
.reactions-add svg{width:16px;height:16px}
.reactions-add[aria-expanded="true"]{background:var(--brand-soft,var(--panel));border-color:var(--brand);color:var(--brand-hover,var(--brand))}

.reactions-picker{position:absolute;top:calc(100% + 4px);inset-inline-start:0;z-index:50;min-width:200px;max-width:min(90vw,320px);padding:6px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);animation:reactions-pop .12s ease-out}
.reactions-picker[hidden]{display:none}
.reactions-picker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(32px,1fr));gap:2px}
.reactions-picker-item{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;border-radius:var(--radius-sm);cursor:pointer;font-size:20px;line-height:1;padding:0;transition:background .1s,transform .1s}
.reactions-picker-item:hover{background:var(--panel-2,var(--panel));transform:scale(1.15)}
.reactions-picker-item.active{background:var(--brand-soft,var(--panel));box-shadow:inset 0 0 0 2px var(--brand)}

@keyframes reactions-pop{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}

/* RTL: nothing direction-specific here (we use inset-inline-start), but keep
   the picker anchored to the start edge in RTL too. */
[dir="rtl"] .reactions-picker{inset-inline-start:0;inset-inline-end:auto}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  .reactions-pill,.reactions-add,.reactions-picker-item,.reactions-picker{transition:none;animation:none}
}

/* Topic-list reactions bar — same .reactions markup as in-topic, but placed
   in the title_suffix region under the topic's excerpt. We just trim the
   default margin-top a bit so it doesn't push too hard against the excerpt
   above, and add a small bottom margin so the meta row below has air. */
.reactions-topic-list-bar .reactions,
.reactions-topic-list-bar.reactions{margin-top:6px;margin-bottom:2px}

/* Mobile: even tighter, since the topic row is denser on narrow screens. */
@media (max-width:640px){
  .reactions-topic-list-bar .reactions,
  .reactions-topic-list-bar.reactions{margin-top:4px}
}

/* When xstyle is enabled, our JS moves the .reactions-topic-list-bar
   wrapper from .row-title INTO xstyle's .xstyle-body, right before
   .xstyle-actions. We give the wrapper a bit of vertical breathing room
   so it sits between the post content (excerpt + media) and the actions
   row without crowding either; the inner .reactions then needs no extra
   margin of its own. The selector is scoped to .xstyle-body so it only
   applies in xstyle context — the no-xstyle case keeps the rules above. */
.xstyle-body > .reactions-topic-list-bar{margin-top:10px;margin-bottom:8px}
.xstyle-body > .reactions-topic-list-bar .reactions{margin-top:0;margin-bottom:0}

/* Top reactions sidebar widget */
.reactions-top-list{display:flex;flex-direction:column;gap:0}
.reactions-top-item{display:flex;flex-direction:column;gap:4px;padding:10px 0;border-bottom:1px solid var(--line-soft,var(--line))}
.reactions-top-item:first-child{padding-top:0}
.reactions-top-item:last-child{border-bottom:none;padding-bottom:0}
.reactions-top-topic{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--font-size-sm);font-weight:600;color:var(--text);text-decoration:none}
.reactions-top-topic:hover{color:var(--brand-hover,var(--brand))}
.reactions-top-breakdown{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.reactions-top-chip{display:inline-flex;align-items:center;gap:3px;font-size:var(--font-size-xs);color:var(--text-muted,var(--text));font-variant-numeric:tabular-nums;line-height:1.4}
.reactions-top-chip-more{color:var(--text-subtle);font-weight:600}
.reactions-top-sep{color:var(--text-subtle);font-size:var(--font-size-xs);user-select:none}
.reactions-top-body{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:var(--font-size-sm);line-height:1.4;color:var(--text-muted,var(--text));text-decoration:none;transition:color .12s}
.reactions-top-body:hover{color:var(--brand-hover,var(--brand))}

/* seo_pro */
.seo-pro-panel{border:1px solid var(--line);border-radius:var(--radius-sm);padding:10px 12px;margin-bottom:12px;background:var(--panel-2)}.seo-pro-panel summary{cursor:pointer;display:flex;align-items:center;gap:6px;font-weight:600}.seo-pro-panel summary svg{width:15px;height:15px;color:var(--brand)}.seo-pro-panel[open] summary{margin-bottom:10px}.seo-pro-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:0 14px}.seo-pro-map{margin:0;padding-inline-start:18px;line-height:1.8}.seo-pro-tags .tag{margin:0 6px 6px 0}.seo-pro-card{max-width:520px;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--panel)}.seo-pro-card img{display:block;width:100%;max-height:270px;object-fit:cover}.seo-pro-noimg{height:120px;display:flex;align-items:center;justify-content:center;background:var(--panel-2);color:var(--text-muted)}.seo-pro-card-body{padding:10px 12px}.seo-pro-card-body b{display:block;margin:2px 0}.seo-pro-card-body p{margin:0;color:var(--text-muted);font-size:var(--font-size-sm)}

/* share */
.share-menu .dropdown-menu{min-width:190px;inset-inline-end:auto;inset-inline-start:0}.topic-bar .share-menu .dropdown-menu{inset-inline-start:auto;inset-inline-end:0}.share-menu .dropdown-menu a{text-decoration:none}.share-menu .dropdown-menu .icon{width:18px;height:18px;flex:none}.post-actions .share-menu{display:inline-block}.post-actions .share-menu .dropdown-toggle{padding:4px 8px}

/* social_login */
.social-login{margin-top:18px}.social-login-or{display:flex;align-items:center;gap:10px;margin-bottom:10px;color:var(--text-subtle);font-size:var(--font-size-sm)}.social-login-or::before,.social-login-or::after{content:"";flex:1;border-top:1px solid var(--line)}.social-login-btns{display:grid;gap:8px}.social-login-btn{justify-content:center;gap:9px;font-weight:550}.social-login-btn svg{width:18px;height:18px;flex:none}.social-login-list{display:grid;gap:8px;margin-bottom:6px}.social-login-row{display:flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid var(--line);border-radius:var(--radius)}.social-login-row svg{width:18px;height:18px;flex:none}.social-login-row .btn{margin-left:auto}

/* video */

    

    video {
  border: 0;
  width: 100%;
  max-height:400px;
  display: inline-block;
  border-radius: 5px;
}

      iframe {
  border: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
    height:100%;
    object-fit: cover;
  border-radius: 5px; 
}
    .audio-container {
        margin: 1rem 0;
        border-radius: 8px;
        overflow: hidden;
    }
    .tweet-container {
        margin: 1rem 0;
        max-width: 550px;
    }
    .tweet-container iframe{
        border-radius: 8px;
    }

/* 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. */
:root {
  --xstyle-like: var(--brand);
}

/* X Style: a topic row that carries .xstyle-head is laid out as a post of a timeline. */
.topic-row:has(> .slot .xstyle-head) {
  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) .meta-cat,
.topic-row:has(> .slot .xstyle-head) .topic-category,
.topic-row:has(> .slot .xstyle-head) .row-icon-pin { display: none !important; }
/* the core's own stats bar, tags, excerpt and last reply (the plugin re-renders them): hidden, so no doubles.
   The JS also sets [data-xstyle-hidden] on any other non-title child of .row-main as a catch-all. */
.topic-row:has(> .slot .xstyle-head) .row-stats,
.topic-row:has(> .slot .xstyle-head) .row-tags,
.topic-row:has(> .slot .xstyle-head) .row-excerpt,
.topic-row:has(> .slot .xstyle-head) .row-last,
.topic-row:has(> .slot .xstyle-head) .row-actions,
.topic-row:has(> .slot .xstyle-head) .row-info,
.topic-row:has(> .slot .xstyle-head) .topic-stats,
.topic-row:has(> .slot .xstyle-head) .topic-tags,
.topic-row:has(> .slot .xstyle-head) .topic-excerpt,
.topic-row:has(> .slot .xstyle-head) [data-xstyle-hidden] { display: none !important; }
.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; }
/* the New / unread badge, moved inline with the title by the JS: a small accent pill right after the title text */
.topic-row:has(> .slot .xstyle-head) .row-title .xstyle-new,
.topic-row:has(> .slot .xstyle-head) .row-title .row-new,
.topic-row:has(> .slot .xstyle-head) .row-title .badge-new,
.topic-row:has(> .slot .xstyle-head) .row-title .new-badge,
.topic-row:has(> .slot .xstyle-head) .row-title .is-new,
.topic-row:has(> .slot .xstyle-head) .row-title .unread,
.topic-row:has(> .slot .xstyle-head) .row-title .unread-badge,
.topic-row:has(> .slot .xstyle-head) .row-title [data-new],
.topic-row:has(> .slot .xstyle-head) .row-title .new {
  display: inline-block; margin-left: 6px; padding: 0 6px; vertical-align: middle;
  font-size: var(--font-size-xs); font-weight: 700; line-height: 1.6; letter-spacing: .03em;
  text-transform: uppercase; color: #fff; background: var(--brand); border-radius: 999px;
  white-space: nowrap;
}
/* if the badge is a bare dot (no text), keep it round */
.topic-row:has(> .slot .xstyle-head) .row-title .xstyle-new:empty,
.topic-row:has(> .slot .xstyle-head) .row-title .row-new:empty,
.topic-row:has(> .slot .xstyle-head) .row-title .badge-new:empty,
.topic-row:has(> .slot .xstyle-head) .row-title .new:empty {
  width: 8px; height: 8px; padding: 0; border-radius: 50%; margin-left: 6px; vertical-align: middle;
}

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

.row-icon-pin
 {
    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: #fb923c; }
.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: normal; 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-muted);  margin-top: 5px; font-size: var(--font-size-md); 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 { }
.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 {  background: rgba(0, 0, 0, .45); color: #fff;  position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 1;}
/* 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; }
.post-content .xstyle-video { max-width: 100%; }
.post-content .xstyle-video img, .xstyle-video video, .xstyle-video iframe {max-width:100%}
.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); }
/* the NSFW warning card shown to signed-out visitors on topics marked mature:
   centered lock + notice + Sign in button, in place of the excerpt/tags/media.
   The row is itself clickable (the whole row opens the topic), so the button
   keeps pointer-events:auto; the form stops the row click from navigating when
   the visitor picks Sign in instead. Signed-in visitors never see this card —
   they get the normal excerpt/media for NSFW topics (the title badge is enough). */
.xstyle-nsfw { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; padding: 5px 0px; text-align: center; color: var(--text-muted); font-size: var(--font-size-md); line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.xstyle-nsfw-icon .icon,
.xstyle-nsfw-icon svg,
.xstyle-nsfw-icon img { width: 40px; height: 40px; color: var(--text-muted); opacity: .55; display: block; stroke: currentColor; fill: none; }
.xstyle-nsfw-text { max-width: 420px; font-size: var(--font-size-md); }
.xstyle-nsfw-form { margin: 0; padding: 0; pointer-events: auto; }
.xstyle-nsfw-btn { pointer-events: auto; cursor: pointer; text-decoration: none; }
.topic-row:hover .xstyle-nsfw,
a:hover .xstyle-nsfw { text-decoration: none; }


/* 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-muted); font: inherit; line-height: 1; cursor: pointer; white-space: nowrap; }
.xstyle-act .icon { 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; }
}

.topic-row.unread .xstyle-head,
.topic-row.unread .xstyle-head *,
.topic-row.unread .xstyle-name,
.topic-row.unread .user-link,
.topic-row.unread .xstyle-tags a,
.topic-row.unread .xstyle-actions,
.topic-row.unread .xstyle-actions * {
    font-weight: normal !important;
}

.xstyle-head a, .xstyle-tags a, .xstyle-actions a {
    color:var(--text-muted)!important;
}

/* yourimageshare */
/* YourImageShare toolbar button + status indicator */

.yourimageshare-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
}


.yourimageshare-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 7px;
    border: 0;
    border-radius: 4px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    font: inherit;
    font-size: var(--font-size-sm);
    flex: none;
}

.yourimageshare-btn:hover, .yourimageshare-btn:active {
    background: var(--panel-2);
    color: var(--text);
}

.yourimageshare-btn:disabled {
    opacity: 0.5;
    cursor: progress;
}

.yourimageshare-btn svg {
    width: 1.1em;
    height: 1.1em;
    flex: 0 0 auto;
}

.yourimageshare-status {
    font-size: 0.78em;
    color: var(--text-muted, #636c76);
    padding: 0 0.3em;
}

.yourimageshare-status.yourimageshare-error {
    color: var(--danger, #cf222e);
}


/* infinite_scroll */

    .infscroll-loader {
        width: 24px;
        height: 24px;
        border: 3px solid rgba(0, 0, 0, 0.1);
        border-radius: 50%;
        border-top-color: currentColor;
        animation: infscroll-spin 0.8s linear infinite;
        margin: 0 auto;
    }
    @keyframes infscroll-spin {
        to { transform: rotate(360deg); }
    }
    .pagination {
        display:none;
    }
