/* ============ Shenanigo v9: friends, chat and the friends activity feed ============ */
.so-page { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; padding-bottom: 60px; }
.so-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 18px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.so-tabs a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 14px; font: 600 14.5px var(--f-body); color: var(--muted); text-decoration: none; }
.so-tabs a.on { color: #1d1100; background: linear-gradient(115deg, #f5e2b0, #ffb56b); }
.so-panel { display: flex; flex-direction: column; gap: 12px; }
.so-h { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 14px 0 2px; }
.so-note { margin: 0; padding: 10px 14px; border-radius: 14px; font-size: 14px; background: rgba(143, 176, 221, 0.1); box-shadow: inset 0 0 0 1px rgba(143, 176, 221, 0.3); }
.so-list { display: flex; flex-direction: column; gap: 6px; }
.so-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; color: var(--text); text-decoration: none; background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--line); }
a.so-row:hover { background: rgba(255, 255, 255, 0.06); }
.so-row.unread b { color: #f5e2b0; }
.so-av { flex: none; display: grid; place-items: center; }
.so-av .avatar { width: 44px; height: 44px; }
.so-crew { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font-size: 22px; background: rgba(240, 211, 138, 0.14); }
.so-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; }
.so-main b, .so-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-main small { color: var(--dim); font-size: 13px; }
.so-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.so-side small { color: var(--dim); font-size: 12px; white-space: nowrap; }
.so-badge { min-width: 22px; height: 22px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 99px; font: 800 12px var(--f-mono); font-style: normal; color: #1d1100; background: #f0d38a; }
.so-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.so-search { display: flex; gap: 8px; }
.so-search .input { flex: 1; min-width: 0; }
.so-found { margin-top: 4px; }
.so-blocked summary { cursor: pointer; color: var(--dim); font-size: 14px; margin: 14px 0 8px; }
/* activity */
.so-feed { display: flex; flex-direction: column; gap: 10px; }
.so-item { display: flex; gap: 12px; padding: 14px 16px; border-left: 4px solid hsl(var(--h), 55%, 55%); }
.so-item p { margin: 0; line-height: 1.4; white-space: normal; }
.so-item a { color: inherit; }
.so-cheers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.so-cheers button { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 11px; border: 0; border-radius: 99px; cursor: pointer; font-size: 17px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.2s var(--spring); }
.so-cheers button:active { transform: scale(0.9); }
.so-cheers button.on { background: rgba(240, 211, 138, 0.18); box-shadow: inset 0 0 0 1.5px #f0d38a; }
.so-cheers b { font: 700 12px var(--f-mono); color: var(--text); }
/* one chat */
.so-chat { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; height: calc(100dvh - var(--top, 80px) - 110px); min-height: 420px; }
.so-chathead { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 18px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.so-chathead .so-av .avatar { width: 40px; height: 40px; }
.so-msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px 4px; overscroll-behavior: contain; }
.so-day { align-self: center; margin: 10px 0 4px; padding: 3px 10px; border-radius: 99px; font: 600 11.5px var(--f-mono); color: var(--dim); background: rgba(255, 255, 255, 0.05); }
.so-empty { margin: auto; color: var(--dim); }
.so-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 80%; }
.so-msg.mine { align-self: flex-end; align-items: flex-end; }
.so-who { font: 600 12px var(--f-body); color: var(--amber); margin: 0 0 2px 10px; }
.so-bub { padding: 9px 13px; border-radius: 18px 18px 18px 6px; background: rgba(255, 255, 255, 0.08); overflow-wrap: anywhere; }
.so-msg.mine .so-bub { border-radius: 18px 18px 6px 18px; color: #1d1100; background: linear-gradient(115deg, #f5e2b0, #f3c98b); }
.so-bub p { margin: 0; white-space: pre-wrap; line-height: 1.38; }
.so-bub img { display: block; max-width: min(280px, 100%); max-height: 320px; border-radius: 12px; margin: 2px 0 4px; }
.so-msg.gone .so-bub { opacity: 0.55; font-size: 13.5px; }
.so-time { display: flex; align-items: center; gap: 2px; font: 500 11px var(--f-mono); color: var(--dim); margin: 2px 8px 0; }
.so-mact { border: 0; background: none; color: var(--dim); cursor: pointer; padding: 0 4px; font-size: 15px; opacity: 0.5; }
.so-msg:hover .so-mact, .so-mact:focus-visible { opacity: 1; }
@media (hover: none) { .so-mact { opacity: 0.8; } }
.so-compose { display: flex; align-items: flex-end; gap: 8px; padding: 6px; border-radius: 20px; background: rgba(16, 19, 24, 0.8); box-shadow: inset 0 0 0 1px var(--line-2); }
.so-inwrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.so-compose textarea { resize: none; min-height: 44px; max-height: 140px; }
.so-attach { flex: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; font-size: 20px; }
.so-compose .btn { flex: none; min-width: 48px; height: 44px; }
.so-prev { position: relative; width: 84px; }
.so-prev img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; display: block; }
.so-prev button { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; font-size: 12px; background: #222; }
.so-safe { margin: 0; font-size: 12px; text-align: center; }
body.so-chat-on .tabbar { display: none; }
body.so-chat-on .so-chat { height: calc(100dvh - var(--top, 80px) - 24px); }
.chat-btn { position: relative; text-decoration: none; }
.chat-btn.on { background: rgba(240, 211, 138, 0.14); }
.jc-social, .jc-friends { margin-top: 12px; gap: 8px; flex-wrap: wrap; }

/* profile photos (uploaded avatars) and the editor's photo row */
img.av-photo { border-radius: 50%; object-fit: cover; background: #222; display: inline-block; flex: none; }
.av-photo-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.av-photo-row .avatar.md { width: 48px; height: 48px; }
.av-photo-row .busy { opacity: 0.5; pointer-events: none; }
.mn-out b { color: #ff9f8a; }

/* your own profile: Edit profile as a real button, and the avatar opens the editor */
.jc-mebtns { margin-top: 14px; gap: 8px; flex-wrap: wrap; }
.jc-av-edit { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.jc-cam { position: absolute; left: -2px; bottom: 4px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font-size: 15px;
  background: #1d1a16; box-shadow: 0 0 0 2px #f0d38a, 0 6px 14px -6px #000; }
.jc-av-edit:active { transform: scale(0.96); }

/* ---------- the Decider (pass-the-phone quiz that picks where to eat) ---------- */
body.dd-on { overflow: hidden; }
.dd { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); background: rgba(8, 10, 14, 0.92); animation: fadeIn 0.25s both; }
.dd.out { opacity: 0; transition: opacity 0.25s; }
.dd-card { position: relative; width: min(460px, 100%); max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 26px 22px 22px; border-radius: 26px; text-align: center;
  background: linear-gradient(160deg, #1d2129, #14171d); box-shadow: 0 30px 60px -20px #000, inset 0 0 0 1px var(--line-2); animation: fadeUp 0.35s var(--ease) both; }
.dd-card .field { text-align: left; }
.dd-x { position: absolute; top: 10px; right: 10px; }
.dd-emoji { font-size: 54px; line-height: 1; }
.dd-emoji.big { font-size: 84px; animation: mbPop 0.6s var(--spring); }
.dd-card h2 { font-size: clamp(24px, 6vw, 32px); }
.dd-pick { color: #f5e2b0; }
.dd-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.dd-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f5e2b0, #ffb56b); transition: width 0.4s var(--ease); }
.dd-who { align-self: center; padding: 6px 14px; border-radius: 99px; font: 700 13px var(--f-mono); letter-spacing: 0.06em; }
.dd-who.p0 { color: #1d1100; background: #f0d38a; }
.dd-who.p1 { color: #fff; background: #b8452f; }
.dd-who.both { color: #1d1100; background: linear-gradient(90deg, #f0d38a, #e98a6a); }
.dd-q { margin: 4px 0; }
.dd-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dd-opt { min-height: 64px; padding: 12px; border: 0; border-radius: 18px; cursor: pointer; font: 600 15.5px var(--f-body); color: var(--text); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.2s var(--spring), background 0.2s; }
.dd-opt:active, .dd-opt.on { transform: scale(0.96); background: rgba(240, 211, 138, 0.22); box-shadow: inset 0 0 0 1.5px #f0d38a; }
.dd-step { margin: 0; font-size: 12.5px; }
.dd-drum { font-size: 90px; animation: ddDrum 0.25s ease-in-out infinite alternate; }
@keyframes ddDrum { from { transform: rotate(-8deg) scale(0.96); } to { transform: rotate(8deg) scale(1.04); } }
.dd-meta { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.dd-partner { margin: 0; padding: 8px 12px; border-radius: 12px; background: rgba(240, 211, 138, 0.12); }
@media (prefers-reduced-motion: reduce) { .dd-drum, .dd-emoji.big { animation: none; } }
