/* inko/social.js: one small pill above the gallery's bottom bar. On Public
   it filters the grid (All | Following | fire); on an artist's profile it is
   their follower count and the Follow button. Same panel, border and chips
   as the search pill, so it reads as part of the bar under it. */
#s-bar{flex:none; align-self:center; display:flex; justify-content:center; margin-top:6px; position:relative; z-index:2;}
#s-bar[hidden], #gallery.searching #s-bar{display:none;}
#s-bar > div{display:none; align-items:center; gap:6px; padding:4px; border-radius:16px;
  background:var(--panel); border:1px solid var(--border); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);}
#s-bar[data-mode="public"] #s-filter{display:flex;}
#s-bar[data-mode="user"] #s-artist{display:flex;}
.s-fire{display:flex; align-items:center; justify-content:center; min-width:52px;}
.s-fire .rx-ico{width:19px; height:19px;}
.s-fire.on .rx-ico{background:#fff;}
#s-followers{font-size:14px; font-weight:700; color:var(--muted); padding:0 8px 0 10px; font-variant-numeric:tabular-nums; white-space:nowrap;}
.s-follow{height:32px; min-width:96px; padding:0 16px; border-radius:12px; border:none; background:var(--grad); color:#fff;
  font-size:14px; font-weight:800; cursor:pointer; box-shadow:var(--glow);}
.s-follow.on{background:rgba(255,255,255,.1); box-shadow:none; color:var(--text);}

/* Comments: a square in the viewer's bar with the count on it, and a sheet
   over the bottom of the viewer -- the list, then the box you type in with
   a down arrow (put it away) and send either side. */
#s-cbtn{position:relative;}
#s-ccount{position:absolute; top:-6px; right:-6px; min-width:20px; height:20px; padding:0 5px; border-radius:10px;
  background:var(--grad); color:#fff; font-size:11.5px; font-weight:800; line-height:20px; text-align:center; font-variant-numeric:tabular-nums;}
#s-ccount:empty{display:none;}
#s-csheet, .s-sheet{position:absolute; left:0; right:0; bottom:0; z-index:3; height:56%; max-height:calc(100% - 120px);
  display:flex; flex-direction:column; background:var(--panel); border-top:1px solid var(--border); border-radius:24px 24px 0 0;
  backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  transform:translateY(105%); transition:transform .26s cubic-bezier(.2,.8,.2,1); touch-action:pan-y;}
#s-csheet.open, .s-sheet.open{transform:none;}
@media (prefers-reduced-motion:reduce){ #s-csheet, .s-sheet{transition:none;} }
#s-chead, .s-sheet-head{flex:none; text-align:center; font-size:14px; font-weight:800; color:var(--muted); padding:14px 16px 6px;}
#s-clist, .s-sheet-list{flex:1; min-height:0; overflow-y:auto; padding:4px 16px 8px; overscroll-behavior:contain; user-select:text; -webkit-user-select:text;}
.s-c{display:flex; gap:10px; padding:8px 0; -webkit-touch-callout:none;}
.s-cwho{background:none; border:none; padding:0; cursor:pointer; flex:none;}
.s-cwho .avatar{width:34px; height:34px; display:block;}
.s-cbody{min-width:0; flex:1;}
.s-ctop{display:flex; align-items:baseline; gap:8px;}
.s-ctag{background:none; border:none; padding:0; color:var(--text); font-size:14px; font-weight:800; cursor:pointer;
  min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.s-cwhen{font-size:12px; color:var(--muted); flex:none;}
.s-ctext{font-size:15px; line-height:1.38; color:var(--text); overflow-wrap:anywhere; margin-top:1px;}
.s-cempty{color:var(--muted); font-size:14px; text-align:center; padding:30px 10px;}
#s-cform, .s-sheet-form{flex:none; display:flex; align-items:center; gap:8px; padding:8px 12px calc(env(safe-area-inset-bottom,0px) + 12px);}
#s-cinput, .s-sheet-input{flex:1; min-width:0; height:46px; border-radius:16px; border:1px solid var(--border); background:rgba(255,255,255,.05);
  color:var(--text); font-size:16px; padding:0 14px; outline:none; user-select:text; -webkit-user-select:text;}
#s-cinput:focus, .s-sheet-input:focus{border-color:var(--a1);}
.s-csq{width:46px; height:46px; flex:none; border-radius:15px; border:1px solid var(--border); background:var(--panel); color:var(--text);
  display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0;}
.s-csq svg{width:22px; height:22px;}
#s-csend, .s-send{background:var(--grad); border-color:transparent; color:#fff; box-shadow:var(--glow);}
#s-csend:disabled, .s-send:disabled{opacity:.5;}
/* Four things in the viewer's bar now: tighter, so a 360px phone still fits. */
#v-bar{gap:10px; padding-left:12px; padding-right:12px;}
@media (max-width:400px){ .rx-pill .g-rx{min-width:0; padding:0 14px;} }
/* With the comments up, the drawing moves up above them rather than under. */
#viewer.s-comments #v-stage{align-items:flex-start;}
#viewer.s-comments #v-img{max-height:calc(44dvh - 90px); transition:max-height .26s;}

/* ---- drawing together ---- */
#s-bar[data-mode="mine"] #s-mine{display:flex;}
.s-sq{width:32px; height:32px; border-radius:11px; border:none; background:rgba(255,255,255,.1); color:var(--text);
  display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0;}
.s-sq svg{width:19px; height:19px;}
.s-pill{display:flex; align-items:center; gap:8px; height:32px; padding:0 14px 0 10px; border-radius:12px; border:none;
  background:none; color:var(--text); font-size:14px; font-weight:800; cursor:pointer; position:relative;}
.s-pill svg{width:19px; height:19px;}
#s-inv-n{min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:var(--grad); color:#fff; font-size:11px; line-height:18px; text-align:center;}
#s-inv-n:empty{display:none;}
.s-follow:disabled{opacity:.55; box-shadow:none;}
.s-grow{flex:1; min-width:0;}
.s-person{align-items:center;}
.s-small{width:34px; height:34px; border-radius:11px;}
.s-small svg{width:16px; height:16px;}
.s-wide{flex:1; height:46px; border-radius:15px; border:none; background:var(--grad); color:#fff; box-shadow:var(--glow);
  display:flex; align-items:center; justify-content:center; gap:10px; font-size:15px; font-weight:800; cursor:pointer;}
.s-wide svg{width:20px; height:20px;}
.s-roomdot{display:flex !important; align-items:center; justify-content:center; color:var(--a1);}
.s-roomdot svg{width:20px; height:20px;}
.s-sheet{position:fixed;}
#s-together{z-index:87;}
#s-shade{position:fixed; inset:0; z-index:86; background:rgba(0,0,0,.45); display:none;}
#s-shade.open{display:block;}
/* Someone invited you: a card just above the bars, wherever you are. */
#s-invite{position:fixed; left:50%; transform:translateX(-50%); bottom:calc(env(safe-area-inset-bottom,0px) + 150px); z-index:89;
  width:calc(100vw - 20px); max-width:600px; box-sizing:border-box; display:flex; align-items:center; gap:10px; padding:10px 10px 10px 12px;
  background:var(--panel); border:1px solid var(--border); border-radius:20px; backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  box-shadow:0 10px 30px rgba(0,0,0,.5);}
#s-invite[hidden]{display:none;}
.s-inv-face .avatar{width:38px; height:38px; display:block;}
.s-inv-text{flex:1; min-width:0; font-size:14px; font-weight:700; line-height:1.3;}
.s-inv-x{width:36px; height:36px; border-radius:12px;}
.s-inv-x svg{width:16px; height:16px;}

/* The room: the canvas screen again, over everything else. */
#room{position:fixed; inset:0; z-index:86; background:radial-gradient(130% 90% at 50% -10%, #151b2b 0%, var(--bg) 55%), var(--bg);
  display:none; flex-direction:column; align-items:center; touch-action:none;}
#room.open{display:flex;}
#r-head{flex:none; width:100%; text-align:center; padding:calc(env(safe-area-inset-top,0px) + 14px) 16px 6px;}
#r-title{font-size:19px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
#r-who{display:flex; justify-content:center; gap:4px; min-height:20px; margin-top:6px;}
#r-who .avatar.small{width:20px; height:20px; margin:0;}
#r-stage{flex:1; min-height:0; width:100%; display:flex; align-items:flex-end; justify-content:center; padding:4px 10px 8px; position:relative;}
#r-pad{max-width:100%; max-height:100%; aspect-ratio:3/4; border-radius:14px; box-shadow:0 10px 36px rgba(0,0,0,.5); touch-action:none; display:block;}
#r-wait{position:absolute; left:50%; bottom:45%; transform:translateX(-50%); background:var(--panel); border:1px solid var(--border);
  border-radius:16px; padding:10px 18px; font-size:14px; font-weight:700; white-space:nowrap;}
#r-wait[hidden]{display:none;}
#r-bars{flex:none; width:100%; display:flex; flex-direction:column; align-items:center; padding-bottom:calc(env(safe-area-inset-bottom,0px) + 8px);}
.r-bar{display:flex; align-items:center; justify-content:space-between; width:calc(100vw - 20px); max-width:600px; box-sizing:border-box;
  height:var(--bar-h); padding:0 14px; background:var(--panel); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  border:1px solid var(--border); border-radius:26px;}
#r-size{gap:12px; margin-bottom:8px;}
#r-size[hidden], #r-hsb[hidden]{display:none;}
#r-width{flex:1; min-width:0;}
#r-width::-webkit-slider-runnable-track{background:rgba(255,255,255,.15);}
#r-width::-moz-range-track{background:rgba(255,255,255,.15);}
#r-dot{flex:none; border-radius:50%; border:2px solid rgba(255,255,255,.3); margin-right:8px;}
#r-hsb{display:flex; width:calc(100vw - 20px); max-width:600px; box-sizing:border-box; background:var(--panel); border:1px solid var(--border);
  border-radius:18px; padding:6px 14px; margin-bottom:8px; backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);}
#r-hue::-webkit-slider-runnable-track{background:linear-gradient(90deg,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00);}
#r-hue::-moz-range-track{background:linear-gradient(90deg,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00);}
#r-sat::-webkit-slider-runnable-track{background:var(--sat-track,linear-gradient(90deg,#555,#f00));}
#r-sat::-moz-range-track{background:var(--sat-track,linear-gradient(90deg,#555,#f00));}
#r-bri::-webkit-slider-runnable-track{background:var(--bri-track,linear-gradient(90deg,#000,#f00));}
#r-bri::-moz-range-track{background:var(--bri-track,linear-gradient(90deg,#000,#f00));}
#r-tool svg{width:28px; height:28px;}
#r-swatch{width:24px; height:24px; border-radius:50%; border:2px solid rgba(255,255,255,.3); display:block;}
#r-chat{position:relative;}
#r-unread{position:absolute; top:2px; right:0; min-width:17px; height:17px; padding:0 4px; border-radius:9px; background:var(--grad);
  color:#fff; font-size:10.5px; font-weight:800; line-height:17px; text-align:center;}
#r-unread:empty{display:none;}
#room .s-sheet{z-index:3;}
.s-c.mine .s-ctag{color:var(--a1);}
