/* Jimbo Social Flow (jf-) */
/* one react button replaces the row of seven; the full set lives in the hold dial */
.jf-on .jf-foot .js-reacts { display: none; }
.jf-on .jf-foot { flex-wrap: wrap; gap: .35rem; row-gap: .4rem; }
.jf-on .jf-foot .js-post__acts { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.jf-on .jf-foot .js-post__acts { margin-left: auto; }
.jf-rx { display: inline-flex; align-items: center; gap: .4rem; height: 38px; padding: 0 .85rem 0 .7rem; border-radius: 999px; border: 1px solid var(--js-line); background: none; color: var(--js-mut); font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; transition: transform .15s, background .2s, color .2s, border-color .2s; flex: none; }
.jf-rx:hover { color: var(--color-text); border-color: color-mix(in oklab, var(--amber) 55%, var(--js-line)); }
.jf-rx:active { transform: scale(.92); }
.jf-rx:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.jf-rx.is-on { color: #141414; background: var(--amber); border-color: transparent; }
.jf-rx.is-on .js-i { animation: jfPop .42s cubic-bezier(.2, 1.6, .4, 1); }
.jf-rx--haul.is-on { background: #ff6b4a; } .jf-rx--safe.is-on { background: #2dd4bf; } .jf-rx--ha.is-on { background: #facc15; }
.jf-rx--pray.is-on { background: #fb7185; } .jf-rx--sad.is-on { background: #93c5fd; } .jf-rx--mad.is-on { background: #f97316; }
.jf-on .jf-foot .js-rxwho { flex: none; }
@keyframes jfPop { 0% { transform: scale(.4) rotate(-14deg); } 60% { transform: scale(1.3) rotate(6deg); } 100% { transform: none; } }

.jf-dial { position: fixed; z-index: 400; display: flex; gap: 4px; padding: 6px; border-radius: 999px; background: var(--js-card, #fff); border: 1px solid var(--js-line); box-shadow: 0 18px 50px rgb(0 0 0 / .28), 0 2px 6px rgb(0 0 0 / .12); animation: jfDialIn .22s cubic-bezier(.2, 1.4, .4, 1); transform-origin: 30px 100%; }
.jf-dial.is-out { animation: jfDialOut .16s ease forwards; }
.jf-dial__b { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--color-surface-2, #f1f1f1); color: var(--color-text); cursor: pointer; animation: jfRise .3s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(var(--i) * 28ms); transition: transform .14s, background .14s; touch-action: none; }
.jf-dial__b .js-i { width: 22px; height: 22px; }
.jf-dial__b:hover, .jf-dial__b.is-hot, .jf-dial__b:focus-visible { transform: translateY(-8px) scale(1.28); outline: none; }
.jf-dial__b.is-on { box-shadow: inset 0 0 0 2px var(--amber); }
.jf-dial__b.jf-rx--respect:is(:hover, .is-hot, :focus-visible) { background: var(--amber); color: #141414; }
.jf-dial__b.jf-rx--haul:is(:hover, .is-hot, :focus-visible) { background: #ff6b4a; color: #141414; }
.jf-dial__b.jf-rx--safe:is(:hover, .is-hot, :focus-visible) { background: #2dd4bf; color: #141414; }
.jf-dial__b.jf-rx--ha:is(:hover, .is-hot, :focus-visible) { background: #facc15; color: #141414; }
.jf-dial__b.jf-rx--pray:is(:hover, .is-hot, :focus-visible) { background: #fb7185; color: #141414; }
.jf-dial__b.jf-rx--sad:is(:hover, .is-hot, :focus-visible) { background: #93c5fd; color: #141414; }
.jf-dial__b.jf-rx--mad:is(:hover, .is-hot, :focus-visible) { background: #f97316; color: #141414; }
.jf-dial__tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 3px 8px; border-radius: 6px; background: #141414; color: #fff; font-size: 11.5px; font-weight: 800; opacity: 0; pointer-events: none; transition: opacity .12s; }
.jf-dial__b:is(:hover, .is-hot, :focus-visible) .jf-dial__tip { opacity: 1; }
@keyframes jfDialIn { from { opacity: 0; transform: scale(.6) translateY(10px); } }
@keyframes jfDialOut { to { opacity: 0; transform: scale(.85) translateY(6px); } }
@keyframes jfRise { from { opacity: 0; transform: translateY(14px) scale(.5); } }

/* double-tap burst */
.jf-pop { position: fixed; z-index: 450; width: 0; height: 0; pointer-events: none; }
.jf-pop__i { position: absolute; left: -36px; top: -36px; width: 72px; height: 72px; color: var(--amber); fill: color-mix(in oklab, var(--amber) 35%, transparent); filter: drop-shadow(0 6px 16px rgb(0 0 0 / .35)); animation: jfBig .85s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.jf-pop i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: jfSpark .7s ease-out forwards; }
.jf-pop i:nth-of-type(1) { --a: 0deg; } .jf-pop i:nth-of-type(2) { --a: 60deg; background: #ff6b4a; } .jf-pop i:nth-of-type(3) { --a: 120deg; background: #2dd4bf; }
.jf-pop i:nth-of-type(4) { --a: 180deg; } .jf-pop i:nth-of-type(5) { --a: 240deg; background: #fb7185; } .jf-pop i:nth-of-type(6) { --a: 300deg; background: #facc15; }
@keyframes jfBig { 0% { transform: scale(.2) rotate(-18deg); opacity: 0; } 25% { transform: scale(1.25) rotate(6deg); opacity: 1; } 45% { transform: scale(.95); } 75% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1.1) translateY(-40px); opacity: 0; } }
@keyframes jfSpark { from { transform: rotate(var(--a)) translateX(10px) scale(1); opacity: 1; } to { transform: rotate(var(--a)) translateX(64px) scale(.2); opacity: 0; } }

/* compact home folds */
@media (max-width: 720px) {
  .jf-on .jf-fold { max-height: 178px; overflow: hidden; position: relative; }
  .jf-on .js-qotd.jf-fold { max-height: 128px; }
  .jf-on .jf-fold::after { content: ""; position: absolute; inset: auto 0 0 0; height: 84px; background: linear-gradient(transparent, rgb(20 20 20 / .92)); pointer-events: none; z-index: 1; }
  .jf-on .js-qotd.jf-fold::after { background: linear-gradient(transparent, var(--js-card, var(--color-bg)) 80%); }
  .jf-unfold { position: absolute; z-index: 2; left: 50%; bottom: 12px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: .35rem; height: 34px; padding: 0 .9rem; border-radius: 999px; border: 1px solid rgb(255 255 255 / .25); background: rgb(255 255 255 / .14); color: #fff; font: inherit; font-size: 12.5px; font-weight: 800; white-space: nowrap; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .js-qotd .jf-unfold { background: var(--js-card, #fff); color: var(--color-text); border-color: var(--js-line); box-shadow: 0 4px 14px rgb(0 0 0 / .12); }
  .jf-unfold .js-i { width: 16px; height: 16px; }
}

/* composer quick tools: one swipeable row on phones instead of a tall grid */
@media (max-width: 720px) {
  .jf-on .js-stub__quick { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; gap: .4rem; margin-right: -1rem; padding-right: 1rem; grid-column: 1 / -1; }
  .jf-on .js-stub__quick::-webkit-scrollbar { display: none; }
  .jf-on .js-stub__quick > * { flex: none !important; }
}

/* pull to refresh */
.jf-ptr { position: fixed; z-index: 120; top: 70px; left: 50%; transform: translate(-50%, -60px); opacity: 0; display: flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border-radius: 999px; background: var(--js-card, #fff); border: 1px solid var(--js-line); color: var(--color-text); font-size: 12.5px; font-weight: 800; box-shadow: 0 10px 28px rgb(0 0 0 / .18); pointer-events: none; transition: transform .25s ease, opacity .25s; }
.jf-ptr svg { width: 38px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.jf-ptr.is-ready svg { color: var(--amber); }
.jf-ptr.is-busy { transform: translate(-50%, 0) !important; opacity: 1 !important; }
.jf-ptr.is-busy svg { animation: jfDrive .9s ease-in-out infinite; }
.jf-ptr .jf-w { transform-box: fill-box; transform-origin: center; }
.jf-ptr.is-busy .jf-w { stroke-dasharray: 4 2; animation: jfSpin .5s linear infinite; }
@keyframes jfDrive { 50% { transform: translateX(6px); } }
@keyframes jfSpin { to { transform: rotate(360deg); } }
#jsFeed { transition: transform .2s ease; }
.jf-chip { position: fixed; z-index: 300; left: 50%; top: 45%; transform: translate(-50%, -50%) scale(.8); padding: .55rem 1.2rem; border-radius: 999px; background: #141414; color: #fff; font-weight: 800; font-size: 15px; animation: jfChip .22s cubic-bezier(.2, 1.5, .4, 1) forwards; pointer-events: none; transition: opacity .3s; }
.jf-chip.is-out { opacity: 0; }
@keyframes jfChip { to { transform: translate(-50%, -50%) scale(1); } }

/* scroll-aware chrome */
@media (max-width: 720px) {
  .jf-on .js-tabs, .jf-on body.js-page .jrt { transition: transform .3s ease, opacity .3s; }
  .jf-on body.jf-tuck .js-tabs { transform: translateY(110%); }
  .jf-on body.jf-tuck.js-page .jrt { transform: translateY(64px); opacity: .0; pointer-events: none; }
}

/* reveal + card polish */
.jf-on .js-post { transition: border-color .2s, box-shadow .25s, transform .25s; }
@media (hover: hover) { .jf-on .js-post:hover { box-shadow: 0 14px 36px rgb(0 0 0 / .08); } }
.js-post.jf-rv { opacity: 0; transform: translateY(18px); }
.js-post.jf-rv.jf-in { opacity: 1; transform: none; transition: opacity .45s ease, transform .5s cubic-bezier(.2, .9, .3, 1), border-color .2s, box-shadow .25s; }

/* first-run tips */
.jf-tips { position: fixed; z-index: 380; right: 18px; bottom: 22px; width: min(360px, calc(100vw - 24px)); padding: 1rem 1rem .9rem; border-radius: 20px; background: var(--js-card, #fff); color: var(--color-text); border: 1px solid var(--js-line); box-shadow: 0 24px 60px rgb(0 0 0 / .28); animation: jfDialIn .3s cubic-bezier(.2, 1.3, .4, 1); }
.jf-tips.is-out { animation: jfDialOut .22s ease forwards; }
.jf-tips__h { display: flex; align-items: center; justify-content: space-between; margin-bottom: .55rem; }
.jf-tips__h b { font-size: 16px; }
.jf-tips__x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; color: var(--js-mut); display: grid; place-items: center; cursor: pointer; }
.jf-tips ol { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .65rem; }
.jf-tips li { display: flex; gap: .7rem; align-items: flex-start; animation: jfRise .4s ease both; animation-delay: calc(.15s + var(--i) * 90ms); }
.jf-tips li b { display: block; font-size: 14px; }
.jf-tips li small { display: block; color: var(--js-mut); font-size: 12.5px; line-height: 1.4; margin-top: 2px; }
.jf-tips__ic { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in oklab, var(--amber) 22%, transparent); color: var(--color-text); }
.jf-tips__ic .js-i { width: 19px; height: 19px; }
.jf-tips__ok { width: 100%; }
@media (max-width: 720px) { .jf-tips { left: 12px; right: 12px; width: auto; bottom: calc(86px + env(safe-area-inset-bottom)); } }

@media (prefers-reduced-motion: reduce) {
  .jf-dial, .jf-dial__b, .jf-tips, .jf-tips li, .jf-rx.is-on .js-i, .jf-chip { animation: none !important; }
  .jf-slide, .jf-on .js-post, #jsFeed, .jf-ptr { transition: none !important; }
}
