/* ===== Tambayan + Chichat custom styles (plain CSS, works alongside Tailwind) ===== */

* { -webkit-tap-highlight-color: transparent; }
html.dark { color-scheme: dark; }            /* native selects, date pickers and scrollbars go dark too */

/* Autofilled inputs stay readable in dark mode (browsers paint them white/yellow otherwise) */
.dark input:-webkit-autofill,
.dark input:-webkit-autofill:hover,
.dark input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f5f5f5;
  -webkit-box-shadow: 0 0 0 1000px #1c1c1c inset;
  caret-color: #f5f5f5;
}
.dark select option { background: #1f1f1f; color: #f5f5f5; }

/* Scrollbars */
.thin-scroll::-webkit-scrollbar, body::-webkit-scrollbar { width: 8px; height: 8px; }
.thin-scroll::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb { background: rgba(115, 115, 115, .3); border-radius: 99px; }
.thin-scroll::-webkit-scrollbar-track { background: transparent; }
.thin-scroll { scrollbar-width: thin; scrollbar-color: rgba(115,115,115,.3) transparent; }

/* Entry animations */
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
/* 'backwards' (not 'both'): once finished the animation leaves no transform behind, so menus inside a post can
   use position:fixed (phone sheet) and aren't trapped under the next post */
.post-in, .comment-in { animation: popIn .25s ease-out backwards; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg-new { animation: msgIn .2s ease-out both; }

/* Reaction picker */
.react-picker {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 30;
  display: flex; gap: 2px; padding: 6px 8px; border-radius: 999px;
  background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0,0,0,.05);
  opacity: 0; visibility: hidden; transform: translateY(6px) scale(.9); transform-origin: bottom left;
  transition: opacity .15s, transform .15s, visibility 0s .15s;
}
.dark .react-picker { background: #262626; box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08); }
.react-wrap.open .react-picker { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
/* mouse: open on hover — phones use long-press instead (a tap would leave a "stuck" hover) */
@media (hover: hover) and (pointer: fine) {
  .react-wrap:hover .react-picker { opacity: 1; visibility: visible; transform: none; transition-delay: .35s, .35s, 0s; }
}
/* just reacted: close right away, even while the mouse is still over it */
.react-wrap.picked .react-picker { opacity: 0 !important; visibility: hidden !important; transform: translateY(6px) scale(.9) !important; transition: opacity .12s, transform .12s, visibility 0s .12s !important; }
[data-react-btn].rx-bump { animation: rxBump .35s ease-out; }
@keyframes rxBump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.react-picker button { font-size: 28px; line-height: 1; width: 40px; height: 40px; border-radius: 999px; transition: transform .15s; }
.react-picker button:hover { transform: translateY(-6px) scale(1.3); }
@media (max-width: 420px) { .react-picker button { width: 34px; height: 36px; font-size: 24px; } }

/* Toasts */
.toast { animation: popIn .2s ease-out both; pointer-events: auto; }
.toast-out { opacity: 0; transform: translateY(8px); transition: all .25s; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(0, 0, 0, .92); display: grid; place-items: center; padding: 24px; animation: popIn .15s ease-out; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }

/* Emoji popover */
.emoji-pop { position: fixed; z-index: 350; width: min(300px, calc(100vw - 16px)); padding: 10px; border-radius: 16px; background: #fff;
  box-shadow: 0 16px 40px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.05); display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; animation: popIn .15s ease-out; }
.dark .emoji-pop { background: #1f1f1f; box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08); }
.emoji-pop button { font-size: 22px; height: 34px; border-radius: 8px; }
.emoji-pop button:hover { background: rgba(14, 165, 233, .12); }

/* Online dot */
.online-dot { position: absolute; right: 1px; bottom: 1px; width: 14px; height: 14px; border-radius: 99px; background: #10b981; border: 3px solid #fff; }
.dark .online-dot { border-color: #111111; }

/* ================= Modals ================= */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); animation: fadeIn .15s ease-out; }
.modal-panel {
  position: relative; width: 100%; max-width: 520px; max-height: min(720px, calc(100dvh - 32px));
  background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.25);
  display: flex; flex-direction: column; overflow: hidden; animation: modalIn .2s ease-out;
}
.dark .modal-panel { background: #161616; box-shadow: 0 24px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.07); }
.pm-view { flex-direction: column; min-height: 0; flex: 1; }
.pm-view:not(.hidden) { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
/* Phones: modal becomes a full-height bottom sheet */
@media (max-width: 640px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal-panel { max-width: none; height: 100dvh; max-height: 100dvh; border-radius: 0; animation: sheetIn .22s ease-out; }
}
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
body.modal-open { overflow: hidden; }

.pm-radio { width: 22px; height: 22px; border-radius: 99px; border: 2px solid #a3a3a3; flex-shrink: 0; }
.pm-option.selected .pm-radio { border: 7px solid #0ea5e9; }
.pick-check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #a3a3a3; display: grid; place-items: center; color: transparent; font-size: 12px; flex-shrink: 0; }
.person-row.selected .pick-check { background: #0ea5e9; border-color: #0ea5e9; color: #fff; }
.person-row.excluded .pick-check { background: #f43f5e; border-color: #f43f5e; color: #fff; }

/* Toggle switch */
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #d4d4d4; transition: .2s; cursor: pointer; }
.dark .switch span { background: #404040; }
.switch span::before { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 99px; background: #fff; transition: .2s; }
.switch input:checked + span { background: #0ea5e9; }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }

/* ================= Chichat ================= */
#chichat:not(.has-chat) #ccInfo { display: none !important; }
#chichat.chat-open #ccList { display: none; }
#chichat.chat-open #ccChat { display: flex; }
@media (min-width: 768px) { #chichat.chat-open #ccList { display: flex; } }
@media (min-width: 1280px) { #chichat.info-closed #ccInfo { display: none; } }
@media (max-width: 1279px) {
  #chichat.info-open #ccInfo { display: flex; position: fixed; top: 56px; right: 0; bottom: 0; z-index: 40; width: min(360px, 100vw); box-shadow: -20px 0 40px rgba(0,0,0,.2); }
}

.bubble-mine { background: #0ea5e9; color: #fff; }
.bubble-mine a { color: #fff; }
.bubble-theirs { background: #f0f0f0; color: #171717; }
.dark .bubble-theirs { background: #262626; color: #f5f5f5; }

/* Typing dots */
.typing-dots { display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 20px; }
.typing-dots span { width: 7px; height: 7px; border-radius: 99px; background: #a3a3a3; animation: blink 1.2s infinite ease-in-out; }
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ================= Stories ================= */
.sv { position: fixed; inset: 0; z-index: 260; display: flex; align-items: center; justify-content: center; }
.sv.hidden { display: none; }
.sv-card { position: relative; width: 100%; height: 100dvh; background: #111; overflow: hidden; z-index: 10; }
@media (min-width: 640px) { .sv-card { width: auto; height: min(88dvh, 820px); aspect-ratio: 9 / 16; border-radius: 18px; } }
.sv-top { background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent); }
.sv-bottom { background: linear-gradient(to top, rgba(0,0,0,.6), transparent); }
.sv-btn { width: 36px; height: 36px; border-radius: 99px; display: grid; place-items: center; color: #fff; }
.sv-btn:hover { background: rgba(255,255,255,.15); }
.sv-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 20; width: 44px; height: 44px; border-radius: 99px;
  background: rgba(255,255,255,.12); color: #fff; display: none; place-items: center; }
.sv-nav:hover { background: rgba(255,255,255,.22); }
@media (min-width: 640px) { .sv-nav { display: grid; } .sv-nav[disabled] { opacity: .25; } }
.sv-bar { flex: 1; height: 3px; border-radius: 99px; background: rgba(255,255,255,.35); overflow: hidden; }
.sv-bar > i { display: block; height: 100%; width: 0; background: #fff; }
.sv-text { padding: 32px; color: #fff; font-weight: 700; font-size: clamp(22px, 5vw, 30px); line-height: 1.25; text-align: center; white-space: pre-wrap; word-break: break-word; }

/* Story bar on the feed */
.story-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.story-strip::-webkit-scrollbar { display: none; }
.story-card { position: relative; display: block; padding: 0; flex-shrink: 0; width: 112px; height: 190px; border-radius: 14px; overflow: hidden; background: #e5e5e5; text-align: left; }
.story-card > img:first-child { display: block; }
.dark .story-card { background: #262626; }
.story-card .sc-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.story-card:hover .sc-bg { transform: scale(1.04); }
.story-card .sc-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.25), transparent 35%, transparent 60%, rgba(0,0,0,.55)); }
.story-card .sc-snippet { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; color: #fff; font-weight: 700; font-size: 13px; text-align: center; line-height: 1.2; overflow: hidden; }
.story-card .sc-avatar { position: absolute; top: 8px; left: 8px; width: 38px; height: 38px; border-radius: 99px; padding: 2px; background: #0ea5e9; }
.story-card .sc-avatar.seen { background: #a3a3a3; }
.story-card .sc-avatar img { width: 100%; height: 100%; border-radius: 99px; object-fit: cover; border: 2px solid #fff; }
.story-card .sc-name { position: absolute; left: 8px; right: 8px; bottom: 8px; color: #fff; font-size: 12.5px; font-weight: 700; line-height: 1.15; }
.story-ring { padding: 2px; border-radius: 99px; background: #0ea5e9; }
.story-ring.seen { background: #a3a3a3; }
.story-ring > img { border: 2px solid #fff; }
.dark .story-ring > img { border-color: #111; }

/* Story creator */
.sc-stage { position: relative; width: min(100%, 280px); aspect-ratio: 9 / 16; max-height: 52dvh; border-radius: 16px; overflow: hidden; background: #0ea5e9; transition: background .2s; }
.sc-text { position: absolute; inset: 0; width: 100%; height: 100%; resize: none; background: transparent; border: 0; outline: 0; padding: 28px 18px; color: #fff;
  font-weight: 700; font-size: 22px; line-height: 1.25; text-align: center; display: flex; align-items: center; }
.sc-text::placeholder { color: rgba(255,255,255,.75); }
.sc-swatch { width: 30px; height: 30px; border-radius: 99px; outline: 2px solid transparent; outline-offset: 2px; }
.sc-swatch.active { outline-color: #0ea5e9; }

/* Notes (Chichat) */
.notes-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 34px 4px 6px; }
.notes-row::-webkit-scrollbar { display: none; }
.note-item { position: relative; flex-shrink: 0; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.note-bubble { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); width: max-content; max-width: 84px; padding: 5px 9px; border-radius: 14px;
  background: #fff; color: #171717; font-size: 11px; line-height: 1.2; box-shadow: 0 2px 10px rgba(0,0,0,.12); z-index: 2;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; text-align: center; }
.note-bubble.empty { color: #737373; }
.dark .note-bubble { background: #262626; color: #f5f5f5; box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.note-chip { display: inline-block; padding: 8px 14px; border-radius: 18px; background: #f0f0f0; color: #171717; font-size: 14px; word-break: break-word; }
.dark .note-chip { background: #262626; color: #f5f5f5; }
.note-item .note-name { font-size: 11px; color: #737373; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-btn.hidden { display: none; }

/* ================= v3: reactions, replies, chat heads ================= */
/* Message hover actions (react / unsend) */
.msg-actions { display: flex; align-self: center; opacity: 0; transition: opacity .15s; }
.group:hover > .msg-actions, .msg-actions:focus-within { opacity: 1; }
@media (pointer: coarse) { .msg-actions { display: none; } }
.msg-act { width: 32px; height: 32px; flex-shrink: 0; border-radius: 99px; display: grid; place-items: center; color: #a3a3a3; transition: background .15s, color .15s; }
.msg-act:hover { background: #f0f0f0; color: #525252; }
.dark .msg-act:hover { background: rgba(255,255,255,.07); color: #e5e5e5; }

/* Reaction badge under a bubble */
.rx-pill { position: relative; z-index: 2; margin-top: -10px; display: inline-flex; align-items: center; gap: 1px; height: 22px; padding: 0 6px; border-radius: 99px;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.16); font-size: 13px; line-height: 1; cursor: pointer; }
.rx-pill b { font-size: 11px; font-weight: 700; color: #525252; margin-left: 3px; }
.rx-pill.mine { box-shadow: 0 0 0 1.5px #0ea5e9, 0 1px 4px rgba(0,0,0,.12); }
.dark .rx-pill { background: #262626; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.dark .rx-pill.mine { box-shadow: 0 0 0 1.5px #38bdf8, 0 1px 4px rgba(0,0,0,.5); }
.dark .rx-pill b { color: #d4d4d4; }

/* Reaction picker popover (bar of 6 + ➕ → all emojis) */
.rx-pop { position: fixed; z-index: 420; display: flex; align-items: center; gap: 2px; padding: 5px 6px; border-radius: 999px; background: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.05); animation: popIn .15s ease-out; }
.dark .rx-pop { background: #262626; box-shadow: 0 12px 32px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); }
.rx-pop > button { width: 40px; height: 40px; border-radius: 99px; font-size: 26px; line-height: 1; transition: transform .12s; }
.rx-pop > button:hover { transform: translateY(-4px) scale(1.22); }
.rx-pop button.on { background: rgba(14,165,233,.16); }
.rx-pop .rx-plus { font-size: 15px; color: #525252; background: #f0f0f0; width: 34px; height: 34px; margin-left: 2px; }
.dark .rx-pop .rx-plus { background: rgba(255,255,255,.1); color: #e5e5e5; }
.rx-pop .rx-plus:hover { transform: none; background: #e5e5e5; }
.rx-pop.rx-full { display: block; width: min(320px, calc(100vw - 16px)); padding: 8px; border-radius: 18px; }
.rx-title { font-size: 13px; font-weight: 700; padding: 4px 6px 8px; }
.rx-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 240px; overflow-y: auto; }
.rx-grid button { height: 36px; border-radius: 8px; font-size: 22px; }
.rx-grid button:hover { background: rgba(14,165,233,.12); }
@media (max-width: 380px) { .rx-pop > button { width: 34px; height: 36px; font-size: 22px; } }

/* Story reactions */
.sv-react { display: flex; justify-content: center; gap: 4px; margin-bottom: 10px; }
.sv-react button { width: 42px; height: 42px; font-size: 28px; line-height: 1; border-radius: 99px; transition: transform .15s; }
.sv-react button:hover { transform: scale(1.25); }
.sv-react button.on { background: rgba(255,255,255,.22); }
.sv-float { position: absolute; bottom: 120px; z-index: 50; font-size: 40px; pointer-events: none; animation: svFloat 1.6s ease-out forwards; }
@keyframes svFloat { 0% { opacity: 0; transform: translateY(0) scale(.6); } 15% { opacity: 1; transform: translateY(-30px) scale(1.15); }
  100% { opacity: 0; transform: translateY(-340px) scale(1); } }

/* ================= Chat heads (floating bubbles) ================= */
#ccHeads { position: fixed; z-index: 240; top: 120px; right: 12px; display: flex; flex-direction: column; gap: 10px; touch-action: none; user-select: none; }
#ccHeads.left { right: auto; left: 12px; }
#ccHeads.dragging { transition: none; }
#ccHeads.snap { transition: left .25s ease, right .25s ease, top .25s ease; }
.ch-head { position: relative; width: 56px; height: 56px; border-radius: 99px; cursor: pointer; animation: headIn .3s cubic-bezier(.2,1.4,.4,1) both; }
.ch-head > img { width: 100%; height: 100%; border-radius: 99px; object-fit: cover; box-shadow: 0 6px 20px rgba(0,0,0,.25); border: 2px solid #fff; }
.dark .ch-head > img { border-color: #262626; }
.ch-head.active > img { box-shadow: 0 0 0 3px #0ea5e9, 0 6px 20px rgba(0,0,0,.25); }
.ch-badge { position: absolute; top: -3px; right: -3px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 99px; background: #f43f5e; color: #fff;
  font-size: 11px; font-weight: 800; line-height: 21px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.ch-x { position: absolute; top: -6px; left: -6px; width: 22px; height: 22px; border-radius: 99px; background: #404040; color: #fff; font-size: 11px;
  display: none; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
#ccHeads.left .ch-x { left: auto; right: -6px; }
@media (pointer: fine) { .ch-head:hover .ch-x { display: grid; } }
.ch-tip { position: absolute; top: 50%; right: calc(100% + 10px); transform: translateY(-50%); width: max-content; max-width: 220px; padding: 8px 12px; border-radius: 16px;
  background: #fff; color: #171717; font-size: 13px; line-height: 1.3; box-shadow: 0 8px 24px rgba(0,0,0,.18); pointer-events: none; animation: popIn .2s ease-out;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.ch-tip b { display: block; font-size: 12px; }
#ccHeads.left .ch-tip { right: auto; left: calc(100% + 10px); }
.dark .ch-tip { background: #262626; color: #f5f5f5; }
.ch-more { width: 56px; height: 28px; border-radius: 99px; background: rgba(23,23,23,.75); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
@keyframes headIn { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
.ch-bump { animation: headBump .45s ease; }
@keyframes headBump { 0%, 100% { transform: none; } 30% { transform: scale(1.15); } 60% { transform: scale(.95); } }

/* drop zone shown while dragging */
#ccDrop { position: fixed; z-index: 239; left: 50%; bottom: 36px; width: 64px; height: 64px; margin-left: -32px; border-radius: 99px; display: grid; place-items: center;
  background: rgba(23,23,23,.7); color: #fff; font-size: 22px; opacity: 0; transform: scale(.6); transition: .2s; pointer-events: none; }
#ccDrop.show { opacity: 1; transform: none; }
#ccDrop.hot { background: #f43f5e; transform: scale(1.18); }

/* Mini chat window */
#ccMini { position: fixed; z-index: 245; right: 84px; bottom: 16px; width: 340px; height: min(480px, calc(100dvh - 90px)); display: flex; flex-direction: column;
  background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.05); animation: modalIn .2s ease-out; }
#ccMini.hidden { display: none; }
#ccMini.left { right: auto; left: 84px; }
.dark #ccMini { background: #161616; box-shadow: 0 16px 48px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); }
@media (max-width: 640px) {
  #ccMini, #ccMini.left { left: 8px; right: 8px; width: auto; bottom: 8px; top: 84px; height: auto; border-radius: 18px; }
  body.mini-open #ccHeads { top: 12px !important; left: 8px !important; right: 8px !important; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  body.mini-open #ccHeads .ch-tip { display: none; }
}
.mini-msgs .bubble-mine, .mini-msgs .bubble-theirs { font-size: 14px; }
#ccMiniBack { display: none; }
@media (max-width: 640px) {
  body.mini-open #ccMiniBack { display: block; position: fixed; inset: 0; z-index: 238; background: rgba(0,0,0,.5); animation: fadeIn .15s ease-out; }
}

/* ================= v4: post menu sheet, specific friends, wordmark ================= */
.post-menu .menu-item { height: auto; min-height: 44px; padding-top: 8px; padding-bottom: 8px; align-items: center; }
.post-menu .menu-item > i { font-size: 17px; text-align: center; flex-shrink: 0; }
.post-menu .menu-item > span { display: flex; flex-direction: column; min-width: 0; font-weight: 600; }
.post-menu .menu-item small { font-size: 12px; font-weight: 400; color: #737373; line-height: 1.3; }
.dark .post-menu .menu-item small { color: #a3a3a3; }
.sheet-handle { display: none; }
/* Phones: the menu slides up from the bottom like Facebook's */
@media (max-width: 640px) {
  .post-menu:not(.hidden) { position: fixed; left: 0; right: 0; bottom: 0; top: auto; margin: 0; width: auto !important; z-index: 270;
    border-radius: 22px 22px 0 0; border: 0; padding: 6px 12px calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 0 0 100vmax rgba(0,0,0,.5); animation: sheetIn .2s ease-out; }
  .post-menu .sheet-handle { display: block; width: 40px; height: 4px; border-radius: 9px; background: #d4d4d4; margin: 6px auto 10px; }
  .dark .post-menu .sheet-handle { background: #525252; }
  .post-menu .menu-item { min-height: 56px; padding: 10px 12px; gap: 14px; font-size: 16px; border-radius: 14px; }
  .post-menu .menu-item > i { font-size: 20px; width: 26px; }
}
.person-row.allowed .pick-check { background: #10b981; border-color: #10b981; color: #fff; }

/* Animated wordmark: the T pops in like a sign, then "ambayan" follows */
.tb-word { display: inline-flex; align-items: center; gap: 1px; font-weight: 800; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.tb-t { position: relative; display: inline-grid; place-items: center; width: 1.08em; height: 1.08em; margin-right: .06em; border-radius: .3em;
  background: linear-gradient(145deg, #38bdf8, #0284c7); color: #fff; font-size: 1em; box-shadow: 0 .12em .3em rgba(2,132,199,.35);
  transform-origin: 50% 0; animation: tbDrop .7s cubic-bezier(.2,1.5,.4,1) both, tbSwing 7s ease-in-out 2.2s infinite; }
.tb-t::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: .12em; height: .07em; border-radius: 9px; background: rgba(255,255,255,.55);
  transform: scaleX(0); animation: tbLine .4s ease-out .55s forwards; }
.tb-rest { display: inline-flex; color: #0ea5e9; }
.dark .tb-rest { color: #38bdf8; }
.tb-rest > span { display: inline-block; opacity: 0; transform: translateX(-.35em); animation: tbIn .38s ease-out forwards; animation-delay: calc(.45s + var(--i) * .06s); }
.tb-word:hover .tb-t { animation: tbWiggle .6s ease-in-out; }
/* already played on this visit → no intro, just the idle swing */
.tb-seen .tb-t { animation: tbSwing 7s ease-in-out 2s infinite; }
.tb-seen .tb-t::after { animation: none; transform: none; }
.tb-seen .tb-rest > span { animation: none; opacity: 1; transform: none; }
.tb-seen .tb-word:hover .tb-t { animation: tbWiggle .6s ease-in-out; }
@keyframes tbDrop { 0% { opacity: 0; transform: translateY(-.8em) rotate(-25deg) scale(.6); } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes tbIn { to { opacity: 1; transform: none; } }
@keyframes tbLine { to { transform: scaleX(1); } }
@keyframes tbSwing { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-9deg); } 94% { transform: rotate(6deg); } 97% { transform: rotate(-3deg); } }
@keyframes tbWiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg) scale(1.06); } 55% { transform: rotate(9deg) scale(1.06); } 80% { transform: rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .tb-t, .tb-t::after, .tb-rest > span { animation: none !important; opacity: 1 !important; transform: none !important; } }
.tb-light .tb-t { background: #fff; color: #0284c7; box-shadow: 0 .12em .3em rgba(0,0,0,.18); }
.tb-light .tb-t::after { background: rgba(2,132,199,.35); }
.tb-light .tb-rest, .dark .tb-light .tb-rest { color: #fff; }

/* Privacy & safety page (Messenger-style lists) */
.priv-card { background: #fff; border-top: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5; margin-bottom: 10px; padding-bottom: 4px; }
.dark .priv-card { background: #161616; border-color: rgba(255,255,255,.07); }
@media (min-width: 640px) { .priv-card { border: 1px solid #e5e5e5; border-radius: 18px; margin-bottom: 16px; } .dark .priv-card { border-color: rgba(255,255,255,.07); } }
.priv-head { padding: 14px 16px 6px; font-size: 13px; font-weight: 700; color: #737373; text-transform: uppercase; letter-spacing: .04em; }
.priv-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 10px 16px; min-height: 64px; text-align: left; transition: background .15s; }
.priv-row:hover { background: #f5f5f5; }
.dark .priv-row:hover { background: rgba(255,255,255,.04); }
.priv-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 99px; display: grid; place-items: center; background: #f0f9ff; color: #0284c7; }
.dark .priv-icon { background: rgba(14,165,233,.12); color: #38bdf8; }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
/* an open ⋯ menu must sit above the next post (cards are stacking contexts because of their entry animation) */
.card:has(> * .dropdown-menu:not(.hidden)), .card:has(.dropdown-menu:not(.hidden)) { position: relative; z-index: 45; }

/* "Turn on notifications" card */
.push-ask { position: fixed; z-index: 230; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.2), 0 0 0 1px rgba(0,0,0,.05); animation: sheetIn .25s ease-out; }
.dark .push-ask { background: #1f1f1f; box-shadow: 0 16px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); }
@media (min-width: 641px) { .push-ask { left: 16px; right: auto; width: 360px; bottom: 16px; } }
.push-ask-icon { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: #0ea5e9; color: #fff; font-size: 18px; animation: tbWiggle 1.2s ease-in-out .4s 2; }

/* Notes: duration chips + friend's note viewer */
.nm-hour { height: 36px; border-radius: 10px; font-size: 13px; font-weight: 700; background: #f0f0f0; color: #525252; transition: .15s; }
.dark .nm-hour { background: rgba(255,255,255,.08); color: #d4d4d4; }
.nm-hour.active { background: #0ea5e9; color: #fff; }
.note-chip-lg { font-size: 16px; padding: 10px 16px; border-radius: 20px; max-width: 260px; position: relative; }
.note-chip-lg::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 99px; background: inherit; }
.nv-react { width: 44px; height: 44px; border-radius: 99px; font-size: 26px; line-height: 1; transition: transform .15s, background .15s; }
.nv-react:hover { transform: scale(1.2); background: rgba(14,165,233,.1); }
.nv-react.sent { animation: tbWiggle .6s ease-in-out; background: rgba(14,165,233,.16); }

/* Notes: duration chips + friend's note viewer */
.nm-hour { height: 36px; border-radius: 10px; font-size: 13px; font-weight: 700; background: #f0f0f0; color: #525252; transition: .15s; }
.dark .nm-hour { background: rgba(255,255,255,.08); color: #d4d4d4; }
.nm-hour.active { background: #0ea5e9; color: #fff; }
.note-chip-lg { font-size: 16px; padding: 10px 16px; border-radius: 20px; max-width: 260px; position: relative; }
.nv-react { width: 44px; height: 44px; border-radius: 99px; font-size: 26px; line-height: 1; transition: transform .15s, background .15s; }
.nv-react:hover { transform: scale(1.2); background: rgba(14,165,233,.1); }
.nv-react.sent { animation: tbWiggle .6s ease-in-out; background: rgba(14,165,233,.16); }

/* ================= v7: replies, conversation menu, refresh & offline ================= */
/* reply bar above the Chichat composer */
.reply-bar { display: flex; align-items: center; gap: 10px; margin: 0 4px 8px; padding: 8px 6px 8px 12px; border-radius: 14px; border-left: 3px solid #0ea5e9; background: #f5f5f5; }
.reply-bar.hidden { display: none; }
.dark .reply-bar { background: rgba(255,255,255,.06); }
/* quoted message above a reply */
.reply-label { font-size: 11px; color: #737373; padding: 0 6px; width: 100%; }
.reply-quote { max-width: 100%; margin-bottom: -10px; padding: 7px 12px 16px; border-radius: 16px; font-size: 13px; line-height: 1.3; text-align: left;
  color: #525252; background: #ececec; opacity: .9; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; word-break: break-word; }
.dark .reply-quote { background: #1f1f1f; color: #a3a3a3; }
.reply-quote.mine { background: rgba(14,165,233,.18); color: #0369a1; }
.dark .reply-quote.mine { background: rgba(14,165,233,.16); color: #7dd3fc; }
.reply-quote.mini { margin-bottom: -8px; padding: 5px 10px 12px; font-size: 12px; }
.msg-flash { animation: msgFlash 1.5s ease; border-radius: 18px; }
@keyframes msgFlash { 0%, 60% { background: rgba(14,165,233,.18); } 100% { background: transparent; } }
[data-mid] { position: relative; }
[data-mid].swipe-ready::before { content: '\f3e5'; font: var(--fa-font-solid); position: absolute; left: -26px; top: 50%; transform: translateY(-50%); color: #0ea5e9; }

/* ⋯ on each chat in the list */
.conv-more { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 99px; display: grid; place-items: center;
  color: #525252; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.15); opacity: 0; transition: opacity .15s; }
.dark .conv-more { background: #262626; color: #e5e5e5; }
.conv-row:hover .conv-more, .conv-more:focus-visible { opacity: 1; }
@media (pointer: coarse) { .conv-more { display: none; } }
.conv-menu { z-index: 280; }

/* Splash when refreshing: the T tile bounces + spins, the name and a loading bar follow */
@keyframes tbsHop { 0%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-14px) scale(1.04, .96); } 55% { transform: translateY(0) scale(1.06, .94); } 70% { transform: scale(.98, 1.02); } }
@keyframes tbsSpin { 0%, 45% { transform: rotateY(0); } 75%, 100% { transform: rotateY(360deg); } }
@keyframes tbsBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

/* thin loading bar at the very top when you open another page */
#tbProgress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 1001; background: linear-gradient(90deg, #38bdf8, #0284c7); box-shadow: 0 0 8px rgba(14,165,233,.6); opacity: 0; }
#tbProgress.run { opacity: 1; animation: tbProg 8s cubic-bezier(.1,.7,.2,1) forwards; }
@keyframes tbProg { 0% { width: 0; } 20% { width: 45%; } 100% { width: 92%; } }

/* pull to refresh (phones) */
@media (pointer: coarse) { html { overscroll-behavior-y: none; } }
/* pull down from the top: the Tambayan "T" tile (same hop + flip as the old splash) */
#tbPull { position: fixed; top: 0; left: 50%; z-index: 990; width: 48px; height: 48px; display: grid; place-items: center;
  transform: translate(-50%, -64px); opacity: 0; pointer-events: none; perspective: 240px; }
#tbPull .tbp-tile { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(145deg, #38bdf8, #0284c7);
  box-shadow: 0 10px 24px rgba(2,132,199,.38); filter: saturate(.55) brightness(1.08); transition: filter .2s; }
#tbPull .tbp-t { display: block; font-weight: 800; font-size: 28px; line-height: 1; color: #fff; }
#tbPull.ready .tbp-tile, #tbPull.spin .tbp-tile { filter: none; }
#tbPull.spin { transition: transform .25s, opacity .2s; }
#tbPull.spin .tbp-tile { animation: tbsHop 1.1s cubic-bezier(.3,1.4,.5,1) infinite; }
#tbPull.spin .tbp-t { animation: tbsSpin 1.1s ease-in-out infinite; }

/* "No internet connection" / "Back online" bar at the top */
#tbNet { position: fixed; top: 0; left: 0; right: 0; z-index: 999; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px; color: #fff; font-size: 14px; transform: translateY(-110%); transition: transform .3s ease; }
#tbNet.show { transform: none; }
#tbNet.off { background: #404040; }
#tbNet.on { background: #10b981; }
#tbNet span { display: flex; flex-direction: column; line-height: 1.2; }
#tbNet small { font-size: 12px; opacity: .85; }
#tbNet small:empty { display: none; }
#tbNet.off i { animation: tbWiggle 1s ease-in-out 2; }
@media (prefers-reduced-motion: reduce) { #tbPull .tbp-tile, #tbPull .tbp-t { animation: none !important; } }

/* ================= v8: Marketplace ================= */
.mk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
@media (min-width: 640px) { .mk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 14px; } }
@media (min-width: 1024px) { .mk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .mk-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.mk-card { display: block; min-width: 0; }
.mk-thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #e5e5e5; }
.dark .mk-thumb { background: #1f1f1f; }
.mk-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.mk-card:hover .mk-thumb img { transform: scale(1.04); }
.mk-noimg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: #a3a3a3; }
.mk-badge { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 800; }
.mk-count { position: absolute; left: 8px; bottom: 8px; display: inline-flex; gap: 4px; align-items: center; padding: 2px 7px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 700; }
.mk-save { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 99px; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #404040; box-shadow: 0 2px 8px rgba(0,0,0,.15); transition: transform .15s; }
.mk-save:hover { transform: scale(1.1); }
.mk-save.on { color: #f43f5e; }
.dark .mk-save { background: rgba(23,23,23,.85); color: #e5e5e5; }
.dark .mk-save.on { color: #fb7185; }

.mk-side { width: 100%; display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 12px; font-weight: 600; font-size: 15px; text-align: left; transition: background .15s; }
.mk-side:hover { background: #f5f5f5; }
.dark .mk-side:hover { background: rgba(255,255,255,.05); }
.mk-side > span { width: 36px; height: 36px; flex-shrink: 0; border-radius: 99px; display: grid; place-items: center; background: #f0f0f0; font-size: 14px; color: #404040; }
.dark .mk-side > span { background: rgba(255,255,255,.08); color: #e5e5e5; }
.mk-side.active { background: #f0f9ff; color: #0369a1; }
.mk-side.active > span { background: #0ea5e9; color: #fff; }
.dark .mk-side.active { background: rgba(14,165,233,.12); color: #7dd3fc; }
.mk-pill { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; font-size: 14px; font-weight: 600;
  background: #f0f0f0; color: #404040; white-space: nowrap; transition: background .15s; }
.dark .mk-pill { background: rgba(255,255,255,.08); color: #e5e5e5; }
.mk-pill.active { background: #0ea5e9; color: #fff; }

/* sell modal */
.mk-add, .mk-ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; }
.mk-add { display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; border: 2px dashed #cbd5e1; color: #0284c7; background: #f0f9ff; }
.dark .mk-add { border-color: rgba(255,255,255,.15); background: rgba(14,165,233,.08); color: #38bdf8; }
.mk-add.hidden { display: none; }
.mk-ph img { width: 100%; height: 100%; object-fit: cover; }
.mk-ph button { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 99px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; }
.mk-cover { position: absolute; left: 5px; bottom: 5px; padding: 1px 7px; border-radius: 6px; background: #0ea5e9; color: #fff; font-size: 10px; font-weight: 800; }
.mk-chip span { display: grid; place-items: center; height: 38px; border-radius: 10px; font-size: 13px; font-weight: 600; background: #f0f0f0; cursor: pointer; transition: .15s; }
.dark .mk-chip span { background: rgba(255,255,255,.08); }
.mk-chip input:checked + span { background: #0ea5e9; color: #fff; }

/* item page gallery */
.mk-gallery { background: #0a0a0a; }
.mk-stage { position: relative; height: min(72vh, 620px); display: grid; place-items: center; background: #0a0a0a; }
@media (max-width: 1023px) { .mk-stage { height: min(60vh, 520px); } }
.mk-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mk-stage > a, .mk-stage > button, .mk-stage > span { z-index: 2; }
.mk-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 99px; background: rgba(255,255,255,.88); color: #171717; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
@media (pointer: coarse) { .mk-nav { display: none; } }
.mk-pos { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); padding: 2px 10px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 700; }
.mk-tn { width: 64px; height: 64px; flex-shrink: 0; border-radius: 8px; overflow: hidden; opacity: .55; outline: 2px solid transparent; outline-offset: 1px; transition: .15s; }
.mk-tn img { width: 100%; height: 100%; object-fit: cover; }
.mk-tn.on { opacity: 1; outline-color: #0ea5e9; }

/* item card inside Chichat */
.chat-listing { display: flex; width: 260px; max-width: 100%; gap: 10px; padding: 8px; border-radius: 16px; border: 1px solid #e5e5e5; background: #fff; text-align: left; }
.dark .chat-listing { border-color: rgba(255,255,255,.1); background: #1a1a1a; }
.chat-listing img, .chat-listing .ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #e5e5e5; display: grid; place-items: center; color: #a3a3a3; }

/* =========================================================
   v9 — Pages
   ========================================================= */
.pg-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (max-width: 520px) { .pg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.pg-card-cover { display: block; height: 96px; background: linear-gradient(135deg, #38bdf8, #0284c7 60%, #0c4a6e); background-size: cover; background-position: center; }
.pg-cover-fallback { background: linear-gradient(135deg, #7dd3fc, #0ea5e9 45%, #0369a1); }
.dark .pg-cover-fallback { background: linear-gradient(135deg, #0c4a6e, #075985 50%, #0b1220); }
.pg-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 250px; border-radius: 16px;
  border: 2px dashed #bae6fd; background: rgba(240,249,255,.6); transition: background .15s, border-color .15s; }
.pg-slot:hover { background: #f0f9ff; border-color: #38bdf8; }
.dark .pg-slot { border-color: rgba(56,189,248,.25); background: rgba(14,165,233,.05); }
.dark .pg-slot:hover { background: rgba(14,165,233,.1); }
.pg-limit { padding: 0 4px; font-size: 13px; color: #737373; display: grid; gap: 6px; }
.pg-limit-bar { height: 6px; border-radius: 99px; background: #e5e5e5; overflow: hidden; }
.dark .pg-limit-bar { background: rgba(255,255,255,.1); }
.pg-limit-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #38bdf8, #0284c7); }
.pg-stat { border-radius: 12px; background: #f5f5f5; padding: 10px 4px; display: grid; }
.dark .pg-stat { background: rgba(255,255,255,.05); }
.pg-stat b { font-size: 18px; line-height: 1.2; }
.pg-stat span { font-size: 11px; color: #737373; font-weight: 600; }

/* create / edit modal preview */
.pg-edit-cover { display: block; height: 140px; cursor: pointer; position: relative; background: linear-gradient(135deg, #7dd3fc, #0ea5e9 45%, #0369a1); background-size: cover; background-position: center; }
.pg-edit-hint { position: absolute; right: 12px; bottom: 12px; display: inline-flex; gap: 6px; align-items: center; height: 32px; padding: 0 12px; border-radius: 10px;
  background: rgba(255,255,255,.92); color: #262626; font-size: 13px; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.pg-edit-cover.has-img .pg-edit-hint { font-size: 0; gap: 0; width: 32px; padding: 0; justify-content: center; }
.pg-edit-cover.has-img .pg-edit-hint i { font-size: 13px; }
.pg-edit-avatar { position: absolute; left: 16px; bottom: -40px; width: 88px; height: 88px; cursor: pointer; }
.pg-edit-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; box-shadow: 0 0 0 4px #fff; background: #fff; }
.dark .pg-edit-avatar img { box-shadow: 0 0 0 4px #161616; }
.pg-edit-cam { position: absolute; right: -6px; bottom: -6px; width: 32px; height: 32px; border-radius: 99px; display: grid; place-items: center; font-size: 13px;
  background: #e5e5e5; color: #262626; box-shadow: 0 0 0 3px #fff; }
.dark .pg-edit-cam { background: #262626; color: #e5e5e5; box-shadow: 0 0 0 3px #161616; }
.pg-more summary { list-style: none; }
.pg-more summary::-webkit-details-marker { display: none; }

/* invite friends */
.pg-inv-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; transition: background .15s; }
.pg-inv-row:hover { background: #f5f5f5; }
.dark .pg-inv-row:hover { background: rgba(255,255,255,.05); }
.pg-inv-row img { width: 44px; height: 44px; border-radius: 99px; object-fit: cover; flex-shrink: 0; }
.pg-inv-row:disabled { opacity: .55; }
.pg-check { width: 24px; height: 24px; border-radius: 99px; border: 2px solid #d4d4d4; display: grid; place-items: center; font-size: 12px; color: #fff; flex-shrink: 0; }
.pg-inv-row.on .pg-check, .pg-inv-row:disabled .pg-check { background: #0ea5e9; border-color: #0ea5e9; }
.pg-side { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 12px; transition: background .15s; }
.pg-side:hover { background: #f5f5f5; }
.dark .pg-side:hover { background: rgba(255,255,255,.05); }
.pg-side img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }

/* =========================================================
   v10 — Developer team
   ========================================================= */
.dev-badge { display: inline-flex; align-items: center; justify-content: center; gap: 4px; margin-left: 4px; vertical-align: middle; border-radius: 99px;
  background: #0ea5e9; color: #fff; font-weight: 700; line-height: 1; }
.dev-badge-xs { width: 15px; height: 15px; font-size: 7px; }
.dev-badge-sm { width: 17px; height: 17px; font-size: 8px; }
.dev-badge-lg { height: 24px; padding: 0 10px; font-size: 12px; margin-left: 0; gap: 6px; }
.dev-chip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.dev-stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
@media (max-width: 520px) { .dev-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.dev-stat { display: flex; align-items: center; gap: 12px; padding: 14px; min-width: 0; }
.dev-stat-i { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: #f0f9ff; color: #0284c7; }
.dark .dev-stat-i { background: rgba(14,165,233,.12); color: #7dd3fc; }
@media (max-width: 520px) { .dev-stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; } .dev-stat-i { width: 34px; height: 34px; border-radius: 10px; } }
.dev-bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; }
.dev-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; padding-bottom: 18px; }
.dev-bar-fill { width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px; min-height: 3px; transition: opacity .15s; }
.dev-bar:hover .dev-bar-fill { opacity: .75; }
.dev-bar-n { font-size: 10px; font-weight: 700; color: #737373; margin-bottom: 2px; }
.dev-bar-l { position: absolute; bottom: 0; font-size: 10px; color: #a3a3a3; white-space: nowrap; }
.dev-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; min-width: 0; }
.dev-row + .dev-row { border-top: 1px solid rgba(0,0,0,.06); }
.dark .dev-row + .dev-row { border-top-color: rgba(255,255,255,.06); }

/* =========================================================
   v11 — @mentions, #hashtags, memories, Chichat voice / stickers / GIFs / polls / edit
   ========================================================= */
a.mention, a.hashtag { color: #0284c7; font-weight: 600; }
a.mention:hover, a.hashtag:hover { text-decoration: underline; }
.dark a.mention, .dark a.hashtag { color: #7dd3fc; }
a.mention { background: rgba(14,165,233,.1); border-radius: 6px; padding: 0 3px; }
.dark a.mention { background: rgba(14,165,233,.16); }

/* memories */
.memory-card { border-color: rgba(14,165,233,.35) !important; background: linear-gradient(120deg, #f0f9ff, #fff 60%); }
.dark .memory-card { background: linear-gradient(120deg, rgba(14,165,233,.14), #161616 60%); }
.memory-icon { width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-size: 20px; color: #fff;
  background: linear-gradient(135deg, #38bdf8, #0369a1); box-shadow: 0 6px 16px -6px rgba(2,132,199,.6); }
.memory-hero { color: #fff; border: 0 !important; background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.25), transparent 40%), linear-gradient(135deg, #0ea5e9, #0369a1 55%, #1e3a8a); }

/* @mention autocomplete */
.ck-mention-box { position: fixed; z-index: 460; max-height: 300px; overflow-y: auto; padding: 6px; border-radius: 16px; background: #fff;
  box-shadow: 0 16px 40px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.05); animation: ckPop .14s ease-out; }
.dark .ck-mention-box { background: #232323; box-shadow: 0 16px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); }
.ck-mention-box button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; text-align: left; font-size: 14px; }
.ck-mention-box button.on, .ck-mention-box button:hover { background: #f0f9ff; }
.dark .ck-mention-box button.on, .dark .ck-mention-box button:hover { background: rgba(14,165,233,.14); }
.ck-mention-box img, .ck-all { width: 34px; height: 34px; border-radius: 99px; object-fit: cover; flex-shrink: 0; }
.ck-all { display: grid; place-items: center; background: #0ea5e9; color: #fff; font-size: 14px; }
.ck-mention { font-weight: 700; }
.bubble-mine .ck-mention { color: #fff; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.bubble-theirs .ck-mention { color: #0284c7; }
.dark .bubble-theirs .ck-mention { color: #7dd3fc; }
.ck-mentioned { box-shadow: 0 0 0 2px #38bdf8, 0 0 18px -4px rgba(56,189,248,.8); }
@keyframes ckPop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }

/* composer tools */
.cc-tool { width: 38px; height: 40px; flex-shrink: 0; border-radius: 99px; display: grid; place-items: center; color: #0284c7; transition: background .15s, transform .15s; }
.dark .cc-tool { color: #38bdf8; }
.cc-tool:hover { background: #f0f9ff; }
.dark .cc-tool:hover { background: rgba(255,255,255,.06); }
.cc-tool:active { transform: scale(.9); }
.cc-tool.hidden { display: none; }
.cc-more { display: none; }
.cc-tools { transition: max-width .22s ease, opacity .18s; max-width: 220px; overflow: hidden; }
#ccForm.cc-typing:not(.cc-expand) .cc-tools { max-width: 0; opacity: 0; }
#ccForm.cc-typing:not(.cc-expand) .cc-more { display: grid; animation: ckPop .18s ease-out; }
#ccReply.editing { background: #fffbeb; }
.dark #ccReply.editing { background: rgba(245,158,11,.1); }
.ck-recording [data-ck-row] { display: none !important; }

/* voice recorder */
.ck-rec { display: flex; align-items: center; gap: 6px; animation: ckRecIn .28s cubic-bezier(.2,.9,.3,1.2); transform-origin: left center; }
.ck-rec.out { animation: ckRecOut .2s ease-in forwards; }
@keyframes ckRecIn { from { opacity: 0; transform: scaleX(.3); } to { opacity: 1; transform: none; } }
@keyframes ckRecOut { to { opacity: 0; transform: translateY(8px) scale(.96); } }
.ck-rec-x, .ck-rec-stop, .ck-rec-play { width: 40px; height: 40px; flex-shrink: 0; border-radius: 99px; display: grid; place-items: center; transition: transform .15s, background .15s; }
.ck-rec-x { color: #e11d48; }
.ck-rec-x:hover { background: #fff1f2; }
.dark .ck-rec-x:hover { background: rgba(225,29,72,.12); }
.ck-rec-bar { flex: 1; min-width: 0; height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 10px; border-radius: 99px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(90deg, #0ea5e9, #0284c7); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.ck-rec-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%); background-size: 250% 100%; animation: ckShine 2.4s linear infinite; pointer-events: none; }
.ck-rec.done .ck-rec-bar::after { display: none; }
@keyframes ckShine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.ck-rec-dot { width: 10px; height: 10px; flex-shrink: 0; border-radius: 99px; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: ckDot 1.1s ease-in-out infinite; }
.ck-rec.done .ck-rec-dot { display: none; }
.ck-rec.ending .ck-rec-bar { background: linear-gradient(90deg, #f97316, #e11d48); }
@keyframes ckDot { 0%, 100% { transform: scale(.85); box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 50% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(255,255,255,0); } }
.ck-rec-wave { flex: 1; min-width: 0; height: 26px; display: flex; align-items: center; justify-content: flex-end; gap: 2px; overflow: hidden; }
.ck-rec-wave span { width: 3px; flex-shrink: 0; border-radius: 3px; background: rgba(255,255,255,.95); animation: ckBar .22s cubic-bezier(.2,.9,.3,1.4); transform-origin: center; }
.ck-rec-wave.full { justify-content: space-between; }
.ck-rec-wave.full span { flex: 1; max-width: 4px; background: rgba(255,255,255,.5); animation: none; }
.ck-rec-wave.full span.on { background: #fff; }
@keyframes ckBar { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.ck-rec-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; min-width: 34px; text-align: right; }
.ck-rec-play { width: 30px; height: 30px; background: rgba(255,255,255,.22); color: #fff; font-size: 12px; }
.ck-rec-stop { color: #0284c7; }
.dark .ck-rec-stop { color: #38bdf8; }
.ck-rec-stop:hover { background: #f0f9ff; }
.dark .ck-rec-stop:hover { background: rgba(255,255,255,.06); }
.ck-rec-send { width: 42px; height: 42px; flex-shrink: 0; border-radius: 99px; display: grid; place-items: center; color: #fff; position: relative;
  background: #0ea5e9; box-shadow: 0 6px 16px -6px rgba(14,165,233,.8); transition: transform .15s; }
.ck-rec-send:active { transform: scale(.9); }
.ck-rec-send i { position: relative; z-index: 1; }
.ck-ring { position: absolute; inset: 0; border-radius: 99px; border: 2px solid #38bdf8; animation: ckRing 1.6s ease-out infinite; }
.ck-ring.r2 { animation-delay: .8s; }
.ck-rec.done .ck-ring { display: none; }
@keyframes ckRing { from { transform: scale(1); opacity: .8; } to { transform: scale(1.7); opacity: 0; } }
.ck-rec.sent .ck-rec-send { animation: ckFly .3s ease-in forwards; }
@keyframes ckFly { to { transform: translate(14px, -18px) rotate(-20deg) scale(.6); opacity: 0; } }

/* voice message bubble */
.ck-voice { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 22px; width: 250px; max-width: 100%; background: #f0f0f0; color: #171717; }
.dark .ck-voice { background: #262626; color: #f5f5f5; }
.ck-voice.mine { background: #0ea5e9; color: #fff; }
.ck-voice.compact { width: 200px; padding: 6px 10px 6px 6px; gap: 6px; }
.ck-vbtn { width: 34px; height: 34px; flex-shrink: 0; border-radius: 99px; display: grid; place-items: center; font-size: 13px; background: #fff; color: #0284c7; transition: transform .15s; }
.ck-voice.mine .ck-vbtn { color: #0284c7; }
.dark .ck-voice:not(.mine) .ck-vbtn { background: #0ea5e9; color: #fff; }
.ck-vbtn:active { transform: scale(.9); }
.ck-voice.playing .ck-vbtn { box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
.ck-wave { flex: 1; min-width: 0; height: 28px; position: relative; cursor: pointer; }
.ck-bars { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; }
.ck-bars span { flex: 1; max-width: 4px; border-radius: 3px; background: currentColor; opacity: .35; }
.ck-fill { clip-path: inset(0 100% 0 0); }
.ck-fill span { opacity: 1; }
.ck-voice.playing .ck-fill span { animation: ckWave 1s ease-in-out infinite alternate; }
.ck-voice.playing .ck-fill span:nth-child(3n) { animation-delay: .2s; }
.ck-voice.playing .ck-fill span:nth-child(3n+1) { animation-delay: .4s; }
@keyframes ckWave { from { transform: scaleY(.85); } to { transform: scaleY(1.08); } }
.ck-vtime { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 30px; text-align: right; }
.ck-rate { height: 22px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 800; background: rgba(0,0,0,.08); }
.ck-voice.mine .ck-rate, .dark .ck-rate { background: rgba(255,255,255,.2); }

/* stickers */
.ck-sticker { display: inline-flex; flex-direction: column; align-items: center; user-select: none; }
.ck-st-emo { display: block; line-height: 1; filter: drop-shadow(0 6px 8px rgba(0,0,0,.18)); }
.ck-st-cap { margin-top: 4px; padding: 1px 9px; border-radius: 99px; font-weight: 900; letter-spacing: .02em; white-space: nowrap;
  background: #fff; color: #0c4a6e; box-shadow: 0 2px 0 #0ea5e9, 0 4px 10px rgba(0,0,0,.12); transform: rotate(-3deg); }
.dark .ck-st-cap { background: #0c4a6e; color: #e0f2fe; box-shadow: 0 2px 0 #38bdf8, 0 4px 10px rgba(0,0,0,.4); }
.ck-lg .ck-st-emo { font-size: 84px; } .ck-lg .ck-st-cap { font-size: 15px; }
.ck-md .ck-st-emo { font-size: 60px; } .ck-md .ck-st-cap { font-size: 12px; }
.ck-sm .ck-st-emo { font-size: 40px; } .ck-sm .ck-st-cap { font-size: 10px; padding: 0 6px; }
.ck-anim-wave .ck-st-emo { animation: stWave 1.4s ease-in-out infinite; transform-origin: 70% 80%; }
.ck-anim-beat .ck-st-emo { animation: stBeat 1.1s ease-in-out infinite; }
.ck-anim-shake .ck-st-emo { animation: stShake .9s ease-in-out infinite; }
.ck-anim-drip .ck-st-emo { animation: stDrip 1.6s ease-in-out infinite; }
.ck-anim-pop .ck-st-emo { animation: stPop 1.5s cubic-bezier(.2,.9,.3,1.4) infinite; }
.ck-anim-tilt .ck-st-emo { animation: stTilt 2s ease-in-out infinite; }
.ck-anim-bounce .ck-st-emo { animation: stBounce 1s cubic-bezier(.3,0,.4,1) infinite; }
.ck-anim-flicker .ck-st-emo { animation: stFlicker 1.2s ease-in-out infinite; transform-origin: bottom; }
.ck-anim-float .ck-st-emo { animation: stFloat 2.4s ease-in-out infinite; }
.ck-anim-fly .ck-st-emo { animation: stFly 1.8s ease-in-out infinite; }
@keyframes stWave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(18deg); } 20%, 40% { transform: rotate(-10deg); } }
@keyframes stBeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(.96); } 45% { transform: scale(1.1); } }
@keyframes stShake { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-4px) rotate(-6deg); } 75% { transform: translateX(4px) rotate(6deg); } }
@keyframes stDrip { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px) scaleY(.94); } }
@keyframes stPop { 0%, 100% { transform: scale(1); } 20% { transform: scale(1.22); } 40% { transform: scale(.94); } 55% { transform: scale(1); } }
@keyframes stTilt { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes stBounce { 0%, 100% { transform: translateY(0) scaleY(1); } 40% { transform: translateY(-14px) scaleY(1.04); } 80% { transform: translateY(0) scaleY(.92); } }
@keyframes stFlicker { 0%, 100% { transform: scale(1, 1); } 25% { transform: scale(.95, 1.08); } 50% { transform: scale(1.04, .95); } 75% { transform: scale(.97, 1.05); } }
@keyframes stFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes stFly { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(6px, -10px) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .ck-st-emo { animation: none !important; } }

/* GIF */
.ck-gif { max-width: 240px; max-height: 260px; border-radius: 18px; object-fit: cover; background: #e5e5e5; cursor: zoom-in; }
.dark .ck-gif { background: #262626; }
.ck-gif.compact { max-width: 180px; max-height: 190px; }

/* polls */
.ck-poll { width: 280px; max-width: 100%; padding: 12px; border-radius: 20px; background: #fff; border: 1px solid #e5e5e5; color: #171717; }
.dark .ck-poll { background: #1c1c1c; border-color: rgba(255,255,255,.1); color: #f5f5f5; }
.ck-poll.compact { width: 220px; padding: 10px; }
.ck-poll-head { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #0284c7; }
.dark .ck-poll-head { color: #7dd3fc; }
.ck-poll-ic { width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center; background: linear-gradient(135deg, #38bdf8, #0284c7); color: #fff; font-size: 11px; }
.ck-poll-q { font-weight: 800; font-size: 16px; line-height: 1.25; margin: 6px 0 10px; word-break: break-word; }
.ck-poll-opts { display: grid; gap: 6px; }
.ck-opt { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 10px; border-radius: 12px; text-align: left;
  background: #f5f5f5; transition: transform .12s; }
.dark .ck-opt { background: rgba(255,255,255,.06); }
.ck-opt:active { transform: scale(.98); }
.ck-opt.busy { opacity: .6; }
.ck-opt-bar { position: absolute; inset: 0 auto 0 0; background: rgba(14,165,233,.16); transition: width .45s cubic-bezier(.2,.9,.3,1); }
.ck-opt.lead .ck-opt-bar { background: rgba(14,165,233,.28); }
.ck-opt > :not(.ck-opt-bar) { position: relative; }
.ck-opt-check { width: 20px; height: 20px; flex-shrink: 0; border-radius: 99px; border: 2px solid #a3a3a3; display: grid; place-items: center; font-size: 10px; color: transparent; transition: .15s; }
.ck-opt.mine .ck-opt-check { background: #0ea5e9; border-color: #0ea5e9; color: #fff; transform: scale(1.05); }
.ck-opt-text { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; word-break: break-word; }
.ck-opt-who { display: flex; }
.ck-opt-who img { width: 18px; height: 18px; border-radius: 99px; object-fit: cover; margin-left: -5px; box-shadow: 0 0 0 2px #fff; }
.dark .ck-opt-who img { box-shadow: 0 0 0 2px #1c1c1c; }
.ck-opt-n { font-size: 13px; font-weight: 800; min-width: 12px; text-align: right; }
.ck-poll-foot { margin-top: 8px; font-size: 12px; color: #737373; }

/* sheets (picker, poll creator, long-press actions) */
.ck-sheet-wrap { position: fixed; inset: 0; z-index: 400; }
.ck-sheet-back { position: absolute; inset: 0; background: rgba(0,0,0,.4); animation: fadeIn .15s ease-out; }
.ck-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 80dvh; overflow-y: auto; background: #fff; border-radius: 22px 22px 0 0;
  padding-bottom: env(safe-area-inset-bottom); animation: sheetIn .22s ease-out; }
.dark .ck-sheet { background: #1c1c1c; }
.ck-sheet-wrap.out .ck-sheet { animation: ckSheetOut .18s ease-in forwards; }
.ck-sheet-wrap.out .ck-sheet-back { opacity: 0; transition: opacity .18s; }
@keyframes ckSheetOut { to { transform: translateY(100%); } }
@media (min-width: 640px) {
  .ck-sheet-wrap.poll .ck-sheet, .ck-sheet-wrap.actions .ck-sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 420px; border-radius: 22px; transform: translate(-50%, -50%); animation: ckPopC .18s ease-out; }
  .ck-sheet-wrap.pop .ck-sheet-back { background: transparent; }
  .ck-sheet-wrap.pop .ck-sheet { right: auto; bottom: auto; width: 360px; border-radius: 20px; box-shadow: 0 18px 50px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.05); animation: ckPop .16s ease-out; }
  .dark .ck-sheet-wrap.pop .ck-sheet { box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); }
}
@keyframes ckPopC { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%); } }
.ck-sheet-wrap.actions { z-index: 410; }
.ck-sheet-wrap.actions .ck-sheet-back { background: rgba(0,0,0,.25); }
.ck-pick-tabs { display: flex; gap: 6px; padding: 10px 12px 6px; }
.ck-pick-tabs button { flex: 1; height: 36px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 14px; background: #f5f5f5; }
.dark .ck-pick-tabs button { background: rgba(255,255,255,.07); }
.ck-pick-tabs button.on { background: #0ea5e9; color: #fff; }
.ck-gif-badge { font-size: 9px; font-weight: 900; padding: 1px 4px; border-radius: 4px; border: 1.5px solid currentColor; }
.ck-pick-body { padding: 6px 12px 12px; height: 340px; overflow-y: auto; }
.ck-st-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ck-st-grid button { padding: 8px 2px; border-radius: 14px; transition: background .15s, transform .15s; }
.ck-st-grid button:hover { background: #f0f9ff; transform: scale(1.06); }
.dark .ck-st-grid button:hover { background: rgba(255,255,255,.06); }
.ck-gif-grid { columns: 2; column-gap: 6px; }
.ck-gif-grid button { display: block; width: 100%; margin-bottom: 6px; border-radius: 10px; overflow: hidden; background: #e5e5e5; break-inside: avoid; }
.dark .ck-gif-grid button { background: #262626; }
.ck-gif-grid img { width: 100%; display: block; }
.ck-rec-play.hidden, .ck-rec-stop.hidden { display: none; }

/* =========================================================
   v12 — video stories
   ========================================================= */
.sc-vpick-ic { width: 64px; height: 64px; margin: 0 auto; border-radius: 20px; display: grid; place-items: center; font-size: 26px;
  background: linear-gradient(135deg, #38bdf8, #0369a1); color: #fff; box-shadow: 0 10px 24px -8px rgba(14,165,233,.7); }
.sc-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 99px; font-size: 12px; font-weight: 700;
  color: #fff; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); }
button.sc-chip:hover { background: rgba(0,0,0,.7); }
.sc-ring { --p: 0; width: 84px; height: 84px; margin: 0 auto; border-radius: 99px; display: grid; place-items: center; font-weight: 800; font-size: 18px;
  background: radial-gradient(closest-side, rgba(0,0,0,.6) 78%, transparent 80% 100%), conic-gradient(#38bdf8 calc(var(--p) * 1%), rgba(255,255,255,.2) 0); }
.sc-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 99px; display: grid; place-items: center;
  background: rgba(0,0,0,.45); color: #fff; font-size: 13px; padding-left: 2px; z-index: 2; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.sv-spinner { position: absolute; inset: 0; display: none; place-items: center; color: #fff; font-size: 30px; pointer-events: none; }
.sv-buffering .sv-spinner { display: grid; }

/* =========================================================
   v12 — stories redesign + collage
   ========================================================= */
/* stories bar */
.story-strip { gap: 10px; padding: 2px 2px 6px; }
.story-card { width: 118px; height: 204px; border-radius: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 16px -10px rgba(0,0,0,.35); transition: transform .2s, box-shadow .2s; }
.story-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 14px 24px -12px rgba(0,0,0,.45); }
.story-card .sc-bg { transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.story-card:hover .sc-bg { transform: scale(1.07); }
.story-card .sc-shade { background: linear-gradient(to bottom, rgba(0,0,0,.35), transparent 32%, transparent 55%, rgba(0,0,0,.7)); }
.story-card .sc-avatar { top: 10px; left: 10px; width: 42px; height: 42px; padding: 3px; background: conic-gradient(from 210deg, #38bdf8, #6366f1, #ec4899, #f59e0b, #38bdf8); }
.story-card.unseen .sc-avatar { animation: scRing 3s linear infinite; }
@keyframes scRing { to { filter: hue-rotate(360deg); } }
.story-card .sc-avatar.seen { background: rgba(255,255,255,.55); animation: none; }
.story-card .sc-avatar img { border: 2.5px solid #fff; }
.dark .story-card .sc-avatar img { border-color: #161616; }
.story-card .sc-name { left: 10px; right: 10px; bottom: 10px; font-size: 13px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.sc-count { position: absolute; top: 12px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px); color: #fff; font-size: 11px; font-weight: 800; z-index: 2; }
.story-create { background: #fff !important; box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 6px 16px -10px rgba(0,0,0,.3); }
.dark .story-create { background: #1f1f1f !important; box-shadow: 0 0 0 1px rgba(255,255,255,.07); }
.sc-create-img { position: absolute; inset: 0 0 58px 0; overflow: hidden; }
.sc-create-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.story-create:hover .sc-create-img img { transform: scale(1.07); }
.sc-create-plus { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); width: 38px; height: 38px; border-radius: 99px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, #38bdf8, #0284c7); box-shadow: 0 0 0 4px #fff, 0 6px 14px -4px rgba(2,132,199,.7); transition: transform .2s; z-index: 1; }
.dark .sc-create-plus { box-shadow: 0 0 0 4px #1f1f1f, 0 6px 14px -4px rgba(2,132,199,.7); }
.story-create:hover .sc-create-plus { transform: translateX(-50%) scale(1.1) rotate(90deg); }
.sc-create-label { position: absolute; bottom: 12px; inset-inline: 0; text-align: center; font-size: 12.5px; font-weight: 800; }

/* viewer */
.sv-backdrop { position: absolute; inset: -60px; filter: blur(48px) saturate(1.3) brightness(.55); transform: scale(1.1); transition: background .35s; }
.sv.sv-enter .sv-card { animation: svIn .28s cubic-bezier(.2,.9,.3,1.1); }
@keyframes svIn { from { opacity: 0; transform: scale(.9) translateY(20px); } to { opacity: 1; transform: none; } }
.sv-card.sv-swap .sv-content { animation: svSwap .3s ease-out; }
@keyframes svSwap { from { opacity: .3; transform: scale(1.03); } to { opacity: 1; transform: none; } }
@media (min-width: 640px) { .sv-card { border-radius: 22px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.06); } }
.sv-top { background: linear-gradient(to bottom, rgba(0,0,0,.6), rgba(0,0,0,.2) 60%, transparent); }
.sv-bottom { background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,.25) 65%, transparent); }
.sv-bar { height: 3.5px; background: rgba(255,255,255,.3); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.sv-bar > i { background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.8); }
.sv-avatar { width: 40px; height: 40px; flex-shrink: 0; border-radius: 99px; padding: 2px; background: conic-gradient(from 210deg, #38bdf8, #6366f1, #ec4899, #f59e0b, #38bdf8); }
.sv-avatar img { border: 2px solid #000; }
.sv-btn { backdrop-filter: blur(2px); transition: background .15s, transform .15s; }
.sv-btn:active { transform: scale(.9); }
.sv-nav { width: 52px; height: 52px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); box-shadow: 0 0 0 1px rgba(255,255,255,.12); font-size: 18px; transition: background .15s, transform .15s; }
.sv-nav:hover { transform: translateY(-50%) scale(1.06); }
.sv-text { font-size: clamp(24px, 5.5vw, 34px); font-weight: 800; text-shadow: 0 2px 12px rgba(0,0,0,.25); letter-spacing: -.01em; }
.sv-react { gap: 2px; padding: 4px 6px; margin: 0 auto 10px; width: max-content; max-width: 100%; border-radius: 99px; background: rgba(0,0,0,.28); backdrop-filter: blur(10px); box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.sv-react button { width: 40px; height: 40px; font-size: 26px; transition: transform .18s cubic-bezier(.3,1.6,.5,1); }
.sv-react button:hover { transform: translateY(-6px) scale(1.3); }
.sv-react button.on { background: rgba(255,255,255,.25); }
[data-sv-reply] input { background: rgba(0,0,0,.28) !important; backdrop-filter: blur(10px); border-color: rgba(255,255,255,.35) !important; }
.sv-paused-badge { position: absolute; top: 50%; left: 50%; z-index: 25; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 99px; display: grid; place-items: center;
  color: #fff; font-size: 22px; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); opacity: 0; transform: scale(.7); transition: .18s; pointer-events: none; }
.sv-is-paused .sv-paused-badge { opacity: 1; transform: none; }
.sv-is-paused .sv-top, .sv-is-paused .sv-bottom { opacity: .9; }

/* creator */
.sc-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 768px) {
  .sc-panel { max-width: 880px !important; max-height: min(780px, calc(100dvh - 32px)) !important; }
  .sc-body { flex-direction: row; align-items: flex-start; padding: 20px; gap: 24px; }
  .sc-preview { position: sticky; top: 0; }
  .sc-tools { flex: 1; min-width: 0; }
}
.sc-preview { display: flex; justify-content: center; padding: 14px; border-radius: 22px; background: radial-gradient(circle at 30% 20%, rgba(14,165,233,.14), transparent 60%), #f4f4f5; }
.dark .sc-preview { background: radial-gradient(circle at 30% 20%, rgba(14,165,233,.16), transparent 60%), #0d0d0d; }
.sc-stage { width: min(100%, 300px); max-height: 56dvh; border-radius: 22px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.06); }
@media (min-width: 768px) { .sc-stage { width: 300px; max-height: none; } }
.sc-text { font-size: 24px; font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,.2); }
.sc-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: rgba(255,255,255,.92); cursor: pointer;
  background: radial-gradient(circle at 50% 35%, #2a2a2a, #121212); transition: background .2s; }
.sc-empty:hover { background: radial-gradient(circle at 50% 35%, #333, #151515); }
.sc-empty-ic { width: 66px; height: 66px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center; font-size: 26px; color: #fff;
  background: linear-gradient(135deg, #38bdf8, #0369a1); box-shadow: 0 12px 28px -10px rgba(14,165,233,.8); }
.sc-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sc-mode { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 16px; font-size: 13px; font-weight: 700;
  background: #f5f5f5; border: 2px solid transparent; transition: .15s; }
.dark .sc-mode { background: rgba(255,255,255,.05); }
.sc-mode:hover { transform: translateY(-1px); }
.sc-mode.active { border-color: #0ea5e9; background: #f0f9ff; color: #0369a1; }
.dark .sc-mode.active { background: rgba(14,165,233,.12); color: #7dd3fc; }
.sc-mode-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 16px; font-weight: 900; box-shadow: 0 6px 14px -6px rgba(0,0,0,.4); }
.sc-section { margin-top: 18px; }
.sc-label { font-size: 13px; font-weight: 700; color: #525252; margin-bottom: 8px; }
.dark .sc-label { color: #a3a3a3; }
.sc-swatches { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.sc-swatch { width: 100%; aspect-ratio: 1; height: auto; outline-offset: 3px; transition: transform .15s; }
.sc-swatch:hover { transform: scale(1.08); }
.sc-swatch.active { outline: 3px solid #0ea5e9; }
.cl-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.cl-thumb { position: relative; width: 58px; height: 58px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: #e5e5e5; }
.dark .cl-thumb { background: #262626; }
.cl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cl-thumb button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; font-size: 10px; color: #fff; background: rgba(0,0,0,.6); }
.cl-add { display: grid; place-items: center; cursor: pointer; color: #0284c7; border: 2px dashed #7dd3fc; background: #f0f9ff; }
.dark .cl-add { background: rgba(14,165,233,.08); border-color: rgba(56,189,248,.4); color: #7dd3fc; }
.cl-layouts { display: flex; gap: 10px; flex-wrap: wrap; }
.cl-layout { position: relative; width: 46px; height: 76px; border-radius: 9px; background: #e5e5e5; border: 2px solid transparent; transition: .15s; }
.dark .cl-layout { background: #2a2a2a; }
.cl-layout i { position: absolute; border: 2px solid #e5e5e5; border-radius: 5px; background: #a3a3a3; }
.dark .cl-layout i { border-color: #2a2a2a; background: #525252; }
.cl-layout.on { border-color: #0ea5e9; }
.cl-layout.on i { background: #38bdf8; }
.sc-empty.hidden, .sc-chip.hidden { display: none; }
.sc-chip { white-space: nowrap; }
.sv-caption { position: absolute; left: 16px; right: 16px; bottom: 150px; text-align: center; z-index: 5; pointer-events: none; }
.sv-caption span { display: inline-block; max-width: 100%; padding: 6px 14px; border-radius: 14px; color: #fff; font-weight: 700; font-size: 17px; line-height: 1.3;
  background: rgba(0,0,0,.42); backdrop-filter: blur(6px); word-break: break-word; }
.sc-text { padding: 42% 20px 20px; }

/* =========================================================
   v13 — story music, effects, stickers & text
   ========================================================= */
.sc-overlay, .sv-overlay { position: absolute; container-type: inline-size; pointer-events: none; z-index: 11; }
.sc-overlay { inset: 0; }
.sv-overlay { top: 50%; left: 50%; height: 100%; max-width: 100%; aspect-ratio: 9 / 16; transform: translate(-50%, -50%); z-index: 6; }
.ov-item { position: absolute; transform: translate(-50%, -50%) rotate(var(--r, 0deg)); font-size: calc(var(--s, .15) * 100cqw); line-height: 1; white-space: nowrap; user-select: none; }
.ov-emoji { filter: drop-shadow(0 .06em .1em rgba(0,0,0,.35)); }
.ov-st .ck-sticker { display: flex; }
.ov-st .ck-st-emo { font-size: 1em !important; }
.ov-st .ck-st-cap { font-size: .19em !important; padding: .05em .45em; }
.ov-txt { display: inline-block; max-width: 80cqw; white-space: normal; text-align: center; font-weight: 800; line-height: 1.15; color: var(--c); padding: .1em .35em; border-radius: .25em; word-break: break-word; }
.ov-b0 { text-shadow: 0 .04em .2em rgba(0,0,0,.45); }
.ov-b1 { background: var(--c); color: #111; }
.ov-b1[style*="#111111"] { color: #fff; }
.ov-b2 { text-shadow: 0 0 .25em var(--c), 0 0 .6em var(--c); color: #fff; }
.ov-b3 { -webkit-text-stroke: .06em #000; paint-order: stroke fill; }
.ov-edit { pointer-events: auto; cursor: grab; touch-action: none; }
.ov-edit:active { cursor: grabbing; }
.ov-sel { outline: 2px dashed rgba(255,255,255,.9); outline-offset: .12em; border-radius: .2em; }
.ov-x { position: absolute; top: -12px; right: -12px; width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; font-size: 11px;
  color: #fff; background: #e11d48; box-shadow: 0 2px 6px rgba(0,0,0,.35); pointer-events: auto; transform: rotate(calc(var(--r, 0deg) * -1)); }

.sc-extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.sc-extra { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 14px; font-weight: 700; font-size: 14px;
  background: #f5f5f5; border: 2px solid transparent; transition: .15s; }
.dark .sc-extra { background: rgba(255,255,255,.05); }
.sc-extra i { color: #0284c7; }
.dark .sc-extra i { color: #38bdf8; }
.sc-extra.active { border-color: #0ea5e9; background: #f0f9ff; }
.dark .sc-extra.active { background: rgba(14,165,233,.12); }
.sc-extra.hidden { display: none; }
.sc-dot { position: absolute; top: 7px; right: 9px; width: 8px; height: 8px; border-radius: 99px; background: #22c55e; box-shadow: 0 0 0 2px #fff; }
.dark .sc-dot { box-shadow: 0 0 0 2px #161616; }
.sc-dot.hidden { display: none; }
.sc-sub { margin-top: 12px; padding: 12px; border-radius: 16px; border: 1px solid #e5e5e5; animation: ckPop .16s ease-out; }
.dark .sc-sub { border-color: rgba(255,255,255,.08); }

.sc-music-pick { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; cursor: pointer; background: #f0f9ff; }
.dark .sc-music-pick { background: rgba(14,165,233,.08); }
.sc-music-ic, .sc-music-play { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 17px;
  background: linear-gradient(135deg, #f472b6, #8b5cf6); box-shadow: 0 8px 18px -8px rgba(139,92,246,.8); }
.sc-music-play { border-radius: 99px; }
.sc-music-card { padding: 4px; }
.sc-music-wave { position: relative; height: 34px; margin-top: 10px; border-radius: 10px; overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(139,92,246,.35) 0 3px, transparent 3px 6px); background-size: 6px 60%; background-position: 0 50%; background-repeat: repeat-x; }
.sc-music-win { position: absolute; top: 0; bottom: 0; border-radius: 10px; background: rgba(139,92,246,.18); box-shadow: inset 0 0 0 2px #8b5cf6; transition: left .1s; }

.sc-effects { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sc-fx { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; }
.sc-fx > span { width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; background: #d4d4d4 center / cover no-repeat; border: 2px solid transparent; transition: .15s; }
.dark .sc-fx > span { background-color: #333; }
.sc-fx.on > span { border-color: #0ea5e9; box-shadow: 0 0 0 2px #0ea5e9; }
.sc-fx.on { color: #0284c7; }

.sc-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; max-height: 180px; overflow-y: auto; }
.sc-emoji-grid button { font-size: 26px; line-height: 1; padding: 6px 0; border-radius: 10px; transition: transform .12s; }
.sc-emoji-grid button:hover { background: #f0f9ff; transform: scale(1.15); }
.dark .sc-emoji-grid button:hover { background: rgba(255,255,255,.06); }
.sc-fun-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-height: 220px; overflow-y: auto; }
.sc-fun-grid button { padding: 6px 0; border-radius: 12px; }
.sc-fun-grid button:hover { background: #f0f9ff; }
.dark .sc-fun-grid button:hover { background: rgba(255,255,255,.06); }

/* viewer: music chip */
.sv-music { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; margin-top: 3px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700;
  color: #fff; background: rgba(0,0,0,.3); backdrop-filter: blur(6px); overflow: hidden; }
.sv-music.hidden { display: none; }
.sv-music i { animation: svNote 1.2s ease-in-out infinite; }
@keyframes svNote { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-2px) rotate(8deg); } }
.sv-music-track { overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.sv-music-track > span { display: inline-block; }
.sv-music-track > span.scroll { padding-right: 30px; animation: svMarquee 9s linear infinite; }
.sv-music-track { mask-image: none; }
.sv-music-track:has(.scroll) { mask-image: linear-gradient(90deg, #000 85%, transparent); }
@keyframes svMarquee { 0%, 15% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
.sc-emoji-grid.hidden, .sc-fun-grid.hidden { display: none; }
.ov-item { width: max-content; max-width: 92cqw; }
.ov-txt { max-width: 92cqw; word-break: normal; overflow-wrap: anywhere; }
[data-sc-img], [data-sc-vid] { background: #000; }

/* =========================================================
   v14 — story music library
   ========================================================= */
.mu-list { margin-top: 8px; max-height: 300px; overflow-y: auto; display: grid; gap: 2px; }
.mu-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; cursor: pointer; transition: background .15s; font-size: 14px; }
.mu-row:hover { background: #f5f5f5; }
.dark .mu-row:hover { background: rgba(255,255,255,.05); }
.mu-cover { width: 46px; height: 46px; flex-shrink: 0; border-radius: 10px; overflow: hidden; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #f472b6, #8b5cf6); box-shadow: 0 4px 10px -6px rgba(0,0,0,.5); }
.mu-cover img { width: 100%; height: 100%; object-fit: cover; }
.mu-pv { width: 34px; height: 34px; flex-shrink: 0; border-radius: 99px; display: grid; place-items: center; font-size: 12px; color: #0284c7; background: #f0f9ff; transition: transform .15s; }
.dark .mu-pv { background: rgba(14,165,233,.14); color: #7dd3fc; }
.mu-pv:active { transform: scale(.9); }
.mu-e { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-right: 4px; border-radius: 3px; font-size: 9px; font-style: normal; font-weight: 800; color: #fff; background: #737373; vertical-align: 1px; }
.sc-music-play { position: relative; overflow: hidden; }
.sc-music-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sc-music-play img:not(.hidden) ~ i { position: relative; width: 26px; height: 26px; border-radius: 99px; display: grid; place-items: center; font-size: 11px; background: rgba(0,0,0,.5); }
.sv-song { position: absolute; top: 100px; left: 12px; z-index: 32; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 24px); padding: 6px 10px 6px 6px; border-radius: 14px;
  color: #fff; font-size: 12.5px; line-height: 1.25; background: rgba(0,0,0,.38); backdrop-filter: blur(10px); box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 10px 24px -12px rgba(0,0,0,.6);
  animation: svSongIn .4s cubic-bezier(.2,.9,.3,1.2); }
.sv-song.hidden { display: none; }
@keyframes svSongIn { from { opacity: 0; transform: translateY(-8px) scale(.96); } to { opacity: 1; transform: none; } }
.sv-song img { width: 40px; height: 40px; flex-shrink: 0; border-radius: 9px; object-fit: cover; animation: svSpin 8s linear infinite; border-radius: 99px; }
.sv-is-paused .sv-song img { animation-play-state: paused; }
@keyframes svSpin { to { transform: rotate(360deg); } }
.sv-song-am { flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; background: rgba(255,255,255,.18); }
.sv-song-am.hidden { display: none; }

/* =========================================================
   v15/v16 — IP addresses & location (Developer panel)
   ========================================================= */
/* user rows: name on the left, location card on the right (stacks under on phones) */
.dev-urow { flex-wrap: wrap; align-items: center; padding: 12px 10px; }
.dev-urow > .flex-1 { flex-basis: 0; }
.dev-urow-menu { order: 3; }
.dev-loc { order: 4; width: 100%; padding-left: 56px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
@media (min-width: 900px) {
  .dev-urow { flex-wrap: nowrap; }
  .dev-loc { order: 2; width: 300px; flex-shrink: 0; padding-left: 0; }
}
.dev-loc-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; text-align: left; padding: 8px 10px; border-radius: 14px;
  background: #f8fafc; border: 1px solid #eef2f6; transition: background .15s, border-color .15s; }
.dev-loc-btn:hover { background: #f0f9ff; border-color: #bae6fd; }
.dark .dev-loc-btn { background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.06); }
.dark .dev-loc-btn:hover { background: rgba(14,165,233,.08); border-color: rgba(56,189,248,.3); }
.dev-loc-btn.is-empty { opacity: .65; cursor: default; }
.dev-loc-btn.is-empty:hover { background: #f8fafc; border-color: #eef2f6; }
.dev-loc-flag { width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; font-size: 22px; line-height: 1;
  background: #fff; color: #94a3b8; box-shadow: 0 1px 2px rgba(15,23,42,.08), inset 0 0 0 1px rgba(15,23,42,.05); }
.dev-loc-flag i { font-size: 16px; }
.dark .dev-loc-flag { background: rgba(255,255,255,.06); box-shadow: none; color: #737373; }
.dev-loc-place { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-loc-meta { display: flex; align-items: center; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.dev-loc-dim { font-size: 11px; color: #94a3b8; }
.dev-loc-ip { display: block; margin-top: 3px; font: 600 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-loc-go { font-size: 11px; color: #cbd5e1; flex-shrink: 0; }
.dark .dev-loc-go { color: #525252; }
.dev-loc-warn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700;
  color: #b45309; background: #fffbeb; border: 1px solid #fde68a; }
.dev-loc-warn:hover { background: #fef3c7; }
.dark .dev-loc-warn { color: #fbbf24; background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.25); }

/* little labels */
.loc-badge { display: inline-flex; align-items: center; gap: 4px; height: 19px; padding: 0 7px; border-radius: 99px; font-size: 10.5px; font-weight: 700; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.loc-badge i { font-size: 9px; }
.loc-badge.ok   { color: #047857; background: #d1fae5; }
.loc-badge.ip   { color: #0369a1; background: #e0f2fe; }
.loc-badge.weak { color: #57534e; background: #f5f5f4; }
.loc-badge.mob  { color: #b45309; background: #fef3c7; }
.loc-badge.vpn  { color: #be123c; background: #ffe4e6; }
.loc-badge.now  { color: #fff; background: #10b981; }
.loc-badge.sign { color: #fff; background: #0ea5e9; }
.loc-badge.plain { color: #525252; background: #f5f5f5; font-weight: 600; }
.dark .loc-badge.ok   { color: #6ee7b7; background: rgba(16,185,129,.15); }
.dark .loc-badge.ip   { color: #7dd3fc; background: rgba(14,165,233,.15); }
.dark .loc-badge.weak { color: #d6d3d1; background: rgba(255,255,255,.08); }
.dark .loc-badge.mob  { color: #fcd34d; background: rgba(245,158,11,.15); }
.dark .loc-badge.vpn  { color: #fda4af; background: rgba(244,63,94,.15); }
.dark .loc-badge.plain { color: #d4d4d4; background: rgba(255,255,255,.07); }

/* the modal */
.dev-ipm { max-width: 560px; }
.dev-ipm-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 16px; }
.dev-ipm-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.dev-ipm-who img, .dev-ipm-ipicon { width: 44px; height: 44px; border-radius: 99px; object-fit: cover; flex-shrink: 0; }
.dev-ipm-ipicon { display: grid; place-items: center; background: #e0f2fe; color: #0284c7; }
.dark .dev-ipm-ipicon { background: rgba(14,165,233,.15); color: #7dd3fc; }
.dev-ipm-foot { display: flex; gap: 8px; padding: 10px 16px 14px; font-size: 11px; line-height: 1.45; color: #a3a3a3; border-top: 1px solid #f0f0f0; }
.dev-ipm-foot i { margin-top: 2px; }
.dark .dev-ipm-foot { border-top-color: rgba(255,255,255,.06); }
.dev-hero { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 18px; margin-bottom: 10px; }
.dev-hero.ok   { background: linear-gradient(135deg, #ecfdf5, #d1fae5); }
.dev-hero.ip   { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); }
.dev-hero.none { background: #f5f5f5; }
.dark .dev-hero.ok   { background: linear-gradient(135deg, rgba(16,185,129,.14), rgba(16,185,129,.06)); }
.dark .dev-hero.ip   { background: linear-gradient(135deg, rgba(14,165,233,.14), rgba(14,165,233,.05)); }
.dark .dev-hero.none { background: rgba(255,255,255,.05); }
.dev-hero-icon { width: 54px; height: 54px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center; font-size: 32px; line-height: 1; background: #fff; color: #94a3b8; box-shadow: 0 4px 14px rgba(15,23,42,.08); }
.dev-hero-icon i { font-size: 22px; }
.dark .dev-hero-icon { background: rgba(0,0,0,.25); box-shadow: none; }
.dev-hero-label { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.dev-hero.ok .dev-hero-label { color: #059669; }
.dev-hero.ip .dev-hero-label { color: #0284c7; }
.dev-hero-title { font-size: 19px; font-weight: 800; line-height: 1.2; margin-top: 2px; }
.dev-hero-sub { font-size: 12.5px; color: #64748b; margin-top: 3px; }
.dark .dev-hero-sub { color: #a3a3a3; }
.dev-ipm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.dev-ipm-stats > div { padding: 10px; border-radius: 14px; background: #f8fafc; text-align: center; }
.dev-ipm-stats b { display: block; font-size: 20px; font-weight: 800; line-height: 1.1; }
.dev-ipm-stats span { font-size: 11.5px; color: #64748b; }
.dev-ipm-stats .warn { background: #fffbeb; color: #b45309; }
.dev-ipm-stats .warn span { color: #b45309; }
.dark .dev-ipm-stats > div { background: rgba(255,255,255,.04); }
.dark .dev-ipm-stats .warn { background: rgba(245,158,11,.1); color: #fbbf24; }
.dark .dev-ipm-stats .warn span { color: #fbbf24; }
.dev-ipm-h { display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 800; margin: 4px 2px 8px; }
.dev-ipm-h span { font-size: 11.5px; font-weight: 500; color: #a3a3a3; }
.dev-ipx { position: relative; padding: 12px; border-radius: 16px; border: 1px solid #ececec; margin-bottom: 8px; }
.dev-ipx.current { border-color: #7dd3fc; box-shadow: 0 0 0 3px rgba(14,165,233,.08); }
.dark .dev-ipx { border-color: rgba(255,255,255,.08); }
.dark .dev-ipx.current { border-color: rgba(56,189,248,.45); }
.dev-ipx-ip { font: 700 14px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.dev-ipx-ip:hover { color: #0284c7; text-decoration: underline; }
.dev-ipx-place { font-size: 14px; font-weight: 600; margin-top: 3px; }
.dev-ipx-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 11.5px; color: #737373; }
.dev-ipx-meta i { margin-right: 4px; color: #a3a3a3; }
.dev-ipx-guess { margin-top: 8px; font-size: 12px; }
.dev-ipx-guess summary { cursor: pointer; color: #0284c7; font-weight: 600; list-style: none; }
.dev-ipx-guess summary::-webkit-details-marker { display: none; }
.dev-ipx-guess summary::before { content: '▸ '; }
.dev-ipx-guess[open] summary::before { content: '▾ '; }
.dev-ipx-guess > div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px; margin-top: 4px; border-radius: 8px; background: #f8fafc; }
.dev-ipx-guess > div span { color: #737373; font-family: ui-monospace, monospace; font-size: 11px; }
.dev-ipx-guess > div b { font-weight: 600; text-align: right; }
.dark .dev-ipx-guess > div { background: rgba(255,255,255,.04); }
.dev-ipx-others { margin-top: 10px; padding: 10px; border-radius: 12px; background: #fffbeb; }
.dark .dev-ipx-others { background: rgba(245,158,11,.08); }
.dev-ipx-others-h { font-size: 12px; font-weight: 700; color: #b45309; }
.dev-ipx-others-h i { margin-right: 6px; }
.dark .dev-ipx-others-h { color: #fbbf24; }
.dev-ipx-note { font-size: 11.5px; color: #78716c; margin-top: 3px; padding: 8px 10px; border-radius: 10px; background: #f5f5f4; }
.dev-ipx-others .dev-ipx-note { padding: 0; background: none; }
.dark .dev-ipx-note { color: #a8a29e; background: rgba(255,255,255,.04); }
.dev-ipm-acct { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; }
.dev-ipm-acct:hover { background: #f5f5f5; }
.dark .dev-ipm-acct:hover { background: rgba(255,255,255,.04); }
.dev-ipm-acct img { width: 42px; height: 42px; border-radius: 99px; object-fit: cover; }
.dev-ip-person { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 2px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #fff; color: #92400e; box-shadow: inset 0 0 0 1px #fde68a; }
.dark .dev-ip-person { background: rgba(0,0,0,.2); color: #fcd34d; box-shadow: inset 0 0 0 1px rgba(245,158,11,.25); }
.dev-ip-person img { width: 22px; height: 22px; border-radius: 99px; object-fit: cover; }
.dev-ip-person.banned { color: #be123c; box-shadow: inset 0 0 0 1px #fecdd3; }

/* the "share my city" card on the feed */
.loc-card { display: flex; gap: 14px; padding: 16px; overflow: hidden; transition: opacity .25s, transform .25s; }
.loc-card-out { opacity: 0; transform: translateY(-6px); }
.loc-card-art { position: relative; width: 52px; height: 52px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center; font-size: 22px; color: #fff;
  background: linear-gradient(135deg, #38bdf8, #0284c7); box-shadow: 0 8px 20px rgba(2,132,199,.3); }
.loc-card-art i { position: relative; }
.loc-ping { position: absolute; inset: 0; border-radius: inherit; background: #38bdf8; animation: locPing 2.2s cubic-bezier(0,0,.2,1) infinite; }
@keyframes locPing { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .loc-ping { animation: none; display: none; } }
.loc-card-points { margin-top: 10px; display: grid; gap: 6px; font-size: 12.5px; color: #525252; }
.loc-card-points li { display: flex; gap: 8px; align-items: flex-start; }
.loc-card-points i { width: 16px; margin-top: 2px; text-align: center; color: #0ea5e9; font-size: 12px; }
.dark .loc-card-points { color: #a3a3a3; }
.loc-card-done { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 6px 0; }
.loc-card-done > i { color: #10b981; font-size: 22px; }
.loc-card-done span { font-size: 12.5px; color: #737373; }

/* =========================================================
   v17 — email codes: verify.php, forgot.php
   ========================================================= */
.auth-icon { position: relative; width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; font-size: 26px; color: #fff;
  background: linear-gradient(135deg, #38bdf8, #0284c7); box-shadow: 0 10px 24px rgba(2,132,199,.28); }
.auth-icon-dot { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 99px; display: grid; place-items: center; font-size: 12px;
  background: #10b981; border: 3px solid #fff; }
.dark .auth-icon-dot { border-color: #161616; }
.auth-error { margin-top: 20px; display: flex; align-items: center; gap: 8px; border-radius: 12px; padding: 12px 16px; font-size: 14px; background: #fff1f2; color: #e11d48; }
.dark .auth-error { background: rgba(244,63,94,.1); color: #fda4af; }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp-box { width: 100%; min-width: 0; padding: 0; box-sizing: border-box; height: 58px; border-radius: 14px; text-align: center; font-size: 26px; font-weight: 800; caret-color: #0ea5e9;
  background: #f5f5f5; border: 2px solid transparent; outline: none; transition: border-color .15s, background .15s, transform .15s; font-variant-numeric: tabular-nums; }
.otp-box:focus { border-color: #0ea5e9; background: #fff; box-shadow: 0 0 0 4px rgba(14,165,233,.15); }
.otp-box.filled { background: #f0f9ff; border-color: #bae6fd; color: #0c4a6e; }
.dark .otp-box { background: rgba(255,255,255,.06); color: #fff; }
.dark .otp-box:focus { background: rgba(255,255,255,.04); }
.dark .otp-box.filled { background: rgba(14,165,233,.12); border-color: rgba(56,189,248,.4); color: #e0f2fe; }
.otp.shake { animation: otpShake .4s; }
@keyframes otpShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (max-width: 380px) { .otp { gap: 5px; } .otp-box { height: 50px; font-size: 22px; } }
.auth-more summary { cursor: pointer; text-align: center; font-size: 14px; font-weight: 600; color: #525252; list-style: none; }
.auth-more summary::-webkit-details-marker { display: none; }
.dark .auth-more summary { color: #a3a3a3; }
.auth-steps { display: flex; justify-content: center; gap: 0; margin-bottom: 22px; }
.auth-step { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.auth-step + .auth-step::before { content: ''; position: absolute; top: 14px; right: calc(50% + 18px); width: calc(100% - 36px); height: 2px; background: #e5e5e5; }
.auth-step.done + .auth-step::before, .auth-step.done + .auth-step.now::before { background: #0ea5e9; }
.auth-step span { width: 30px; height: 30px; border-radius: 99px; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: #f5f5f5; color: #a3a3a3; }
.auth-step small { font-size: 11.5px; font-weight: 600; color: #a3a3a3; }
.auth-step.now span { background: #0ea5e9; color: #fff; box-shadow: 0 0 0 4px rgba(14,165,233,.18); }
.auth-step.now small { color: #0284c7; }
.auth-step.done span { background: #e0f2fe; color: #0284c7; }
.dark .auth-step span { background: rgba(255,255,255,.07); }
.dark .auth-step + .auth-step::before { background: rgba(255,255,255,.1); }
.dark .auth-step.done span { background: rgba(14,165,233,.15); color: #7dd3fc; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.pw-meter span { height: 4px; border-radius: 99px; background: #e5e5e5; transition: background .2s; }
.dark .pw-meter span { background: rgba(255,255,255,.1); }
.pw-meter[data-level="1"] span:nth-child(-n+1) { background: #f43f5e; }
.pw-meter[data-level="2"] span:nth-child(-n+2) { background: #f59e0b; }
.pw-meter[data-level="3"] span:nth-child(-n+3) { background: #0ea5e9; }
.pw-meter[data-level="4"] span { background: #10b981; }

/* =========================================================
   v17.1 — Developer panel → API keys
   ========================================================= */
.api-icon { width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 19px; box-shadow: 0 8px 18px rgba(2,132,199,.2); }
.api-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; }
.api-preset { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 600; border: 1px solid #e5e5e5; background: #fff; }
.api-preset:hover, .api-preset.active { border-color: #0ea5e9; background: #f0f9ff; color: #0369a1; }
.dark .api-preset { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.dark .api-preset:hover, .dark .api-preset.active { background: rgba(14,165,233,.12); border-color: rgba(56,189,248,.5); color: #7dd3fc; }
.api-warn, .api-ok, .api-bad { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.api-warn > i, .api-ok > i, .api-bad > i { margin-top: 3px; }
.api-warn { background: #fffbeb; color: #92400e; }
.api-ok { background: #ecfdf5; color: #065f46; }
.api-bad { background: #fff1f2; color: #9f1239; }
.dark .api-warn { background: rgba(245,158,11,.1); color: #fcd34d; }
.dark .api-ok { background: rgba(16,185,129,.1); color: #6ee7b7; }
.dark .api-bad { background: rgba(244,63,94,.1); color: #fda4af; }
.api-err { margin-top: 6px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; opacity: .85; word-break: break-word; }
.api-bad summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.api-bad pre { margin-top: 6px; padding: 10px; border-radius: 10px; background: rgba(0,0,0,.05); font-size: 11.5px; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
.dark .api-bad pre { background: rgba(0,0,0,.3); }
.api-help { border-top: 1px solid #f0f0f0; padding-top: 14px; font-size: 14px; }
.dark .api-help { border-top-color: rgba(255,255,255,.07); }
.api-help summary { cursor: pointer; font-weight: 700; color: #0284c7; list-style: none; }
.api-help summary i { margin-right: 6px; }
.api-help summary::-webkit-details-marker { display: none; }
.api-help ol { list-style: decimal; padding-left: 22px; margin: 10px 0; display: grid; gap: 6px; color: #525252; }
.api-help p { color: #525252; }
.dark .api-help ol, .dark .api-help p { color: #a3a3a3; }
.api-help code { font-size: 12.5px; padding: 1px 6px; border-radius: 6px; background: #f5f5f5; }
.dark .api-help code { background: rgba(255,255,255,.08); }
.dev-mail-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.dark .dev-mail-banner { background: rgba(249,115,22,.1); color: #fdba74; border-color: rgba(249,115,22,.25); }

/* =========================================================
   v18 — video posts
   ========================================================= */
.post-video { position: relative; background: #000; margin-bottom: 4px; cursor: pointer; overflow: hidden; -webkit-tap-highlight-color: transparent; user-select: none; }
.post-video video { display: block; width: 100%; max-height: 640px; object-fit: contain; background: #000; }
.post-video.small video { max-height: 360px; }
.post-video .pv-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 99px; display: grid; place-items: center;
  background: rgba(0,0,0,.55); color: #fff; font-size: 24px; padding-left: 4px; backdrop-filter: blur(4px); transition: opacity .2s, transform .2s; }
.post-video.playing .pv-play { opacity: 0; transform: scale(.8); pointer-events: none; }
/* small shared-post preview keeps the round sound / full screen buttons */
.post-video .pv-sound, .post-video .pv-full { position: absolute; bottom: 18px; width: 34px; height: 34px; border-radius: 99px; display: grid; place-items: center;
  background: rgba(0,0,0,.55); color: #fff; font-size: 14px; backdrop-filter: blur(4px); }
.post-video .pv-sound { right: 12px; }
.post-video .pv-full { right: 52px; }
.post-video .pv-time { position: absolute; left: 12px; bottom: 20px; padding: 2px 8px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; font: 600 12px/1.4 ui-monospace, monospace; pointer-events: none; }
.post-video .pv-time:empty { display: none; }

/* side buttons (Instagram reels): heart · comment · share · sound · full screen */
.post-video .pv-rail { position: absolute; right: 10px; bottom: 34px; display: flex; flex-direction: column; align-items: center; gap: 14px; z-index: 2; }
.post-video .pv-rb { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 40px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); transition: transform .15s; }
.post-video .pv-rb:active { transform: scale(.88); }
.post-video .pv-rb i { font-size: 26px; line-height: 1; }
.post-video .pv-rb .pv-emo { font-size: 26px; line-height: 1; }
.post-video .pv-rb b { font-size: 12.5px; font-weight: 700; line-height: 1.1; min-height: 1px; }
.post-video .pv-rb b:empty { display: none; }
.post-video .pv-rb.on i.fa-heart { color: #ff3040; }
.post-video .pv-rb.pop i, .post-video .pv-rb.pop .pv-emo { animation: pvPop .45s cubic-bezier(.3,1.6,.5,1); }
.post-video .pv-rb.pv-sm { width: 36px; height: 36px; justify-content: center; border-radius: 99px; background: rgba(0,0,0,.45); filter: none; backdrop-filter: blur(4px); }
.post-video .pv-rb.pv-sm i { font-size: 14px; }
@keyframes pvPop { 0% { transform: scale(.5); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
/* big heart in the middle on double-tap */
.post-video .pv-burst { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: #fff; font-size: 96px; opacity: 0; filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }
.post-video .pv-burst.go { animation: pvBurst .9s ease forwards; }
.post-video .pv-burst.go i { color: #ff3040; }
@keyframes pvBurst { 0% { opacity: 0; transform: scale(.3); } 15% { opacity: 1; transform: scale(1.15); } 30% { transform: scale(.95); } 45% { transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: scale(1) translateY(-30px); } }

/* seek bar: tap or drag anywhere on it */
.post-video .pv-seek { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; display: flex; align-items: flex-end; cursor: pointer; touch-action: none; z-index: 3; outline: none; }
.post-video .pv-track { position: relative; width: 100%; height: 3px; background: rgba(255,255,255,.25); transition: height .15s; }
.post-video .pv-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--pv, 0); background: #fff; }
.post-video .pv-thumb { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 99px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); transform: scale(0); transition: transform .15s; left: var(--pv, 0); }
.post-video .pv-seek:hover .pv-track, .post-video .pv-seek:focus-visible .pv-track, .post-video.seeking .pv-track, .post-video:not(.playing) .pv-track { height: 5px; }
.post-video .pv-seek:hover .pv-thumb, .post-video .pv-seek:focus-visible .pv-thumb, .post-video.seeking .pv-thumb, .post-video:not(.playing) .pv-thumb { transform: scale(1); }
.post-video.seeking .pv-time { background: rgba(0,0,0,.75); }
.pm-upload { margin-top: 8px; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: #0284c7; }
.pm-upload.hidden { display: none; }
.pm-upload-bar { flex: 1; height: 6px; border-radius: 99px; background: #e0f2fe; overflow: hidden; }
.pm-upload-bar span { display: block; height: 100%; width: 0; background: #0ea5e9; transition: width .2s; }
.dark .pm-upload-bar { background: rgba(14,165,233,.15); }

/* v18 — reactions on comments */
.crx-pill { display: inline-flex; align-items: center; gap: 1px; height: 20px; padding: 0 7px 0 5px; border-radius: 99px;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.16); font-size: 12px; line-height: 1; white-space: nowrap; transform: translateY(-1px); }
.crx-pill b { font-size: 11.5px; font-weight: 600; color: #737373; margin-left: 3px; }
.dark .crx-pill { background: #262626; box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.dark .crx-pill b { color: #a3a3a3; }

/* v18 — birthdays */
.bday-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background-image: radial-gradient(120% 90% at 100% 0%, rgba(244,114,182,.13), transparent 60%), radial-gradient(90% 80% at 0% 0%, rgba(56,189,248,.12), transparent 60%); }
.bday-head { display: flex; gap: 12px; align-items: center; }
.bday-cake { width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: #fff; box-shadow: 0 6px 16px rgba(244,63,94,.18); }
.dark .bday-cake { background: rgba(255,255,255,.07); box-shadow: none; }
.bday-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: rgba(255,255,255,.7); }
.dark .bday-row { background: rgba(255,255,255,.04); }
.bday-badge { position: absolute; right: -4px; bottom: -4px; font-size: 15px; }
.bday-soon { flex-shrink: 0; width: 84px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 8px 4px; border-radius: 14px; }
.bday-soon:hover { background: rgba(0,0,0,.04); }
.dark .bday-soon:hover { background: rgba(255,255,255,.05); }
.bday-soon img { width: 48px; height: 48px; border-radius: 99px; object-fit: cover; margin-bottom: 2px; }
.bday-soon b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bday-soon span { font-size: 11px; color: #737373; }

/* v18 — Chichat: message requests + forward */
.req-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 99px; font-size: 11px; font-weight: 800; background: #f43f5e; color: #fff; }
.req-count.hidden { display: none; }
.cc-request { flex-shrink: 0; padding: 14px 16px; text-align: center; font-size: 14px; background: #f0f9ff; border-top: 1px solid #e0f2fe; }
.cc-request.hidden { display: none; }
.dark .cc-request { background: rgba(14,165,233,.08); border-top-color: rgba(56,189,248,.2); }
.fwd-label { font-size: 11.5px; color: #737373; padding: 0 6px; width: 100%; }
.fwd-label i { font-size: 10px; margin-right: 2px; }
.fwd-preview { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #f5f5f5; font-size: 14px; min-width: 0; }
.dark .fwd-preview { background: rgba(255,255,255,.06); }

/* v18 — announcements */
.announce-wrap { max-width: 1100px; margin: 10px auto 0; padding: 0 12px; display: grid; gap: 8px; }
.announce { display: flex; align-items: flex-start; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5;
  border: 1px solid; animation: announceIn .35s ease-out; transition: opacity .25s, transform .25s; }
.announce-out { opacity: 0; transform: translateY(-6px); }
@keyframes announceIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.announce-icon { width: 30px; height: 30px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 13px; }
.announce-from { font-weight: 800; }
.announce-link { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.announce-x { width: 30px; height: 30px; flex-shrink: 0; border-radius: 99px; display: grid; place-items: center; opacity: .6; }
.announce-x:hover { opacity: 1; background: rgba(0,0,0,.06); }
.announce-info    { background: #f0f9ff; border-color: #bae6fd; color: #0c4a6e; } .announce-info .announce-icon { background: #0ea5e9; }
.announce-warning { background: #fffbeb; border-color: #fde68a; color: #78350f; } .announce-warning .announce-icon { background: #f59e0b; }
.announce-success { background: #ecfdf5; border-color: #a7f3d0; color: #064e3b; } .announce-success .announce-icon { background: #10b981; }
.announce-danger  { background: #fff1f2; border-color: #fecdd3; color: #881337; } .announce-danger .announce-icon { background: #f43f5e; }
.dark .announce-info    { background: rgba(14,165,233,.1); border-color: rgba(56,189,248,.25); color: #bae6fd; }
.dark .announce-warning { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.25); color: #fde68a; }
.dark .announce-success { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.25); color: #a7f3d0; }
.dark .announce-danger  { background: rgba(244,63,94,.1); border-color: rgba(244,63,94,.25); color: #fecdd3; }
.dark .announce-x:hover { background: rgba(255,255,255,.08); }
@media (min-width: 640px) { .announce-wrap { padding: 0 16px; } }
.ann-level input { position: absolute; opacity: 0; pointer-events: none; }
.ann-level span { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 99px; font-size: 13px; font-weight: 700; cursor: pointer; border: 2px solid transparent; background: #f5f5f5; }
.dark .ann-level span { background: rgba(255,255,255,.06); }
.ann-level input:checked + .ann-info { border-color: #0ea5e9; color: #0369a1; background: #f0f9ff; }
.ann-level input:checked + .ann-warning { border-color: #f59e0b; color: #92400e; background: #fffbeb; }
.ann-level input:checked + .ann-success { border-color: #10b981; color: #065f46; background: #ecfdf5; }
.ann-level input:checked + .ann-danger { border-color: #f43f5e; color: #9f1239; background: #fff1f2; }
.dark .ann-level input:checked + span { background: rgba(255,255,255,.08); color: #fff; }
.ann-dot-info { background: #0ea5e9; } .ann-dot-warning { background: #f59e0b; } .ann-dot-success { background: #10b981; } .ann-dot-danger { background: #f43f5e; }

/* v18 — new-device login */
.device-chip { display: flex; width: max-content; max-width: 100%; margin: 12px auto 0; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: #f5f5f5; color: #525252; }
.dark .device-chip { background: rgba(255,255,255,.06); color: #d4d4d4; }
.device-note { display: flex; gap: 8px; margin-top: 18px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.5; background: #fffbeb; color: #92400e; }
.device-note i { margin-top: 3px; }
.dark .device-note { background: rgba(245,158,11,.08); color: #fcd34d; }
.dev-list-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.dev-list-row + .dev-list-row { border-top: 1px solid rgba(0,0,0,.05); }
.dark .dev-list-row + .dev-list-row { border-top-color: rgba(255,255,255,.05); }

/* story music: moods + playing bars */
.mu-moods { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 2px; }
.mu-mood { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700;
  background: #f5f5f5; color: #404040; border: 1.5px solid transparent; transition: background .15s, border-color .15s; }
.mu-mood span { font-size: 14px; line-height: 1; }
.mu-mood:hover { background: #ececec; }
.mu-mood.active { background: #f0f9ff; border-color: #0ea5e9; color: #0369a1; }
.dark .mu-mood { background: rgba(255,255,255,.07); color: #e5e5e5; }
.dark .mu-mood.active { background: rgba(14,165,233,.15); border-color: rgba(56,189,248,.6); color: #7dd3fc; }
.sv-song-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex-shrink: 0; margin-left: 2px; }
.sv-song-eq i { width: 3px; border-radius: 2px; background: #fff; animation: svEq .9s ease-in-out infinite; }
.sv-song-eq i:nth-child(2) { animation-delay: -.3s; } .sv-song-eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes svEq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.sv-is-paused .sv-song-eq i { animation-play-state: paused; }

/* profile → Friends tab: always 3 per row */
.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
@media (min-width: 640px) { .pf-grid { gap: 18px 14px; } }
.pf-tile { display: flex; flex-direction: column; min-width: 0; text-align: center; }
.pf-tile.hidden { display: none; }
.pf-photo { position: relative; display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #f5f5f5; transition: transform .15s; }
.pf-tile:hover .pf-photo { transform: translateY(-2px); }
.dark .pf-photo { background: rgba(255,255,255,.05); }
.pf-photo img { width: 100%; height: 100%; object-fit: cover; }
.pf-online { position: absolute; right: 7px; bottom: 7px; width: 13px; height: 13px; border-radius: 99px; background: #10b981; box-shadow: 0 0 0 2.5px #fff; }
.dark .pf-online { box-shadow: 0 0 0 2.5px #161616; }
.pf-name { margin-top: 6px; font-size: 13.5px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.pf-sub { font-size: 11.5px; color: #737373; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dark .pf-sub { color: #a3a3a3; }
.pf-more { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 22px; border-radius: 99px; font-size: 14px; font-weight: 700;
  background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; transition: background .15s, transform .15s; }
.pf-more:hover { background: #e0f2fe; transform: translateY(-1px); }
.dark .pf-more { background: rgba(14,165,233,.12); color: #7dd3fc; border-color: rgba(56,189,248,.3); }

/* loading placeholders (shimmer) — feed + people lists */
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, #ececec 25%, #f6f6f6 37%, #ececec 63%); background-size: 400% 100%; animation: skShimmer 1.3s ease infinite; }
.dark .sk { background: linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.12) 37%, rgba(255,255,255,.06) 63%); background-size: 400% 100%; }
@keyframes skShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.sk-line { height: 11px; margin-top: 8px; }
.sk-avatar { width: 40px; height: 40px; border-radius: 99px; flex-shrink: 0; }
.sk-media { height: 220px; margin-top: 14px; border-radius: 12px; }
.sk-post { padding: 16px; text-align: left; }
.sk-user { display: flex; flex-direction: column; padding: 0 0 12px; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid #e5e5e5; }
.dark .sk-user { background: #161616; border-color: rgba(255,255,255,.07); }
.sk-user .sk-photo { aspect-ratio: 1; border-radius: 0; }
.sk-user .sk-line { margin-left: 12px; margin-right: 12px; }
.sk-user .sk-btn { height: 34px; margin: 12px 12px 0; border-radius: 10px; }
@media (max-width: 639px) {
  .sk-user { display: grid; grid-template-columns: 84px 1fr; align-content: center; column-gap: 12px; padding: 12px; border-radius: 0; border-width: 0 0 1px; }
  .sk-user .sk-photo { grid-row: span 3; width: 84px; height: 84px; border-radius: 99px; aspect-ratio: auto; }
  .sk-user .sk-line { margin: 6px 0 0; }
  .sk-user .sk-btn { margin: 8px 0 0; height: 30px; width: 60%; }
}


/* who reacted to a post */
.post-rx-who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; border-radius: 99px; padding: 2px 6px 2px 2px; margin-left: -2px; }
.post-rx-who:hover span.truncate { text-decoration: underline; }
.rw-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 12px 8px; border-bottom: 1px solid #f0f0f0; }
.dark .rw-tabs { border-bottom-color: rgba(255,255,255,.07); }
.rw-tab { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 99px; font-size: 13.5px; font-weight: 700; color: #525252; }
.rw-tab span { font-size: 16px; line-height: 1; }
.rw-tab:hover { background: #f5f5f5; }
.rw-tab.active { background: #e0f2fe; color: #0369a1; }
.dark .rw-tab { color: #d4d4d4; }
.dark .rw-tab:hover { background: rgba(255,255,255,.06); }
.dark .rw-tab.active { background: rgba(14,165,233,.15); color: #7dd3fc; }
.rw-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.rw-row:hover { background: #f5f5f5; }
.dark .rw-row:hover { background: rgba(255,255,255,.05); }
.rw-row img { width: 42px; height: 42px; border-radius: 99px; object-fit: cover; }
.rw-emo { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; display: grid; place-items: center; font-size: 13px; border-radius: 99px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.dark .rw-emo { background: #262626; }

/* round "loading more" animation */
.tb-loader { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 0 28px; }
.tb-spin { position: relative; width: 40px; height: 40px; border-radius: 99px;
  background: conic-gradient(from 0deg, rgba(14,165,233,0) 0deg, #38bdf8 160deg, #0284c7 300deg, rgba(14,165,233,0) 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  animation: tbSpin .8s linear infinite; }
.tb-spin i { position: absolute; top: 0; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 99px; background: #0284c7; }
@keyframes tbSpin { to { transform: rotate(360deg); } }
.tb-loader-text { font-size: 13px; font-weight: 600; color: #a3a3a3; animation: tbPulse 1.4s ease-in-out infinite; }
@keyframes tbPulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .tb-spin { animation-duration: 2s; } .tb-loader-text { animation: none; } }

/* pull UP at the bottom of the feed */
#tbPullUp { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); left: 50%; z-index: 990; width: 44px; height: 44px; border-radius: 99px; display: grid; place-items: center;
  transform: translate(-50%, 70px); opacity: 0; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.18); pointer-events: none; }
.dark #tbPullUp { background: #262626; }
#tbPullUp .tbp-ring { width: 30px; height: 30px; transform: rotate(-90deg); }
#tbPullUp .tbp-track { fill: none; stroke: #e5e5e5; stroke-width: 3.5; }
.dark #tbPullUp .tbp-track { stroke: rgba(255,255,255,.12); }
#tbPullUp .tbp-arc { fill: none; stroke: #a3a3a3; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 88; stroke-dashoffset: 88; transition: stroke .2s; }
#tbPullUp.ready .tbp-arc { stroke: #0ea5e9; }
#tbPullUp.spin { transition: transform .25s, opacity .2s; }
#tbPullUp.spin .tbp-ring { animation: tbSpin .8s linear infinite; }
#tbPullUp.spin .tbp-arc { stroke: #0ea5e9; stroke-dashoffset: 62; transition: none; }

/* "No more posts" — small pop-up at the bottom after the loading circle */
#tbNoMore { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 995; display: flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 99px; background: rgba(23,23,23,.92); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.2);
  transform: translate(-50%, 16px) scale(.92); opacity: 0; pointer-events: none; transition: transform .25s cubic-bezier(.2,.9,.3,1.3), opacity .2s; }
#tbNoMore i { color: #38bdf8; }
.dark #tbNoMore { background: rgba(64,64,64,.95); }
#tbNoMore.show { transform: translate(-50%, 0) scale(1); opacity: 1; }

/* =========================================================
   v19 — Chichat: photos / videos / files, pinned, backgrounds, Shared in chat
   ========================================================= */
/* photos & videos in a bubble: smaller, so a picture never eats the whole phone screen */
.cc-media-wrap { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
.cc-img { display: block; max-width: 220px; max-height: 280px; width: auto; height: auto; border-radius: 18px; object-fit: cover; cursor: zoom-in; background: #e5e5e5; }
.dark .cc-img { background: rgba(255,255,255,.05); }
.cc-img.sm { max-width: 150px; max-height: 190px; border-radius: 16px; }
.cc-vid { width: 220px; border-radius: 18px; overflow: hidden; background: #000; }
.cc-vid video { display: block; width: 100%; max-height: 300px; background: #000; }
.cc-vid.sm { width: 160px; border-radius: 16px; }
.cc-vid.sm video { max-height: 220px; }
.cc-vid-len { position: absolute; left: 8px; top: 8px; padding: 1px 7px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font: 600 11px/1.5 ui-monospace, monospace; }
.cc-vid-dl { position: absolute; right: 7px; top: 7px; width: 30px; height: 30px; border-radius: 99px; display: grid; place-items: center; line-height: 1;
  background: rgba(0,0,0,.5); color: #fff; font-size: 12px; backdrop-filter: blur(4px); opacity: .9; }
.cc-vid-dl:hover { opacity: 1; background: rgba(0,0,0,.7); }
@media (max-width: 767px) {
  .cc-img { max-width: min(48vw, 190px); max-height: 230px; }
  .cc-vid { width: min(56vw, 210px); }
  .cc-vid video { max-height: 260px; }
}
/* upload progress on a video / file you're sending */
.cc-up { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 20px; border-radius: 99px; background: rgba(0,0,0,.55); overflow: hidden; line-height: 20px; }
.cc-up span { position: absolute; left: 0; top: 0; bottom: 0; background: #0ea5e9; transition: width .2s; }
.cc-up b { position: relative; display: block; text-align: center; font-size: 11px; color: #fff; }
.cc-file .cc-up { left: 6px; right: 6px; bottom: 4px; height: 4px; }
.cc-file .cc-up b { display: none; }
/* a file (PDF, Word …) */
.cc-file { display: flex; align-items: center; gap: 10px; width: 250px; max-width: 100%; padding: 10px 10px 10px 10px; border-radius: 18px; background: #f0f0f0; color: #171717; text-align: left; }
.dark .cc-file { background: #262626; color: #f5f5f5; }
.cc-file.mine { background: #e0f2fe; }
.dark .cc-file.mine { background: rgba(14,165,233,.18); }
.cc-file b { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.cc-file small { display: block; font-size: 11.5px; color: #737373; margin-top: 1px; }
.dark .cc-file small { color: #a3a3a3; }
.cc-file.sm { width: 210px; padding: 8px; gap: 8px; }
.cc-file:hover .cc-file-dl { background: #0ea5e9; color: #fff; }
.cc-file-ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; font-size: 19px; color: #fff; }
.cc-file.sm .cc-file-ic { width: 34px; height: 34px; font-size: 16px; }
.cc-file-dl { width: 32px; height: 32px; flex-shrink: 0; border-radius: 99px; display: grid; place-items: center; font-size: 13px; color: #0284c7; background: rgba(14,165,233,.12); transition: background .15s, color .15s; }
.ff-pdf { background: #ef4444; } .ff-word { background: #2563eb; } .ff-excel { background: #16a34a; } .ff-ppt { background: #ea580c; }
.ff-zip { background: #a16207; } .ff-audio { background: #9333ea; } .ff-text { background: #64748b; }
.cc-file-prev { width: 260px; padding-right: 14px; }
.cc-prev-badge { position: absolute; left: 6px; bottom: 6px; display: flex; align-items: center; gap: 5px; padding: 1px 7px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font-size: 10.5px; font-weight: 600; }

/* pinned messages */
.pin-label { color: #0284c7 !important; }
.dark .pin-label { color: #38bdf8 !important; }
.cc-pinned { flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 10px; background: #fff; border-bottom: 1px solid #e5e5e5; }
.dark .cc-pinned { background: #111111; border-color: rgba(255,255,255,.07); }
.cc-pin-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 3px 6px; border-radius: 10px; }
.cc-pin-main:hover { background: #f5f5f5; }
.dark .cc-pin-main:hover { background: rgba(255,255,255,.05); }
.cc-pin-ic { width: 28px; height: 28px; flex-shrink: 0; border-radius: 99px; display: grid; place-items: center; font-size: 12px; color: #0284c7; background: #e0f2fe; transform: rotate(35deg); }
.dark .cc-pin-ic { background: rgba(14,165,233,.15); color: #38bdf8; }
.cc-pin-all { flex-shrink: 0; height: 30px; min-width: 30px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: #0284c7; }
.cc-pin-all:hover { background: #f0f9ff; }
.dark .cc-pin-all { color: #38bdf8; }
.dark .cc-pin-all:hover { background: rgba(255,255,255,.06); }

/* chat backgrounds (everyone in the chat sees the same one) */
.cc-has-bg { background-size: cover; background-position: center; background-repeat: no-repeat; }
.cc-bg-sky { background: linear-gradient(160deg, #e0f2fe 0%, #bae6fd 45%, #c7d2fe 100%); }
.cc-bg-sunset { background: linear-gradient(160deg, #fde68a 0%, #fca5a5 50%, #f9a8d4 100%); }
.cc-bg-mint { background: linear-gradient(160deg, #d1fae5 0%, #a7f3d0 50%, #99f6e4 100%); }
.cc-bg-grape { background: linear-gradient(160deg, #ede9fe 0%, #ddd6fe 45%, #fbcfe8 100%); }
.cc-bg-peach { background: linear-gradient(160deg, #ffedd5 0%, #fed7aa 50%, #fecdd3 100%); }
.cc-bg-ocean { background: linear-gradient(170deg, #0ea5e9 0%, #2563eb 55%, #1e3a8a 100%); }
.cc-bg-night { background: radial-gradient(circle at 20% 15%, #312e81 0%, transparent 45%), linear-gradient(170deg, #0f172a 0%, #1e1b4b 60%, #020617 100%); }
.cc-bg-forest { background: linear-gradient(170deg, #065f46 0%, #047857 50%, #14532d 100%); }
.cc-bg-hearts { background-color: #fff1f2; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M14 20c-3-5-11-4-11 2 0 5 11 11 11 11s11-6 11-11c0-6-8-7-11-2z' fill='%23fda4af' opacity='.55'/%3E%3Cpath d='M42 46c-2-3-7-2-7 1 0 3 7 7 7 7s7-4 7-7c0-3-5-4-7-1z' fill='%23f9a8d4' opacity='.5'/%3E%3C/svg%3E"); background-size: 56px 56px; }
.cc-bg-dots { background-color: #f0f9ff; background-image: radial-gradient(#7dd3fc 1.4px, transparent 1.6px); background-size: 18px 18px; }
.cc-bg-waves { background-color: #ecfeff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='24' viewBox='0 0 80 24'%3E%3Cpath d='M0 12c10 0 10-8 20-8s10 8 20 8 10-8 20-8 10 8 20 8' fill='none' stroke='%2367e8f9' stroke-width='2' opacity='.6'/%3E%3C/svg%3E"); background-size: 80px 24px; }
.cc-bg-stars { background-color: #111827; background-image: radial-gradient(#fde68a 1px, transparent 1.4px), radial-gradient(#ffffff 1px, transparent 1.3px); background-size: 46px 46px, 29px 29px; background-position: 0 0, 13px 17px; }
/* keep text readable on any background — the colours follow the BACKGROUND (light or dark), not light/dark mode */
.cc-has-bg .cc-intro { background: transparent !important; }
.cc-tone-light .cc-intro, .cc-tone-light .cc-intro .text-neutral-500 { color: #262626 !important; }
.cc-tone-dark .cc-intro, .cc-tone-dark .cc-intro .text-neutral-500 { color: #fff !important; text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.cc-tone-dark .cc-intro .text-neutral-500 { opacity: .85; }
.cc-has-bg .cc-label { width: fit-content; max-width: 90%; margin-left: auto; margin-right: auto; padding: 2px 10px; border-radius: 99px; backdrop-filter: blur(6px); }
.cc-tone-light .cc-label { background: rgba(255,255,255,.6); color: #404040 !important; }
.cc-tone-dark .cc-label { background: rgba(0,0,0,.38); color: #f5f5f5 !important; }
.cc-has-bg .cc-sender { margin-left: 2.6rem; padding: 1px 8px; }
.mini-msgs.cc-has-bg .cc-sender { margin-left: 2.2rem; }
.cc-has-bg .cc-label.cc-right { margin-right: 0; }
.cc-has-bg .cc-label.cc-left { margin-left: 0; }
.cc-has-bg .bubble-theirs { box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* background picker */
.cc-bg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cc-bg-tile { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: #525252; }
.dark .cc-bg-tile { color: #d4d4d4; }
.cc-bg-tile > span { width: 100%; aspect-ratio: 3 / 4; border-radius: 14px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .15s; }
.cc-bg-tile:hover > span { transform: scale(1.04); }
.cc-bg-tile.on > span { box-shadow: 0 0 0 3px #0ea5e9; }
.cc-bg-none, .cc-bg-up { background: #f5f5f5; color: #a3a3a3; font-size: 20px; }
.dark .cc-bg-none, .dark .cc-bg-up { background: rgba(255,255,255,.06); }
.cc-bg-up { color: #0284c7; }

/* Shared in chat: Photos · Videos · Files */
.cc-media-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px; background: inherit; background: #fff; }
.dark .cc-media-head { background: #111111; }
.cc-mtabs { position: sticky; top: 56px; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid #e5e5e5; background: #fff; }
.dark .cc-mtabs { background: #111111; border-color: rgba(255,255,255,.07); }
.cc-mtab { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; font-size: 13.5px; font-weight: 600; color: #737373; }
.cc-mtab small { font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 99px; background: #f0f0f0; color: #737373; }
.dark .cc-mtab small { background: rgba(255,255,255,.08); }
.cc-mtab.on { color: #0284c7; }
.dark .cc-mtab.on { color: #38bdf8; }
.cc-mtab.on::after { content: ''; position: absolute; left: 14%; right: 14%; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: #0ea5e9; }
.cc-mtab.on small { background: #e0f2fe; color: #0284c7; }
.cc-mvid { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: #000; }
.cc-mvid video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cc-mvid-play { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border-radius: 99px; display: grid; place-items: center; background: rgba(0,0,0,.5); color: #fff; font-size: 12px; padding-left: 2px; }
.cc-mvid small { position: absolute; right: 5px; bottom: 4px; color: #fff; font: 600 10.5px/1 ui-monospace, monospace; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.cc-mfile { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.cc-mfile:hover { background: #f5f5f5; }
.dark .cc-mfile:hover { background: rgba(255,255,255,.05); }
@media (min-width: 640px) {
  .ck-sheet-wrap.cc-sheet-wide .ck-sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 460px; max-height: 84vh; border-radius: 22px; transform: translate(-50%, -50%); animation: ckPopC .18s ease-out; }
}

/* lightbox buttons (Save / Close) */
.lb-btn { width: 44px; height: 44px; border-radius: 99px; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; font-size: 18px; }
.lb-btn:hover { background: rgba(255,255,255,.24); }
.lightbox video { cursor: auto; }

/* story: tap the name / photo → profile */
a.sv-avatar { display: block; }
.sv-name-link { color: #fff; }
.sv-name-link:hover { text-decoration: underline; }

/* v19.10 — every chat head moves on its own */
#ccHeads .ch-head.ch-free { position: fixed; z-index: 241; }
#ccHeads .ch-head.ch-drag { transition: none; animation: none; z-index: 250; transform: scale(1.06); }
#ccHeads .ch-head.ch-drag > img { box-shadow: 0 12px 28px rgba(0,0,0,.35); }
#ccHeads .ch-head.ch-hot { transform: scale(.85); opacity: .8; }
#ccHeads .ch-head.ch-snap { transition: left .25s ease, right .25s ease, top .25s ease; }
#ccHeads .ch-head.side-left .ch-x { left: auto; right: -6px; }
#ccHeads .ch-head.side-right .ch-x { right: auto; left: -6px; }
#ccHeads .ch-head.side-left .ch-tip { right: auto; left: calc(100% + 10px); }
#ccHeads .ch-head.side-right .ch-tip { left: auto; right: calc(100% + 10px); }
@media (max-width: 640px) {
  body.mini-open #ccHeads .ch-head.ch-free { position: relative; left: auto !important; right: auto !important; top: auto !important; }
}
/* long-press a file / video on phones without the browser's own link menu */
.cc-file, .cc-vid video { -webkit-touch-callout: none; }
/* on a chat background: file cards and "unsent" bubbles stay solid so they're readable in dark mode too */
.dark .cc-has-bg .cc-file.mine { background: #0c4a6e; }
.cc-has-bg .italic.border { backdrop-filter: blur(6px); }
.cc-tone-light .italic.border { background: rgba(255,255,255,.7); color: #525252 !important; }
.cc-tone-dark .italic.border { background: rgba(0,0,0,.4); color: #e5e5e5 !important; }

/* phones: no double-tap zoom anywhere (pinch zoom is off in the viewport tag) */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* =========================================================
   v20 — Tambot
   ========================================================= */
.ai-hero { display: flex; align-items: center; gap: 14px; padding: 18px 20px; color: #fff; background: linear-gradient(135deg, #e11d48, #9333ea); }
.ai-hero.ok { background: linear-gradient(135deg, #0ea5e9, #4f46e5); }
.ai-hero img { border-radius: 99px; box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.ai-label { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: #ffe4e6; color: #be123c; }
.dark .ai-label { background: rgba(244,63,94,.15); color: #fda4af; }
.ai-quote { padding: 10px 12px; border-radius: 10px; background: #f5f5f5; border-left: 3px solid #d4d4d4; }
.dark .ai-quote { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.15); }
.ai-blur { filter: blur(14px); transition: filter .2s; cursor: pointer; }
.ai-blur:hover { filter: blur(6px); }
.ai-strikes { padding: 14px; border-radius: 14px; border: 1px solid #e5e5e5; display: grid; gap: 8px; }
.dark .ai-strikes { border-color: rgba(255,255,255,.08); }
.ai-strike-bar { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 5px; }
.ai-strike-bar span { height: 8px; border-radius: 99px; background: #e5e5e5; position: relative; }
.dark .ai-strike-bar span { background: rgba(255,255,255,.1); }
.ai-strike-bar span.on { background: #f43f5e; }
.ai-strike-bar span.mark::after { content: ''; position: absolute; right: -3px; top: -4px; width: 2px; height: 16px; border-radius: 2px; background: #737373; }
.ai-sent { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 14px; background: #ecfdf5; color: #047857; }
.dark .ai-sent { background: rgba(16,185,129,.1); color: #6ee7b7; }
.ai-sent i { margin-top: 3px; }
.ai-appeal summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 14px; color: #0284c7; padding: 2px 0; }
.ai-appeal summary::-webkit-details-marker { display: none; }
.dark .ai-appeal summary { color: #38bdf8; }
.ai-rules { display: grid; gap: 8px; font-size: 14px; }
.ai-rules li { display: flex; align-items: center; gap: 10px; }
.ai-rules i { width: 30px; height: 30px; flex-shrink: 0; border-radius: 99px; display: grid; place-items: center; font-size: 12px; background: #f0f9ff; color: #0284c7; }
.dark .ai-rules i { background: rgba(14,165,233,.12); color: #7dd3fc; }
/* Developer panel */
.ai-opt { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid #e5e5e5; cursor: pointer; }
.dark .ai-opt { border-color: rgba(255,255,255,.08); }
.ai-opt b { display: block; font-size: 14px; }
.ai-opt small { display: block; font-size: 12px; color: #737373; }
.ai-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: #f5f5f5; }
.dark .ai-seg { background: rgba(255,255,255,.06); }
.ai-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ai-seg span { display: block; text-align: center; padding: 6px 4px; border-radius: 9px; font-size: 13px; font-weight: 600; color: #737373; cursor: pointer; }
.ai-seg input:checked + span { background: #fff; color: #0284c7; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.dark .ai-seg input:checked + span { background: rgba(255,255,255,.12); color: #7dd3fc; }
.ai-limits { padding: 12px; border-radius: 14px; border: 1px solid #e5e5e5; }
.dark .ai-limits { border-color: rgba(255,255,255,.08); }
.ai-verdict { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; }
.ai-verdict > i { margin-top: 3px; font-size: 18px; }
.ai-v-remove { background: #fff1f2; color: #be123c; }
.ai-v-review { background: #fffbeb; color: #b45309; }
.ai-v-ok { background: #ecfdf5; color: #047857; }
.dark .ai-v-remove { background: rgba(244,63,94,.12); color: #fda4af; }
.dark .ai-v-review { background: rgba(245,158,11,.12); color: #fcd34d; }
.dark .ai-v-ok { background: rgba(16,185,129,.12); color: #6ee7b7; }
.ai-badge { display: inline-block; vertical-align: 1px; padding: 0 5px; border-radius: 5px; font-size: 10px; font-weight: 800; letter-spacing: .04em; line-height: 16px; color: #fff; background: linear-gradient(135deg, #38bdf8, #4f46e5); }
.ai-badge.on-dark { background: rgba(255,255,255,.25); }

/* =========================================================
   v21 — announcements: one-line banner → popup with the full text (scrolls)
   ========================================================= */
.announce[data-announce-open], [data-ann-preview-open].announce { cursor: pointer; align-items: center; transition: transform .15s, box-shadow .15s; }
.announce[data-announce-open]:hover { box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.announce[data-announce-open]:active { transform: scale(.99); }
.announce-from { display: block; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.announce-head { font-weight: 700; font-size: 14.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce-read { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: rgba(255,255,255,.7); }
.announce-read i { font-size: 10px; }
.dark .announce-read { background: rgba(255,255,255,.08); }
.announce template { display: none; }

.ann-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; animation: fadeIn .15s ease-out; }
.ann-modal .modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(3px); }
.ann-panel { position: relative; width: 100%; max-width: 500px; max-height: min(82vh, 720px); display: flex; flex-direction: column; overflow: hidden;
  border-radius: 16px; background: #fff; box-shadow: 0 12px 40px rgba(0,0,0,.18); animation: annIn .18s ease-out; }
.dark .ann-panel { background: #1a1a1a; box-shadow: 0 12px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.07); }
.ann-out { opacity: 0; transition: opacity .18s; }
.ann-out .ann-panel { transform: scale(.97); transition: transform .18s; }
@keyframes annIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.ann-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 4px 20px; }
.ann-av { width: 36px; height: 36px; border-radius: 99px; flex-shrink: 0; background: #fff; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.ann-who { flex: 1; min-width: 0; line-height: 1.25; }
.ann-who b { display: block; font-size: 14px; font-weight: 700; }
.ann-who small { display: block; font-size: 12.5px; color: #737373; }
.dark .ann-who small { color: #a3a3a3; }
.ann-lvl { font-weight: 700; }
.ann-warning .ann-lvl { color: #b45309; } .ann-danger .ann-lvl { color: #be123c; }
.dark .ann-warning .ann-lvl { color: #fbbf24; } .dark .ann-danger .ann-lvl { color: #fb7185; }
.ann-close { width: 34px; height: 34px; flex-shrink: 0; border-radius: 99px; display: grid; place-items: center; color: #737373; }
.ann-close:hover { background: #f5f5f5; }
.dark .ann-close:hover { background: rgba(255,255,255,.07); }
.ann-title { font-size: 19px; font-weight: 700; line-height: 1.3; margin: 6px 0 10px; word-break: break-word; }
.ann-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 4px 20px 8px; font-size: 15px; line-height: 1.6; color: #262626; overscroll-behavior: contain; }
.dark .ann-body { color: #e5e5e5; }
.ann-body p { margin: 0 0 10px; word-break: break-word; }
.ann-body h3 { margin: 14px 0 4px; font-size: 15px; font-weight: 700; }
.ann-body ul { margin: 0 0 10px; padding-left: 20px; list-style: disc; }
.ann-body li { margin: 2px 0; word-break: break-word; }
.ann-body a { color: #0284c7; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.dark .ann-body a { color: #7dd3fc; }
/* soft fade at the bottom while there's more to read */
.ann-panel.ann-more .ann-foot { box-shadow: 0 -14px 20px -6px rgba(255,255,255,.95); }
.dark .ann-panel.ann-more .ann-foot { box-shadow: 0 -14px 20px -6px rgba(22,22,22,.95); }
.ann-foot { position: relative; display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px 14px; background: inherit; }
.ann-link { margin-right: auto; font-size: 14px; font-weight: 600; color: #0284c7; padding: 0 4px; }
.dark .ann-link { color: #7dd3fc; }
.ann-link:hover { text-decoration: underline; }
.dark .ann-foot { border-color: rgba(255,255,255,.06); }
@media (max-width: 640px) {
  .ann-modal { padding: 0; place-items: end center; }
  .ann-panel { max-width: none; max-height: 88dvh; border-radius: 16px 16px 0 0; animation: annUp .22s ease-out; }
  .ann-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  @keyframes annUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* =========================================================
   v22 — Notifications: announcements inside · delete one · "See more" at the bottom
   ========================================================= */
.notif-row { position: relative; display: flex; align-items: center; gap: 2px; border-radius: 14px; transition: background .15s, opacity .2s, transform .2s, max-height .25s; }
.notif-row:hover { background: #f5f5f5; }
.dark .notif-row:hover { background: rgba(255,255,255,.05); }
.notif-row.unread { background: #eff8ff; }
.notif-row.unread:hover { background: #e0f0fe; }
.dark .notif-row.unread { background: rgba(14,165,233,.08); }
.dark .notif-row.unread:hover { background: rgba(14,165,233,.12); }
.notif-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px; text-align: left; border-radius: 14px; color: inherit; }
.notif-ic { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; color: #fff; background: #0284c7; box-shadow: 0 0 0 2px #fff; }
.dark .notif-ic { box-shadow: 0 0 0 2px #161616; }
.notif-ic-ann { background: linear-gradient(135deg, #f59e0b, #ea580c); }
@media (min-width: 640px) { .notif-ic { width: 28px; height: 28px; } }
.notif-team { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.notif-time { font-size: 12px; font-weight: 600; color: #737373; }
.notif-row.unread .notif-time { color: #0369a1; }
.dark .notif-row.unread .notif-time { color: #38bdf8; }
.notif-dot { width: 12px; height: 12px; border-radius: 999px; background: #0284c7; flex-shrink: 0; }
.notif-del { flex-shrink: 0; width: 36px; height: 36px; margin-right: 4px; border-radius: 999px; display: grid; place-items: center; font-size: 13px; color: #a3a3a3; transition: background .15s, color .15s, opacity .15s; }
.notif-del:hover { background: #fee2e2; color: #e11d48; }
.dark .notif-del:hover { background: rgba(225,29,72,.15); color: #fb7185; }
@media (hover: hover) and (pointer: fine) { .notif-row .notif-del { opacity: 0; } .notif-row:hover .notif-del, .notif-del:focus-visible { opacity: 1; } }
.notif-row.notif-out { opacity: 0; transform: translateX(24px); pointer-events: none; }
.notif-row.notif-in { animation: notifIn .3s ease both; }
@keyframes notifIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.notif-more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; margin-top: 6px; border-radius: 12px; font-weight: 700; font-size: 15px; color: #0369a1; background: #f0f9ff; transition: background .15s; }
.notif-more:hover { background: #e0f2fe; }
.dark .notif-more { color: #7dd3fc; background: rgba(14,165,233,.1); }
.dark .notif-more:hover { background: rgba(14,165,233,.16); }
.notif-more i { font-size: 12px; }
.notif-more.loading span { opacity: .5; }
.notif-more.loading i { display: none; }
.notif-more.loading::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 999px; animation: notifSpin .7s linear infinite; }
@keyframes notifSpin { to { transform: rotate(360deg); } }

/* =========================================================
   v23 — story colors on the story itself (easy to tap on phones)
   ========================================================= */
.sc-stage-bgs { position: absolute; left: 8px; right: 8px; bottom: 10px; z-index: 13; display: flex; gap: 8px; padding: 6px 8px; overflow-x: auto; scrollbar-width: none;
  border-radius: 999px; background: rgba(0,0,0,.28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); touch-action: pan-x; }
.sc-stage-bgs::-webkit-scrollbar { display: none; }
.sc-stage-bgs .sc-swatch { flex: 0 0 auto; width: 28px; height: 28px; box-shadow: 0 0 0 2px rgba(255,255,255,.85); outline-offset: 2px; }
.sc-stage-bgs .sc-swatch.active { outline: 2px solid #fff; transform: scale(1.08); }
.sc-swatch { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.cc-bg-tile { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (hover: none) { .cc-bg-tile:hover > span { transform: none; } }
.ck-sheet { overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom); }

/* =========================================================
   v23 — Settings: phone = menu → one part · computer = menu left, part right
   ========================================================= */
.set-wrap { max-width: 1040px; margin: 0 auto; padding: 16px 12px 40px; display: grid; gap: 20px; }
.set-wrap * { min-width: 0; }
.set-nav { display: flex; flex-direction: column; gap: 12px; }
.set-me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 0 0 1px rgba(0,0,0,.04); transition: background .15s; }
.dark .set-me { background: #161616; box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
.set-me:hover { background: #fafafa; } .dark .set-me:hover { background: #1c1c1c; }
.set-menu { padding: 6px; border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 0 0 1px rgba(0,0,0,.04); }
.dark .set-menu { background: #161616; box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
.set-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 13px; transition: background .15s; }
.set-item:hover { background: #f5f5f5; } .dark .set-item:hover { background: rgba(255,255,255,.05); }
.set-item.on { background: #f0f9ff; } .dark .set-item.on { background: rgba(14,165,233,.12); }
.set-item.on .font-semibold { color: #0369a1; } .dark .set-item.on .font-semibold { color: #7dd3fc; }
.set-ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 15px; box-shadow: 0 6px 14px -8px rgba(0,0,0,.5); }
.set-chev { color: #a3a3a3; font-size: 12px; flex-shrink: 0; }
.set-main { display: none; }
.set-panel { display: none; flex-direction: column; gap: 14px; animation: setIn .22s ease both; }
.set-panel.on { display: flex; }
@keyframes setIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.set-head { display: flex; align-items: center; gap: 10px; padding: 0 2px; }
.set-head h2 { font-size: 22px; font-weight: 800; line-height: 1.2; }
.set-head p { font-size: 13px; color: #737373; } .dark .set-head p { color: #a3a3a3; }
.set-back { width: 40px; height: 40px; flex-shrink: 0; border-radius: 999px; display: grid; place-items: center; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.dark .set-back { background: #1c1c1c; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
/* phone: the menu OR the part you opened */
.set-wrap.set-open .set-nav { display: none; }
.set-wrap.set-open .set-main { display: block; }
@media (min-width: 900px) {
  .set-wrap { grid-template-columns: 330px minmax(0, 1fr); align-items: start; padding-top: 24px; gap: 28px; }
  .set-nav { position: sticky; top: 76px; }
  .set-wrap .set-main, .set-wrap.set-open .set-main { display: block; }
  .set-wrap.set-open .set-nav { display: flex; }
  .set-back { display: none; }
  .set-item .set-chev { opacity: 0; } .set-item.on .set-chev, .set-item:hover .set-chev { opacity: 1; }
}
.set-cover { position: relative; height: 150px; background: linear-gradient(135deg, #bae6fd, #c7d2fe); }
.dark .set-cover { background: linear-gradient(135deg, #0c4a6e, #312e81); }
@media (min-width: 640px) { .set-cover { height: 190px; } }
.set-chip { height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; font-size: 14px; font-weight: 700; background: rgba(255,255,255,.92); color: #262626; box-shadow: 0 4px 12px rgba(0,0,0,.15); backdrop-filter: blur(6px); }
.set-cam { position: absolute; right: 0; bottom: 2px; width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-size: 13px; background: #e5e5e5; color: #262626; box-shadow: 0 0 0 3px #fff; }
.dark .set-cam { background: #333; color: #fff; box-shadow: 0 0 0 3px #161616; }
.set-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 14px; background: #f5f5f5; cursor: pointer; }
.dark .set-toggle { background: rgba(255,255,255,.05); }
.set-date { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; display: block; text-align: left; line-height: 44px; }
.set-date::-webkit-date-and-time-value { text-align: left; }
.set-btns { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 480px) { .set-btns .btn { flex: 1 1 calc(50% - 4px); justify-content: center; } }
.set-help summary { cursor: pointer; font-size: 14px; font-weight: 700; color: #404040; } .dark .set-help summary { color: #d4d4d4; }
.set-help ul { margin-top: 8px; padding-left: 18px; list-style: disc; font-size: 13.5px; color: #525252; display: grid; gap: 6px; } .dark .set-help ul { color: #a3a3a3; }
.set-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.set-theme { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px; border-radius: 16px; border: 2px solid transparent; font-size: 13px; transition: .15s; }
.set-theme.on { border-color: #0ea5e9; background: #f0f9ff; } .dark .set-theme.on { background: rgba(14,165,233,.1); }
.set-theme-pic { width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.set-theme-pic i { display: block; height: 8px; border-radius: 99px; }
.set-theme-pic i:first-child { width: 60%; } .set-theme-pic i:nth-child(2) { width: 90%; } .set-theme-pic i:last-child { width: 40%; background: #0ea5e9 !important; }
.set-theme-pic.light { background: #fff; } .set-theme-pic.light i { background: #e5e5e5; }
.set-theme-pic.dark { background: #171717; } .set-theme-pic.dark i { background: #3f3f3f; }
.set-theme-pic.auto { background: linear-gradient(135deg, #fff 50%, #171717 50%); } .set-theme-pic.auto i { background: #a3a3a3; }

/* =========================================================
   v23 — many photos in one post (grid like Facebook) + swipe in full screen
   ========================================================= */
.post-grid { display: grid; gap: 3px; background: #fff; }
.dark .post-grid { background: #161616; }
.post-grid .pg-cell { position: relative; overflow: hidden; background: #f0f0f0; min-height: 0; }
.dark .post-grid .pg-cell { background: rgba(255,255,255,.05); }
.post-grid img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; transition: transform .25s, filter .2s; }
@media (hover: hover) { .post-grid .pg-cell:hover img { filter: brightness(.94); } }
.pg-2 { grid-template-columns: 1fr 1fr; aspect-ratio: 2 / 1.25; }
.pg-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1.35fr 1fr; aspect-ratio: 1 / 1; }
.pg-3 .pg-cell:first-child { grid-column: 1 / -1; }
.pg-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 1 / 1; }
.pg-5 { grid-template-columns: repeat(6, 1fr); grid-template-rows: 1.25fr 1fr; aspect-ratio: 1 / 1; }
.pg-5 .pg-cell:nth-child(-n+2) { grid-column: span 3; }
.pg-5 .pg-cell:nth-child(n+3) { grid-column: span 2; }
.pg-more { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(22px, 7vw, 34px); font-weight: 800; color: #fff; background: rgba(0,0,0,.45); pointer-events: none; }
.pg-embed { max-height: 320px; aspect-ratio: auto; height: 280px; }
.pg-embed img { cursor: pointer; }
@media (min-width: 640px) { .pg-2, .pg-3, .pg-4, .pg-5 { max-height: 640px; } }

/* composer: picked photos */
.pm-thumbs { display: grid; gap: 6px; }
.pm-thumbs.pt-1 { grid-template-columns: 1fr; }
.pm-thumbs.pt-2 { grid-template-columns: 1fr 1fr; }
.pm-thumbs.pt-3 { grid-template-columns: repeat(3, 1fr); }
.pm-thumb { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 1 / 1; background: #f0f0f0; }
.dark .pm-thumb { background: rgba(255,255,255,.06); }
.pm-thumbs.pt-1 .pm-thumb { aspect-ratio: auto; max-height: 288px; }
.pm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; animation: popIn .2s ease-out; }
.pm-thumb-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; font-size: 13px; color: #fff; background: rgba(0,0,0,.6); }
.pm-thumb-x:hover { background: rgba(0,0,0,.8); }
.pm-thumb-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 90px; font-size: 13px; font-weight: 700; color: #0369a1;
  border: 2px dashed #bae6fd; background: #f0f9ff; }
.dark .pm-thumb-add { color: #7dd3fc; border-color: rgba(14,165,233,.35); background: rgba(14,165,233,.08); }
.pm-thumb-add i { font-size: 20px; }
.pm-thumb-add span { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.pm-thumb-add small { font-weight: 600; opacity: .7; }
[data-pm-preview]:has(.pm-thumbs:not(.hidden)) [data-pm-clear-image] { top: -2px; right: -2px; width: 28px; height: 28px; display: none; }

/* full screen: arrows + "2 / 7" */
.lb-gal { cursor: default; }
.lb-gal [data-lb-img] { cursor: default; user-select: none; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px; border-radius: 999px; display: grid; place-items: center; color: #fff; font-size: 17px;
  background: rgba(255,255,255,.14); backdrop-filter: blur(6px); transition: background .15s; z-index: 5; }
.lb-nav:hover { background: rgba(255,255,255,.26); }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
@media (pointer: coarse) { .lb-nav { width: 38px; height: 38px; margin-top: -19px; font-size: 14px; background: rgba(0,0,0,.35); } .lb-prev { left: 6px; } .lb-next { right: 6px; } }
.lb-count { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: rgba(255,255,255,.14); }
.lb-from-r { animation: lbFromR .22s ease-out; } .lb-from-l { animation: lbFromL .22s ease-out; }
@keyframes lbFromR { from { opacity: .3; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes lbFromL { from { opacity: .3; transform: translateX(-40px); } to { opacity: 1; transform: none; } }

/* =========================================================
   v23 — post video: volume slider beside the sound button (drag up = louder)
   ========================================================= */
.pv-vol { position: absolute; z-index: 6; width: 40px; height: 150px; padding: 12px 0 26px; border-radius: 999px; display: flex; flex-direction: column; align-items: center;
  background: rgba(0,0,0,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); touch-action: none; cursor: pointer;
  opacity: 0; transform: translateX(8px) scale(.96); pointer-events: none; transition: opacity .18s, transform .18s; --lv: 100%; }
.pv-vol.show { opacity: 1; transform: none; pointer-events: auto; }
.pv-vol-track { position: relative; flex: 1; width: 6px; border-radius: 99px; background: rgba(255,255,255,.3); }
.pv-vol-fill { position: absolute; left: 0; right: 0; bottom: 0; height: var(--lv); border-radius: 99px; background: #fff; }
.pv-vol-knob { position: absolute; left: 50%; bottom: var(--lv); width: 16px; height: 16px; margin: 0 0 -8px -8px; border-radius: 99px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.pv-vol-pct { position: absolute; bottom: 6px; font-size: 10.5px; font-weight: 800; color: #fff; }

/* =========================================================
   v23 — story creator: tools on the story (Aa · emoji · photo · music), text editor, photos on top
   ========================================================= */
.sc-stage { max-height: 62dvh; }
@media (min-width: 768px) { .sc-stage { max-height: none; } }
.sc-rail { position: absolute; top: 10px; right: 8px; z-index: 14; display: flex; flex-direction: column; gap: 8px; }
.sc-rail-btn { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; color: #fff; font-size: 16px;
  background: rgba(0,0,0,.32); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 0 1px rgba(255,255,255,.18); transition: transform .15s, background .15s; touch-action: manipulation; }
.sc-rail-btn:hover { background: rgba(0,0,0,.45); }
.sc-rail-btn:active { transform: scale(.9); }
.sc-hint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 14; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(0,0,0,.5); white-space: nowrap; pointer-events: none; animation: fadeIn .2s ease-out; }
.sc-hint.hidden { display: none; }
/* typing text on the story */
.sc-texted { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); animation: fadeIn .15s ease-out; }
.sc-texted.hidden { display: none; }
.sc-texted-top { display: flex; align-items: center; justify-content: space-between; padding: 10px; }
.sc-te-chip { height: 32px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: rgba(255,255,255,.18); }
.sc-te-done { height: 32px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 800; color: #111; background: #fff; }
.sc-te-input { flex: 1; margin: 0 14px; background: transparent !important; border: 0; outline: 0; resize: none; text-align: center; font-size: 26px; font-weight: 800; color: var(--c); align-self: stretch;
  display: block; max-width: none !important; padding-top: 30%; caret-color: #fff; }
.sc-te-input.ov-b1 { background: transparent !important; color: var(--c); text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: .55em; text-underline-offset: -.4em; }
.sc-te-input::placeholder { color: rgba(255,255,255,.6); text-shadow: none; }
.sc-te-colors { display: flex; justify-content: center; gap: 9px; padding: 12px 10px 16px; flex-wrap: wrap; }
.sc-te-color { width: 26px; height: 26px; border-radius: 999px; box-shadow: 0 0 0 2px rgba(255,255,255,.8); transition: transform .15s; }
.sc-te-color.on { transform: scale(1.22); box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(14,165,233,.9); }
/* emoji & stickers on the story */
.sc-emopop { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 19; max-height: 58%; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  background: rgba(255,255,255,.96); box-shadow: 0 12px 30px rgba(0,0,0,.35); animation: popIn .18s ease-out; }
.dark .sc-emopop { background: rgba(28,28,28,.97); }
.sc-emopop.hidden { display: none; }
.sc-emopop-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 4px 14px; font-size: 13px; }
.sc-emopop-head button { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; }
.sc-emopop-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; padding: 4px 8px 10px; overflow-y: auto; }
.sc-emopop-grid button { aspect-ratio: 1; display: grid; place-items: center; font-size: 26px; border-radius: 10px; transition: transform .12s, background .12s; }
.sc-emopop-grid button:hover { background: rgba(0,0,0,.06); }
.sc-emopop-grid button:active { transform: scale(.85); }
.sc-emopop-grid .sc-emopop-st { grid-column: span 2; aspect-ratio: auto; padding: 4px; font-size: 14px; }
/* a photo on top of a story */
.ov-img img { display: block; width: 1em; height: auto; border-radius: .045em; border: .025em solid #fff; box-shadow: 0 .03em .12em rgba(0,0,0,.4); pointer-events: none; -webkit-user-drag: none; }
.sv-part { display: inline-block; padding: 0 6px; border-radius: 99px; background: rgba(255,255,255,.22); font-size: 10.5px; font-weight: 800; }
/* phones: the colors are already on the story itself */
@media (max-width: 767px) { #storyCreator [data-sc-panel="text"] { display: none; } }

/* =========================================================
   v23.2 — story creator: phone layout like Instagram / Facebook
   (modes always in view · the story fills the screen · tools open as a sheet · trim for videos)
   ========================================================= */
.sc-modebar, .sc-sheet-head, .sc-sheet-back { display: none; }
.sc-foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #e5e5e5; }
.dark .sc-foot { border-color: rgba(255,255,255,.07); }
.sc-foot .input { flex: 1; min-width: 0; }
.sc-share { flex: 1 0 auto; gap: 8px; }
.sc-foot .input:not(.hidden) + .sc-share { flex: 0 0 auto; padding: 0 18px; }
.sc-rail-btn { position: relative; }
.sc-rail-dot { position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 99px; background: #22c55e; box-shadow: 0 0 0 2px rgba(0,0,0,.3); }
.sc-rail-btn.hidden { display: none; }
.sc-preview { flex-direction: column; align-items: center; gap: 10px; }

/* trim */
.sc-trim { width: min(100%, 340px); user-select: none; }
.sc-trim.hidden { display: none; }
.sc-trim-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 6px; }
.sc-trim-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.sc-trim-label i { color: #0ea5e9; }
.sc-trim-range { color: #737373; flex: 1; }
.dark .sc-trim-range { color: #a3a3a3; }
.sc-trim-len { padding: 1px 8px; border-radius: 99px; background: #0ea5e9; color: #fff; font-size: 12px; }
.sc-trim-strip { position: relative; height: 52px; padding: 0 16px; touch-action: none; cursor: pointer; }
.sc-trim-track { position: relative; height: 100%; border-radius: 6px; background: #262626; }
.sc-trim-frames { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-trim-dim { position: absolute; top: 0; bottom: 0; background: rgba(0,0,0,.62); pointer-events: none; }
.sc-trim-dim.l { border-radius: 6px 0 0 6px; } .sc-trim-dim.r { border-radius: 0 6px 6px 0; }
.sc-trim-dim.l { left: 0; } .sc-trim-dim.r { right: 0; }
.sc-trim-win { position: absolute; top: 0; bottom: 0; border: 3px solid #facc15; border-left-width: 0; border-right-width: 0; cursor: grab; }
.sc-trim-h { position: absolute; top: -3px; bottom: -3px; width: 16px; z-index: 2; background: #facc15; display: grid; place-items: center; cursor: ew-resize; }
.sc-trim-h.l { left: -16px; border-radius: 8px 0 0 8px; } .sc-trim-h.r { right: -16px; border-radius: 0 8px 8px 0; }
.sc-trim-h i { width: 3px; height: 18px; border-radius: 2px; background: rgba(0,0,0,.55); }
.sc-trim-cur { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 4px rgba(0,0,0,.6); pointer-events: none; }

@media (max-width: 767px) {
  #storyCreator { padding: 0; align-items: stretch; }
  #storyCreator .sc-panel { max-width: none !important; width: 100%; height: 100dvh; max-height: 100dvh !important; border-radius: 0; background: #0b0b0b; color: #fff; }
  #storyCreator .modal-head { border-color: rgba(255,255,255,.08); background: #0b0b0b; color: #fff; }
  #storyCreator .modal-head .icon-btn { background: rgba(255,255,255,.1); color: #fff; }
  /* Text · Photo · Video · Collage */
  .sc-modebar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px 10px 4px; background: #0b0b0b; }
  .sc-modebar button { height: 38px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; font-size: 13px; font-weight: 700;
    color: #d4d4d4; background: rgba(255,255,255,.08); transition: background .15s, color .15s; }
  .sc-modebar button.active { color: #0b0b0b; background: #fff; }
  .sc-modebar button i { font-size: 13px; }
  /* the story fills the rest of the screen */
  #storyCreator .sc-body { flex: 1; min-height: 0; overflow: hidden; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
  #storyCreator .sc-preview { flex: 1; min-height: 0; padding: 0; border-radius: 0; background: none; justify-content: center; }
  #storyCreator .sc-stage { flex: 0 1 auto; height: 100%; max-height: 100%; width: auto; max-width: 100%; aspect-ratio: 9 / 16; border-radius: 18px; box-shadow: none; }
  #storyCreator.sc-has-trim .sc-stage { height: calc(100% - 82px); }
  #storyCreator .sc-trim { width: 100%; color: #fff; }
  /* tools: hidden until a button on the story opens them as a sheet */
  #storyCreator .sc-tools { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; max-height: 62dvh; overflow-y: auto; overscroll-behavior: contain;
    padding: 0 14px 18px; border-radius: 20px 20px 0 0; background: #fff; color: #171717; transform: translateY(105%); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
  .dark #storyCreator .sc-tools { background: #1c1c1c; color: #f5f5f5; }
  #storyCreator.sc-sheet-on .sc-tools { transform: none; box-shadow: 0 -12px 40px rgba(0,0,0,.4); }
  #storyCreator .sc-sheet-back { display: block; position: absolute; inset: 0; z-index: 29; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  #storyCreator.sc-sheet-on .sc-sheet-back { opacity: 1; pointer-events: auto; }
  #storyCreator .sc-sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2; padding: 6px 0 10px; background: inherit; flex-wrap: wrap; }
  #storyCreator .sc-sheet-head .sheet-handle { flex-basis: 100%; margin: 4px auto 8px; }
  #storyCreator .sc-sheet-head b { font-size: 17px; }
  .sc-sheet-done { height: 34px; padding: 0 16px; border-radius: 999px; font-weight: 800; font-size: 14px; color: #fff; background: #0ea5e9; }
  /* in the sheet: only the part that was opened */
  #storyCreator .sc-tools > .sc-modes, #storyCreator .sc-tools > .sc-extras, #storyCreator .sc-tools > [data-sc-panel="text"], #storyCreator .sc-tools > .sc-lasts { display: none !important; }
  #storyCreator:not([data-sheet="collage"]) .sc-tools > [data-sc-panel="collage"] { display: none !important; }
  #storyCreator[data-sheet="collage"] .sc-tools > [data-sc-sub] { display: none !important; }
  #storyCreator .sc-sub { margin-top: 0; }
  #storyCreator .sc-foot { padding: 10px; border-color: rgba(255,255,255,.08); background: #0b0b0b; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  #storyCreator .sc-foot .input { background: rgba(255,255,255,.1); color: #fff; }
  #storyCreator .sc-foot .input::placeholder { color: rgba(255,255,255,.55); }
  #storyCreator .sc-rail-btn { width: 42px; height: 42px; font-size: 17px; }
  #storyCreator .sc-emopop { max-height: 64%; }
}
@media (max-width: 767px) { #storyCreator .sc-sheet-head .sheet-handle { display: block; width: 40px; height: 4px; border-radius: 9px; background: #d4d4d4; flex: 0 0 40px; margin: 4px calc(50% - 20px) 8px; } }
.sc-stage-bgs.hidden { display: none; }
#storyCreator.sc-has-trim .sc-rail { top: 52px; }

/* =========================================================
   v24 — story main text: drag anywhere, pinch to resize
   ========================================================= */
#storyCreator .sc-text { inset: auto; left: 50%; top: 42%; width: 88%; height: auto; min-height: 1.6em; max-height: 90%; transform: translate(-50%, -50%);
  padding: 6px 10px; display: block; overflow: hidden; touch-action: none; cursor: grab; border-radius: 12px; line-height: 1.22; transition: outline-color .15s; outline: 2px dashed transparent; outline-offset: 2px; }
#storyCreator .sc-text:focus { outline-color: rgba(255,255,255,.55); cursor: text; }
#storyCreator .sc-text.dragging { outline-color: rgba(255,255,255,.9); cursor: grabbing; }
.sv-text-pos { position: absolute; width: 88%; transform: translate(-50%, -50%); padding: 0 !important; line-height: 1.22; }

/* v24 — music picker fits every phone: categories wrap (no sideways scrolling), one scroll only, bigger play button */
.mu-moods { flex-wrap: wrap; overflow: visible; }
.mu-mood { height: 30px; padding: 0 10px; font-size: 12px; }
.mu-pv { width: 38px; height: 38px; font-size: 13px; }
.mu-row { min-width: 0; }
@media (max-width: 767px) {
  #storyCreator .mu-list { max-height: none; overflow: visible; }
  #storyCreator [data-mu-browse] > .relative:first-child { position: sticky; top: 52px; z-index: 1; }
}

/* =========================================================
   v24 — profile counts, 3-friend stack, follow, people sheet · note hearts · settings rows
   ========================================================= */
.pf-counts { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 6px; font-size: 14.5px; color: #525252; }
.dark .pf-counts { color: #a3a3a3; }
.pf-counts button b { color: #171717; font-weight: 800; }
.dark .pf-counts button b { color: #f5f5f5; }
.pf-counts button:hover { text-decoration: underline; }
@media (min-width: 768px) { .pf-counts { justify-content: flex-start; } }
.pf-stack { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin-top: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; transition: background .15s; }
.pf-stack:hover { background: rgba(0,0,0,.04); } .dark .pf-stack:hover { background: rgba(255,255,255,.06); }
.pf-stack-pics { display: flex; flex-shrink: 0; }
.pf-stack-pics img, .pf-stack-more { width: 30px; height: 30px; border-radius: 999px; object-fit: cover; box-shadow: 0 0 0 2px #fff; margin-left: -9px; }
.dark .pf-stack-pics img, .dark .pf-stack-more { box-shadow: 0 0 0 2px #111111; }
.pf-stack-pics > :first-child { margin-left: 0; }
.pf-stack-more { display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #404040; background: #e5e5e5; }
.dark .pf-stack-more { color: #e5e5e5; background: #333; }
.pf-stack-text { min-width: 0; font-size: 13px; color: #525252; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dark .pf-stack-text { color: #a3a3a3; }
.pf-stack-text b { color: inherit; font-weight: 700; }
.pf-follow-off { background: #e0f2fe !important; color: #0369a1 !important; }
.dark .pf-follow-off { background: rgba(14,165,233,.15) !important; color: #7dd3fc !important; }
.pp-panel { max-width: 440px !important; height: min(640px, calc(100dvh - 32px)); }
@media (max-width: 640px) { .pp-panel { height: 100dvh; } }
.pp-tabs { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid #e5e5e5; overflow-x: auto; }
.dark .pp-tabs { border-color: rgba(255,255,255,.07); }
.pp-tabs button { flex: 1 0 auto; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #f5f5f5; }
.dark .pp-tabs button { background: rgba(255,255,255,.07); }
.pp-tabs button.on { background: #0ea5e9; color: #fff; }
.pp-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; }
.pp-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.pp-row:hover { background: #f5f5f5; } .dark .pp-row:hover { background: rgba(255,255,255,.05); }
.pp-row img { width: 46px; height: 46px; border-radius: 999px; object-fit: cover; flex-shrink: 0; }
/* notes: ❤️ */
.nv-heart { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 18px; margin-top: 12px; border-radius: 999px; font-weight: 800; font-size: 14px;
  color: #e11d48; background: #ffe4e6; transition: transform .15s; }
.dark .nv-heart { background: rgba(225,29,72,.15); color: #fb7185; }
.nv-heart.on { color: #fff; background: #e11d48; }
.nv-heart.pop i { animation: pvPop .45s cubic-bezier(.3,1.6,.5,1); }
.nm-hearts { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 800; color: #e11d48; background: #ffe4e6; }
.dark .nm-hearts { background: rgba(225,29,72,.15); color: #fb7185; }
.nm-hearts.hidden, .nm-hearts-list.hidden { display: none; }
.nm-hearts-list { margin-top: 8px; max-height: 200px; overflow-y: auto; text-align: left; border-radius: 12px; background: #fafafa; padding: 4px; }
.dark .nm-hearts-list { background: rgba(255,255,255,.04); }
.nm-heart-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; }
.nm-heart-row img { width: 36px; height: 36px; border-radius: 999px; object-fit: cover; }
.nm-heart-row i { position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 99px; display: grid; place-items: center; font-size: 9px; color: #fff; background: #e11d48; box-shadow: 0 0 0 2px #fff; }
/* settings rows */
.set-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; cursor: pointer; }
.set-row:hover { background: #fafafa; } .dark .set-row:hover { background: rgba(255,255,255,.03); }
.set-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.set-seg button { height: 42px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; font-size: 13px; font-weight: 700; border: 2px solid #e5e5e5; }
.dark .set-seg button { border-color: rgba(255,255,255,.1); }
.set-seg button.on { border-color: #0ea5e9; background: #f0f9ff; color: #0369a1; }
.dark .set-seg button.on { background: rgba(14,165,233,.12); color: #7dd3fc; }
.set-upsound { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: #faf5ff; }
.dark .set-upsound { background: rgba(168,85,247,.08); }

/* =========================================================
   v25 — Chichat: vanish mode · disappearing messages · no text highlight on long-press
   ========================================================= */
.cc-modes { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; color: #0369a1; background: #f0f9ff; border-bottom: 1px solid #e0f2fe; }
.dark .cc-modes { color: #7dd3fc; background: rgba(14,165,233,.08); border-color: rgba(14,165,233,.15); }
.cc-modes.hidden { display: none; }
.cc-modes span { flex: 1; min-width: 0; }
.cc-modes button { flex-shrink: 0; height: 26px; padding: 0 10px; border-radius: 999px; font-weight: 800; font-size: 12px; background: rgba(14,165,233,.15); }
#chichat.cc-vanish #ccMessages { background: #121212 !important; }
#chichat.cc-vanish .cc-modes { color: #e9d5ff; background: #1e1033; border-color: #2e1065; }
#chichat.cc-vanish .cc-modes button { background: rgba(168,85,247,.3); color: #fff; }
#chichat.cc-vanish #ccMessages .bubble-theirs { background: #2a2a2a; color: #f5f5f5; }
#chichat.cc-vanish #ccMessages .bubble-mine { background: linear-gradient(135deg, #7c3aed, #a855f7); }
#chichat.cc-vanish #ccMessages .cc-label, #chichat.cc-vanish #ccMessages .cc-sys { color: #a3a3a3; }
/* phones: holding a message opens the menu — don't select (highlight) its text */
@media (pointer: coarse) {
  #ccMessages [data-mid], #ccMessages [data-mid] *, .mini-msgs > *, .mini-msgs > * * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
}

/* v25 — long posts & comments: "See more" */
.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--clamp, 6); line-clamp: var(--clamp, 6); overflow: hidden; }
.see-more { display: inline-block; margin-top: 2px; font-size: 14px; font-weight: 700; color: #525252; }
.see-more:hover { text-decoration: underline; }
.dark .see-more { color: #a3a3a3; }
[data-comment] .see-more { font-size: 12.5px; }
/* v25 — Marketplace item in a chat: seller's quick buttons */
.chat-listing-acts { display: flex; gap: 4px; margin-top: 4px; }
.chat-listing-acts button { height: 28px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #f5f5f5; color: #404040; }
.dark .chat-listing-acts button { background: rgba(255,255,255,.08); color: #e5e5e5; }
.chat-listing-acts button.on { background: #0ea5e9; color: #fff; }
.chat-listing-acts button[data-lst-st="sold"].on { background: #525252; }
.chat-listing-acts button[data-lst-st="pending"].on { background: #f59e0b; }

/* =========================================================
   v25 — Reels: full screen, one at a time, swipe up for the next
   ========================================================= */
.reels { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; background: #000; }
.reels-top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; pointer-events: none;
  background: linear-gradient(rgba(0,0,0,.45), transparent); color: #fff; }
.reels-top h1 { font-size: 22px; font-weight: 800; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.reels-create { pointer-events: auto; height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; font-weight: 800; font-size: 14px;
  color: #fff; background: rgba(255,255,255,.18); backdrop-filter: blur(8px); }
.reels-scroll { flex: 1; min-height: 0; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.reels-scroll::-webkit-scrollbar { display: none; }
.reels-loading, .reels-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #d4d4d4; font-size: 15px; text-align: center; padding: 20px; }
.reels-loading i { font-size: 28px; }
.reels-empty > i { font-size: 46px; margin-bottom: 6px; color: #38bdf8; }
.reels-empty b { font-size: 20px; color: #fff; }
.reel { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; display: grid; place-items: center; background: #000; }
.reel video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.reel-shade { position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, rgba(0,0,0,.65)); pointer-events: none; }
.reel-info { position: absolute; left: 14px; right: 76px; bottom: 22px; color: #fff; z-index: 2; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.reel-by { display: flex; align-items: center; gap: 10px; }
.reel-by a { display: flex; align-items: center; gap: 8px; min-width: 0; }
.reel-by img { width: 36px; height: 36px; border-radius: 999px; object-fit: cover; box-shadow: 0 0 0 2px #fff; flex-shrink: 0; }
.reel-by b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reel-follow { height: 28px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 800; color: #fff; box-shadow: inset 0 0 0 1.5px #fff; flex-shrink: 0; }
.reel-follow.on { box-shadow: none; background: rgba(255,255,255,.2); }
.reel-meta { font-size: 12px; opacity: .85; margin-top: 4px; }
.reel-cap { margin-top: 6px; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; white-space: pre-line; word-break: break-word; }
.reel-cap.open { -webkit-line-clamp: unset; max-height: 40vh; overflow-y: auto; }
.reel-rail { position: absolute; right: 10px; bottom: 26px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.reel-rail > * { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); transition: transform .15s; }
.reel-rail > *:active { transform: scale(.88); }
.reel-rail i { font-size: 27px; }
.reel-rail b { font-size: 12.5px; font-weight: 700; min-height: 1px; }
.reel-rail b:empty { display: none; }
.reel-rail .on i { color: #ff3040; }
.reel-rail .pop i { animation: pvPop .45s cubic-bezier(.3,1.6,.5,1); }
.reel-rail [data-reel-sound] { width: 40px; height: 40px; justify-content: center; border-radius: 99px; background: rgba(0,0,0,.4); filter: none; }
.reel-rail [data-reel-sound] i { font-size: 17px; }
.reel-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.2); z-index: 3; }
.reel-bar span { display: block; height: 100%; width: 0; background: #fff; }
.reel-paused { position: absolute; z-index: 2; width: 72px; height: 72px; border-radius: 99px; display: grid; place-items: center; font-size: 28px; color: #fff; background: rgba(0,0,0,.4);
  opacity: 0; transform: scale(.7); transition: .18s; pointer-events: none; }
.reel.is-paused .reel-paused { opacity: 1; transform: none; }
.reel-burst { position: absolute; z-index: 3; font-size: 96px; color: #ff3040; opacity: 0; pointer-events: none; filter: drop-shadow(0 4px 16px rgba(0,0,0,.4)); }
.reel-burst.go { animation: reelBurst .8s ease-out; }
@keyframes reelBurst { 0% { opacity: 0; transform: scale(.4); } 20% { opacity: 1; transform: scale(1.15); } 60% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.1) translateY(-30px); } }
/* create reel */
.rc-panel { max-width: 460px !important; }
.rc-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.rc-pick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 220px; border-radius: 18px; cursor: pointer; text-align: center; padding: 16px;
  border: 2px dashed #bae6fd; background: #f0f9ff; color: #0369a1; }
.dark .rc-pick { border-color: rgba(14,165,233,.35); background: rgba(14,165,233,.08); color: #7dd3fc; }
.rc-pick.hidden { display: none; }
.rc-pick-ic { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; font-size: 24px; color: #fff; background: linear-gradient(135deg, #38bdf8, #0369a1); }
.rc-pick small { font-size: 12px; opacity: .8; }
.rc-preview { position: relative; align-self: center; width: min(100%, 240px); aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #000; }
.rc-preview video { width: 100%; height: 100%; object-fit: cover; }
.rc-change, .rc-len { position: absolute; top: 8px; height: 28px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); }
.rc-change { right: 8px; } .rc-len { left: 8px; }
.rc-aud { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rc-aud button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 2px solid #e5e5e5; text-align: left; }
.dark .rc-aud button { border-color: rgba(255,255,255,.1); }
.rc-aud button i { font-size: 18px; color: #737373; }
.rc-aud button b { display: block; font-size: 14px; } .rc-aud button small { display: block; font-size: 11.5px; color: #737373; }
.rc-aud button.on { border-color: #0ea5e9; background: #f0f9ff; } .rc-aud button.on i { color: #0284c7; }
.dark .rc-aud button.on { background: rgba(14,165,233,.12); }

/* =========================================================
   v25.1 — Chichat: ⋯ menu beside a message · long-press = reactions only · the page never slides
   ========================================================= */
html:has(#chichat), body:has(#chichat) { overflow: hidden; overscroll-behavior: none; }
.msg-more { color: #737373; }
@media (pointer: coarse) {
  .msg-actions { display: none; }
  [data-mid].msg-on > .msg-actions { display: flex; opacity: 1; animation: ckPop .15s ease-out; }
  [data-mid].msg-on > .msg-actions [data-rx-open] { display: none; }      /* phones react with a long-press */
  [data-mid].msg-on > .msg-actions .msg-act { width: 34px; height: 34px; background: #f0f0f0; color: #525252; }
  .dark [data-mid].msg-on > .msg-actions .msg-act { background: rgba(255,255,255,.1); color: #e5e5e5; }
}
.msg-menu { position: fixed; z-index: 420; min-width: 210px; max-width: calc(100vw - 16px); padding: 6px; border-radius: 16px; background: #fff;
  box-shadow: 0 12px 36px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.05); animation: ckPop .14s ease-out; }
.dark .msg-menu { background: #1f1f1f; box-shadow: 0 12px 36px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); }
.msg-menu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 600; text-align: left; }
.msg-menu button:hover { background: #f5f5f5; } .dark .msg-menu button:hover { background: rgba(255,255,255,.06); }
.msg-menu button i { width: 18px; text-align: center; color: #737373; }
.msg-menu button.danger, .msg-menu button.danger i { color: #e11d48; }

/* v26 — Chichat voice & video calls */
html.call-open, html.call-open body { overflow: hidden; }
.call { position: fixed; inset: 0; z-index: 400; background: #0b0d12; color: #fff; overflow: hidden; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); user-select: none; -webkit-user-select: none; }
.call.hidden { display: none; }
.call-bg { position: absolute; inset: -40px; background: #1f2937 center/cover no-repeat; filter: blur(38px) brightness(.55) saturate(1.2); transform: scale(1.1); }
.call-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.45) 0, transparent 22%, transparent 62%, rgba(0,0,0,.6) 100%); }
.call-top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; }
.call-ic, .call-ic-space { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; font-size: 18px; color: #fff; }
.call-ic { background: rgba(255,255,255,.14); backdrop-filter: blur(8px); }
.call-ic:active { transform: scale(.94); }
.call-sec { font-size: 12px; font-weight: 600; opacity: .8; display: inline-flex; align-items: center; gap: 6px; }
.call-sec i { font-size: 10px; }
.call-who { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 0 20px 150px; transition: opacity .25s; }
.call-ava { position: relative; width: 132px; height: 132px; border-radius: 999px; margin-bottom: 14px; }
.call-ava img { width: 100%; height: 100%; border-radius: 999px; object-fit: cover; box-shadow: 0 10px 40px rgba(0,0,0,.45); background: #374151; position: relative; z-index: 1; }
.call[data-state="out"] .call-ava::before, .call[data-state="in"] .call-ava::before,
.call[data-state="out"] .call-ava::after, .call[data-state="in"] .call-ava::after { content: ''; position: absolute; inset: 0; border-radius: 999px; border: 2px solid rgba(255,255,255,.55); animation: callPulse 2s ease-out infinite; }
.call[data-state="out"] .call-ava::after, .call[data-state="in"] .call-ava::after { animation-delay: 1s; }
@keyframes callPulse { from { transform: scale(1); opacity: .9; } to { transform: scale(1.75); opacity: 0; } }
.call-name { font-size: 26px; font-weight: 800; line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.call-status { font-size: 15px; opacity: .85; font-variant-numeric: tabular-nums; min-height: 1.4em; }
.call-flag { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.call-flag span { font-size: 12.5px; font-weight: 600; background: rgba(0,0,0,.45); padding: 5px 11px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; }
/* video call, connected: the other person fills the screen; your name moves up small */
.call.has-remote .call-who { justify-content: flex-start; padding-top: 4px; }
.call.has-remote .call-ava { display: none; }
.call.has-remote .call-name { font-size: 18px; }
.call.has-remote .call-status { font-size: 13px; }
/* your own camera */
.call-self-wrap { position: absolute; z-index: 4; right: 14px; top: calc(env(safe-area-inset-top) + 68px); width: 104px; height: 150px; border-radius: 16px; overflow: hidden;
  background: #111; box-shadow: 0 8px 24px rgba(0,0,0,.45); display: none; transition: all .3s ease; }
.call.has-self .call-self-wrap { display: block; }
.call-self { width: 100%; height: 100%; object-fit: cover; }
.call-self.mirror { transform: scaleX(-1); }
.call-self-off { position: absolute; inset: 0; display: none; place-items: center; background: #1f2937; color: rgba(255,255,255,.75); font-size: 20px; }
.call.self-off .call-self-off { display: grid; }
@media (min-width: 768px) { .call-self-wrap { width: 200px; height: 140px; } }
/* calling someone on video: your camera is the whole screen until they answer */
.call.has-self:not(.self-off)[data-state="out"] .call-self-wrap, .call.has-self:not(.self-off)[data-state="conn"]:not(.has-remote) .call-self-wrap { inset: 0; width: 100%; height: 100%; border-radius: 0; z-index: 0; box-shadow: none; }
.call.has-self:not(.self-off)[data-state="out"] .call-bg, .call.has-self:not(.self-off)[data-state="conn"] .call-bg { opacity: 0; }
.call.has-self:not(.self-off)[data-state="out"] .call-ava { width: 96px; height: 96px; }
/* tap the small video to swap */
.call.swap.has-remote .call-self-wrap { inset: 0; width: 100%; height: 100%; border-radius: 0; z-index: 0; }
/* buttons */
.call-bar, .call-answer { position: absolute; z-index: 5; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 26px); display: flex; justify-content: center; gap: 14px; padding: 0 16px; }
.call-answer { gap: 72px; display: none; }
.call[data-state="in"] .call-answer { display: flex; }
.call[data-state="in"] .call-bar, .call[data-state="done"] .call-bar { display: none; }
.call-btn { display: flex; flex-direction: column; align-items: center; gap: 7px; color: #fff; min-width: 62px; }
.call-btn i { width: 58px; height: 58px; border-radius: 999px; display: grid; place-items: center; font-size: 21px; background: rgba(255,255,255,.18); backdrop-filter: blur(10px); transition: transform .12s, background .15s; }
.call-btn small { font-size: 12px; font-weight: 600; opacity: .9; }
.call-btn:active i { transform: scale(.92); }
.call-btn.off i { background: #fff; color: #111; }
.call-btn.end i { background: #ef4444; }
.call-btn.end .fa-phone { transform: rotate(135deg); }
.call-btn.ok i { background: #22c55e; }
.call-btn.big i { width: 70px; height: 70px; font-size: 26px; }
.call-btn.ok.big i { animation: callWiggle 1.2s ease-in-out infinite; }
@keyframes callWiggle { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
.call-btn.hidden { display: none; }
@media (hover: hover) { .call-btn:hover i { background: rgba(255,255,255,.28); } .call-btn.end:hover i { background: #dc2626; } .call-btn.ok:hover i { background: #16a34a; } .call-btn.off:hover i { background: #e5e7eb; } }
@media (max-width: 360px) { .call-bar { gap: 8px; } .call-btn i { width: 52px; height: 52px; font-size: 19px; } .call-answer { gap: 48px; } }
.call[data-state="done"] .call-who { opacity: .9; }
/* minimized call */
.call-pill { position: fixed; z-index: 390; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 8px); display: flex; align-items: center; gap: 10px;
  background: #16a34a; color: #fff; border-radius: 999px; padding: 6px 16px 6px 6px; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100vw - 24px); }
.call-pill.hidden { display: none; }
.call-pill img { width: 34px; height: 34px; border-radius: 999px; object-fit: cover; background: rgba(255,255,255,.3); }
.call-pill-tx { display: flex; flex-direction: column; text-align: left; min-width: 0; line-height: 1.15; }
.call-pill-tx b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.call-pill-tx small { font-size: 11px; opacity: .85; }
.call-pill > i { animation: callWiggle 2s ease-in-out infinite; }
/* call history in the chat */
.cc-call { display: inline-flex; flex-direction: column; min-width: 200px; max-width: 260px; border-radius: 18px; background: #f0f2f5; overflow: hidden; }
.cc-call.mine { margin-left: auto; }
.dark .cc-call { background: #262626; }
.cc-call-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; }
.cc-call-ic { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; background: #d8dadf; color: #1f2937; font-size: 15px; flex-shrink: 0; }
.dark .cc-call-ic { background: #3a3a3a; color: #e5e7eb; }
.cc-call.missed .cc-call-ic { background: #ef4444; color: #fff; }
.cc-call-tx { display: flex; flex-direction: column; min-width: 0; }
.cc-call-tx b { font-size: 14.5px; }
.cc-call-tx small { font-size: 12.5px; color: #65676b; }
.dark .cc-call-tx small { color: #a3a3a3; }
.cc-call-again { border-top: 1px solid rgba(0,0,0,.08); padding: 9px; font-weight: 700; font-size: 14px; color: #6127f5; }
.dark .cc-call-again { border-color: rgba(255,255,255,.08); color: #9b70ff; }
.cc-call-again:hover { background: rgba(0,0,0,.04); }

/* v26.2 — Reels on PC: one phone-shaped (9:16) video in the middle that always fits the screen,
   buttons outside on its right — like Facebook / TikTok on a computer */
.reels-nav { display: none; }
@media (min-width: 768px) {
  .reels-scroll { container-type: size; }
  .reel { --rh: calc(100cqh - 32px); --rw: min(calc(var(--rh) * 9 / 16), calc(100cqw - 200px)); background: #0a0a0a; }
  .reel video { width: var(--rw); height: var(--rh); max-width: none; object-fit: cover; border-radius: 16px; background: #000; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
  .reel video.wide { object-fit: contain; }
  .reel-shade { left: calc(50% - var(--rw) / 2); right: auto; width: var(--rw); bottom: 16px; height: 42%; border-radius: 0 0 16px 16px; }
  .reel-info { left: calc(50% - var(--rw) / 2 + 16px); right: auto; width: calc(var(--rw) - 32px); bottom: 38px; }
  .reel-rail { right: auto; left: calc(50% + var(--rw) / 2 + 16px); bottom: 40px; }
  .reel-bar { left: calc(50% - var(--rw) / 2 + 12px); right: auto; width: calc(var(--rw) - 24px); bottom: 22px; border-radius: 3px; overflow: hidden; }
  .reel-rail [data-reel-sound] { background: rgba(255,255,255,.12); }
  .reels-top { padding: 14px 20px; }
  .reels-nav { display: flex; flex-direction: column; gap: 12px; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); z-index: 5; }
  .reels-nav button { width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; font-size: 18px; transition: background .15s; }
  .reels-nav button:hover { background: rgba(255,255,255,.24); }
}

/* v27 — group calls: everyone in a grid that fits the screen · your own video drags to any corner · "Add people" */
.call-count { min-width: 44px; height: 32px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 700; }
.call-count:not(:empty) { background: rgba(255,255,255,.14); backdrop-filter: blur(8px); }
.call-grid { position: absolute; inset: 0; z-index: 1; display: grid; }
.ct { position: relative; overflow: hidden; min-width: 0; min-height: 0; }
.ct video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; opacity: 0; transition: opacity .3s; pointer-events: none; }
.ct.has-video video { opacity: 1; }
.ct-ava, .ct-label, .ct-ring { display: none; }
/* one other person: they fill the screen (the name and timer stay in the middle / at the top) */
.call[data-mode="one"] .call-grid { display: block; }
.call[data-mode="one"] .ct { position: absolute; inset: 0; }
@media (min-width: 768px) and (orientation: landscape) { .call[data-mode="one"]:not(.swap) .ct video { object-fit: contain; } }   /* PC: the whole phone video, not a cropped strip */
.call.swap.has-remote[data-mode="one"] .ct { inset: auto 14px auto auto; top: calc(env(safe-area-inset-top) + 68px); width: 104px; height: 150px; border-radius: 16px; z-index: 4; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.call.swap.has-remote .call-self-wrap { inset: 0 !important; width: 100%; height: 100%; border-radius: 0; z-index: 0; transform: none !important; }
/* two or more: a grid */
.call[data-mode="grid"] .call-grid { padding: calc(env(safe-area-inset-top) + 64px) 8px calc(env(safe-area-inset-bottom) + 118px); gap: 8px;
  display: flex; flex-wrap: wrap; justify-content: center; align-content: center; }
.call[data-mode="grid"] .ct { flex: 0 0 auto; width: calc((100% - (var(--cols, 2) - 1) * 8px) / var(--cols, 2)); height: calc((100% - (var(--rows, 2) - 1) * 8px) / var(--rows, 2)); }
.call[data-mode="grid"] .call-self-wrap { display: none !important; }     /* you're a tile in the grid instead */
.ct video.mirror { transform: scaleX(-1); }
.ct.me .ct-label { background: rgba(97,39,245,.75); }
.call[data-mode="grid"] .ct { border-radius: 18px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.call[data-mode="grid"] .ct-ava { display: grid; place-items: center; position: absolute; inset: 0; }
.call[data-mode="grid"] .ct-ava img { width: min(92px, 42%); aspect-ratio: 1; height: auto; border-radius: 999px; object-fit: cover; background: #374151; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.call[data-mode="grid"] .ct.has-video .ct-ava { display: none; }
.call[data-mode="grid"] .ct-label { display: inline-flex; align-items: center; gap: 6px; position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 4px 10px; border-radius: 999px;
  background: rgba(0,0,0,.5); font-size: 12.5px; font-weight: 700; }
.ct-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-mute { display: none; font-size: 11px; color: #fca5a5; }
.ct.is-muted .ct-mute { display: inline; }
.call[data-mode="grid"] .ct.is-ringing .ct-ava img { opacity: .55; animation: ctRing 1.6s ease-in-out infinite; }
.call[data-mode="grid"] .ct.is-ringing .ct-ring { display: block; position: absolute; left: 0; right: 0; top: calc(50% + min(46px, 21%) + 8px); text-align: center; font-size: 12px; opacity: .8; }
.call[data-mode="grid"] .ct.is-connecting:not(.is-ringing) .ct-ava img { opacity: .7; }
@keyframes ctRing { 50% { transform: scale(1.06); } }
.call[data-mode="grid"] .call-who { position: absolute; z-index: 3; top: calc(env(safe-area-inset-top) + 8px); left: 64px; right: 64px; padding: 0; gap: 0; flex: none; pointer-events: none; }
.call[data-mode="grid"] .call-ava { display: none; }
.call[data-mode="grid"] .call-name { font-size: 16px; }
.call[data-mode="grid"] .call-status { font-size: 12.5px; }
.call[data-mode="grid"] .call-sec { visibility: hidden; }
/* your own little video: drag it to any corner */
.call-self-wrap { touch-action: none; cursor: grab; right: auto; top: auto; z-index: 6; }
.call-self-wrap[data-corner="tr"] { top: calc(env(safe-area-inset-top) + 68px); right: 14px; }
.call-self-wrap[data-corner="tl"] { top: calc(env(safe-area-inset-top) + 68px); left: 14px; }
.call-self-wrap[data-corner="br"] { bottom: calc(env(safe-area-inset-bottom) + 130px); right: 14px; }
.call-self-wrap[data-corner="bl"] { bottom: calc(env(safe-area-inset-bottom) + 130px); left: 14px; }
.call-self-wrap.dragging { transition: none; cursor: grabbing; box-shadow: 0 14px 40px rgba(0,0,0,.6); }
.call[data-mode="grid"] .call-self-wrap { width: 88px; height: 126px; }
@media (min-width: 768px) { .call[data-mode="grid"] .call-self-wrap { width: 168px; height: 118px; } }
.call.has-self:not(.self-off)[data-state="out"] .call-self-wrap { transform: none !important; cursor: default; }
/* "Add people" */
.call-sheet { position: absolute; inset: 0; z-index: 20; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.call-sheet.hidden { display: none; }
.cs-panel { width: 100%; max-width: 440px; max-height: 72%; display: flex; flex-direction: column; background: #1c1c1e; border-radius: 22px 22px 0 0; padding: 10px 14px calc(env(safe-area-inset-bottom) + 14px);
  animation: sheetIn .22s ease-out; }
@media (min-width: 768px) { .call-sheet { align-items: center; } .cs-panel { border-radius: 22px; } }
.cs-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 0 8px; font-size: 17px; }
.cs-head .call-ic { width: 36px; height: 36px; font-size: 15px; }
.cs-search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.1); margin-bottom: 8px; }
.cs-search i { font-size: 13px; opacity: .6; }
.cs-search input { flex: 1; min-width: 0; background: transparent; outline: none; color: #fff; font-size: 15px; }
.cs-list { overflow-y: auto; min-height: 120px; }
.cs-row { display: flex; align-items: center; gap: 12px; padding: 8px 2px; }
.cs-row img { width: 42px; height: 42px; border-radius: 999px; object-fit: cover; flex-shrink: 0; }
.cs-row b { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-add { height: 34px; padding: 0 14px; border-radius: 999px; background: #22c55e; color: #fff; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cs-add:disabled { background: rgba(255,255,255,.14); }
.cs-empty { padding: 28px 10px; text-align: center; opacity: .7; font-size: 14px; }
/* "Join" a group call that is going on (Chichat header) */
.cc-join-call { height: 34px; padding: 0 14px; border-radius: 999px; background: #22c55e; color: #fff; font-weight: 800; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; box-shadow: 0 0 0 0 rgba(34,197,94,.5); animation: joinPulse 1.8s ease-out infinite; }
@keyframes joinPulse { to { box-shadow: 0 0 0 10px rgba(34,197,94,0); } }
.cc-call-again.join { color: #16a34a; }
.cc-call-ic.live { background: #22c55e; color: #fff; }

/* v27.7 — one "Ring" button (voice first, turn the camera on inside the call) */
.cc-tawag { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; flex-shrink: 0; color: #fff;
  background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 4px 14px -4px rgba(22,163,74,.6); transition: transform .12s, filter .15s; }
.cc-tawag:hover { filter: brightness(1.06); }
.cc-tawag:active { transform: scale(.92); }
.cc-tawag i { font-size: 16px; }
.call-btn.on i { background: #fff; color: #111; }

/* v28 — PIN pad (chat lock) */
.pinpad { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); }
.pinpad-card { position: relative; width: 100%; max-width: 330px; padding: 26px 22px 20px; border-radius: 26px; background: #fff; color: #111; text-align: center; animation: sheetIn .2s ease-out;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }
.dark .pinpad-card { background: #1c1c1e; color: #f5f5f5; }
.pinpad-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; color: #737373; }
.pinpad-x:hover { background: rgba(0,0,0,.06); }
.pinpad-ic { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 999px; display: grid; place-items: center; font-size: 22px; color: #fff; background: linear-gradient(135deg, #9b70ff, #6127f5); }
.pinpad-title { display: block; font-size: 18px; }
.pinpad-sub { font-size: 13px; color: #737373; min-height: 1.2em; margin-top: 2px; }
.pinpad-dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0 6px; }
.pinpad-dots i { width: 14px; height: 14px; border-radius: 999px; border: 2px solid #a3a3a3; transition: background .1s, border-color .1s; }
.pinpad-dots i.on { background: #6127f5; border-color: #6127f5; }
.pinpad-dots.shake { animation: ppShake .35s; }
@keyframes ppShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pinpad-err { min-height: 18px; font-size: 13px; color: #e11d48; font-weight: 600; }
.pinpad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.pinpad-keys button { height: 58px; border-radius: 18px; font-size: 22px; font-weight: 700; background: #f4f4f5; transition: background .12s, transform .08s; }
.dark .pinpad-keys button { background: rgba(255,255,255,.08); }
.pinpad-keys button:active { transform: scale(.94); background: #e4e4e7; }
.pinpad-keys button[data-k="back"] { background: transparent; font-size: 20px; color: #737373; }
/* locked chat screen + list */
.cc-locked { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; }
.cc-locked .pinpad-ic { width: 72px; height: 72px; font-size: 28px; }
.cc-lock-ic { font-size: 11px; color: #6127f5; margin-left: 4px; }
.dark .cc-lock-ic { color: #9b70ff; }

/* v28 — @everyone in posts and comments */
.mention-all { color: #6127f5; font-weight: 800; background: rgba(97,39,245,.1); padding: 0 4px; border-radius: 6px; }
.dark .mention-all { color: #b69aff; background: rgba(155,112,255,.16); }

/* ===================== v29 ===================== */
/* Time capsule */
.capsule-strip { display: flex; align-items: center; gap: 10px; margin: 10px 12px 0; padding: 9px 10px; border-radius: 14px;
  background: linear-gradient(135deg, #f5f3ff, #eff6ff); border: 1px solid #e0e7ff; }
.dark .capsule-strip { background: linear-gradient(135deg, rgba(124,58,237,.14), rgba(14,165,233,.10)); border-color: rgba(129,140,248,.22); }
.capsule-strip b { display: block; font-size: 13px; line-height: 1.25; color: #4c1d95; }
.dark .capsule-strip b { color: #ddd6fe; }
.capsule-strip small { display: block; font-size: 12px; color: #6b7280; margin-top: 1px; }
.dark .capsule-strip small { color: #a3a3a3; }
.capsule-ic { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 13px;
  background: linear-gradient(135deg, #8b5cf6, #0ea5e9); box-shadow: 0 4px 12px -4px rgba(124,58,237,.6); }
.capsule-strip.sealed .capsule-ic { background: linear-gradient(135deg, #f59e0b, #e11d48); box-shadow: 0 4px 12px -4px rgba(225,29,72,.5); }
.capsule-strip.sealed { background: linear-gradient(135deg, #fffbeb, #fff1f2); border-color: #fde68a; }
.dark .capsule-strip.sealed { background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(225,29,72,.10)); border-color: rgba(245,158,11,.25); }
.capsule-strip.sealed b { color: #9a3412; }
.dark .capsule-strip.sealed b { color: #fed7aa; }
.capsule-open-now { flex-shrink: 0; height: 32px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; font-weight: 700; background: #fff; color: #9a3412; border: 1px solid #fed7aa; }
.capsule-open-now:hover { background: #fff7ed; }
.dark .capsule-open-now { background: rgba(255,255,255,.08); color: #fed7aa; border-color: rgba(255,255,255,.12); }

.pm-capsule-chip { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 14px; text-align: left;
  background: linear-gradient(135deg, #fffbeb, #fff1f2); border: 1px solid #fde68a; }
.dark .pm-capsule-chip { background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(225,29,72,.10)); border-color: rgba(245,158,11,.25); }
.pm-capsule-chip .capsule-ic { background: linear-gradient(135deg, #f59e0b, #e11d48); }
.pm-capsule-chip b { display: block; font-size: 13.5px; color: #9a3412; }
.dark .pm-capsule-chip b { color: #fed7aa; }
.pm-capsule-chip small { display: block; font-size: 12px; color: #78716c; }
.dark .pm-capsule-chip small { color: #a3a3a3; }
.pm-capsule-x { width: 30px; height: 30px; border-radius: 99px; display: grid; place-items: center; color: #78716c; flex-shrink: 0; }
.pm-capsule-x:hover { background: rgba(0,0,0,.06); }
.dark .pm-capsule-x:hover { background: rgba(255,255,255,.08); }
.pm-tool.active { color: #e11d48 !important; background: #fff1f2; }
.dark .pm-tool.active { background: rgba(225,29,72,.14); }
.capsule-hero { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, #f5f3ff, #eff6ff); }
.dark .capsule-hero { background: linear-gradient(135deg, rgba(124,58,237,.14), rgba(14,165,233,.10)); }
.capsule-hero b { display: block; font-size: 15px; }
.capsule-hero p { font-size: 13px; color: #6b7280; margin-top: 3px; line-height: 1.5; }
.dark .capsule-hero p { color: #a3a3a3; }
.capsule-hero-ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 18px;
  background: linear-gradient(135deg, #8b5cf6, #0ea5e9); animation: capFlip 3s ease-in-out infinite; }
@keyframes capFlip { 0%, 70% { transform: rotate(0); } 85%, 100% { transform: rotate(180deg); } }
.capsule-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.capsule-quick button { height: 40px; border-radius: 12px; font-size: 13.5px; font-weight: 700; background: #f5f5f5; border: 1px solid transparent; }
.dark .capsule-quick button { background: rgba(255,255,255,.07); }
.capsule-quick button:hover { background: #ededed; }
.dark .capsule-quick button:hover { background: rgba(255,255,255,.11); }
.capsule-quick button.on { background: #fff1f2; border-color: #fda4af; color: #be123c; }
.dark .capsule-quick button.on { background: rgba(225,29,72,.16); border-color: rgba(251,113,133,.5); color: #fda4af; }

/* Maintenance: the strip developers see */
.maint-bar { position: sticky; top: 3.5rem; z-index: 35; display: flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: 13px;
  background: repeating-linear-gradient(-45deg, #fbbf24, #fbbf24 14px, #f59e0b 14px, #f59e0b 28px); color: #431407; }
.maint-bar > span:first-of-type { flex: 1; min-width: 0; }
.maint-bar-go { flex-shrink: 0; font-weight: 800; background: rgba(255,255,255,.85); border-radius: 99px; padding: 3px 10px; font-size: 12px; }
@media (min-width: 640px) { .maint-bar { justify-content: center; } .maint-bar > span:first-of-type { flex: 0 1 auto; } }

/* Developer panel · v29 */
.dev-alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; font-size: 14px; line-height: 1.45; }
.dev-alert > i { margin-top: 3px; }
.dev-alert.ok { background: #ecfdf5; color: #065f46; }
.dev-alert.warn { background: #fffbeb; color: #92400e; }
.dev-alert.bad { background: #fff1f2; color: #9f1239; }
.dark .dev-alert.ok { background: rgba(16,185,129,.1); color: #6ee7b7; }
.dark .dev-alert.warn { background: rgba(245,158,11,.1); color: #fcd34d; }
.dark .dev-alert.bad { background: rgba(244,63,94,.12); color: #fda4af; }
.dev-stat.is-bad .dev-stat-i { background: #fff1f2; color: #e11d48; }
.dark .dev-stat.is-bad .dev-stat-i { background: rgba(244,63,94,.14); color: #fda4af; }
.dev-live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 99px; background: #10b981; margin-left: 8px; vertical-align: middle; box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: devPulse 1.6s infinite; }
@keyframes devPulse { 70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.dev-meter { height: 8px; border-radius: 99px; background: #f1f5f9; overflow: hidden; }
.dark .dev-meter { background: rgba(255,255,255,.07); }
.dev-meter > span { display: block; height: 100%; border-radius: 99px; transition: width .4s; }
.dev-mini { padding: 10px 6px; border-radius: 12px; background: #f8fafc; min-width: 0; }
.dark .dev-mini { background: rgba(255,255,255,.04); }
.dev-mini b { display: block; font-size: 17px; font-weight: 800; }
.dev-mini span { display: block; font-size: 11.5px; color: #737373; }
.dev-folder { display: flex; gap: 12px; align-items: flex-start; }
.dev-folder-i { width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: #f0f9ff; color: #0284c7; font-size: 14px; }
.dark .dev-folder-i { background: rgba(14,165,233,.12); color: #7dd3fc; }
.dev-file { display: flex; align-items: center; gap: 10px; padding: 7px; border-radius: 12px; min-width: 0; }
.dev-file:hover { background: #f5f5f5; }
.dark .dev-file:hover { background: rgba(255,255,255,.05); }
.dev-file-th { width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px; object-fit: cover; background: #f1f5f9; }
.dark .dev-file-th { background: rgba(255,255,255,.06); }
.dev-clean-grid { display: grid; gap: 10px; }
@media (min-width: 1100px) { .dev-clean-grid { grid-template-columns: 1fr 1fr; } }
.dev-clean { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid #e5e5e5; min-width: 0; flex-wrap: wrap; }
.dark .dev-clean { border-color: rgba(255,255,255,.08); }
.dev-clean b { display: block; font-size: 14px; }
.dev-clean small { display: block; font-size: 12.5px; color: #737373; line-height: 1.4; margin-top: 2px; }
.dev-clean-i { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: #f5f5f5; color: #525252; }
.dark .dev-clean-i { background: rgba(255,255,255,.07); color: #d4d4d4; }
.dev-scan { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: #f8fafc; font-size: 14px; color: #525252; }
.dark .dev-scan { background: rgba(255,255,255,.04); color: #d4d4d4; }
.dev-unused { border-radius: 16px; border: 1px solid #fde68a; background: #fffbeb; overflow: hidden; }
.dark .dev-unused { border-color: rgba(245,158,11,.25); background: rgba(245,158,11,.06); }
.dev-unused-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.dev-unused-head b { display: block; font-size: 15px; }
.dev-unused-head small { display: block; font-size: 12.5px; color: #78716c; }
.dark .dev-unused-head small { color: #a3a3a3; }
.dev-unused-list { max-height: 340px; overflow-y: auto; padding: 4px 6px 8px; background: rgba(255,255,255,.6); border-top: 1px solid #fde68a; }
.dark .dev-unused-list { background: rgba(0,0,0,.2); border-top-color: rgba(245,158,11,.2); }
.dev-maint { transition: box-shadow .2s, border-color .2s; }
.dev-maint.on { border-color: #f59e0b !important; box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.dev-maint-i { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; background: #fffbeb; color: #d97706; font-size: 18px; }
.dark .dev-maint-i { background: rgba(245,158,11,.12); color: #fbbf24; }
.dev-maint-sw { width: 52px; height: 30px; margin-top: 4px; }
.dev-maint-sw span::before { width: 24px; height: 24px; }
.dev-maint-sw input:checked + span { background: #f59e0b; }
.dev-maint-sw input:checked + span::before { transform: translateX(22px); }
@media (max-width: 640px) {
  .dev-clean > :last-child { flex-basis: 100%; display: flex; gap: 6px; justify-content: center; }
  .dev-clean > :last-child .btn { flex: 1; }
}

/* v29.3: Chichat button at the top (instead of the dark-mode button) */
.chichat-btn img { display: block; }
.chichat-btn.is-on { box-shadow: 0 0 0 2px #0ea5e9; }

/* v29.3: chat background goes edge to edge — header, pinned bar and typing bar are see-through */
#ccActive.cc-has-bg > #ccHead, #ccActive.cc-has-bg > #ccPinned, #ccActive.cc-has-bg > #ccForm,
#ccActive.cc-has-bg > #ccLocked, #ccActive.cc-has-bg > #ccRequest { background: transparent !important; border-color: transparent !important; }
#ccActive.cc-has-bg > #ccHead, #ccActive.cc-has-bg > #ccPinned { -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
#ccActive.cc-tone-dark > #ccHead, #ccActive.cc-tone-dark > #ccPinned { background: rgba(0,0,0,.18) !important; }
#ccActive.cc-tone-light > #ccHead, #ccActive.cc-tone-light > #ccPinned { background: rgba(255,255,255,.35) !important; }
#ccActive.cc-tone-dark > #ccHead .font-bold, #ccActive.cc-tone-dark > #ccPinned { color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
#ccActive.cc-tone-dark > #ccHead .text-xs:not(.text-emerald-500):not(.text-emerald-600) { color: rgba(255,255,255,.8) !important; }
#ccActive.cc-tone-light > #ccHead .font-bold, #ccActive.cc-tone-light > #ccPinned { color: #171717 !important; }
#ccActive.cc-tone-light > #ccHead .text-xs:not(.text-emerald-500):not(.text-emerald-600) { color: #404040 !important; }
#ccActive.cc-tone-dark > #ccHead [data-back], #ccActive.cc-tone-dark > #ccHead a, #ccActive.cc-tone-dark > #ccHead > button:not([data-info-toggle].flex) { color: #fff !important; }
#chichat:not(.cc-vanish) #ccActive.cc-has-bg > #ccMessages { background: transparent !important; }
#chichat.cc-vanish #ccActive.cc-has-bg { background-image: none !important; background-color: #121212 !important; }

/* v30: comments (and reports) in a simple sheet — posts, photos, videos and reels */
.cm-sheet { position: fixed; inset: 0; z-index: 260; }
.cm-sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .2s; }
.cm-sheet.open .cm-sheet-bg { opacity: 1; }
.cm-sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; height: min(75dvh, 640px); display: flex; flex-direction: column;
  background: #fff; color: #171717; border-radius: 16px 16px 0 0; transform: translateY(100%); transition: transform .22s ease-out; }
.dark .cm-sheet-panel { background: #1a1a1a; color: #f5f5f5; }
.cm-sheet.open .cm-sheet-panel { transform: none; }
.cm-sheet-head { display: flex; align-items: center; justify-content: center; position: relative; height: 48px; flex-shrink: 0; font-size: 15px; border-bottom: 1px solid #ededed; }
.dark .cm-sheet-head { border-color: rgba(255,255,255,.07); }
.cm-sheet-head button { position: absolute; right: 8px; width: 36px; height: 36px; border-radius: 99px; color: #737373; }
.cm-sheet-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; overscroll-behavior: contain; }
.cm-empty { text-align: center; color: #8a8a8a; font-size: 14px; padding: 32px 0; }
.cm-sheet-form { display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #ededed; flex-shrink: 0; }
.dark .cm-sheet-form { border-color: rgba(255,255,255,.07); }
.cm-more { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: #525252; padding: 2px 0 4px; }
.dark .cm-more { color: #d4d4d4; }
.cm-more:hover { text-decoration: underline; }
.rp-panel { height: auto; max-height: min(85dvh, 640px); }
.rp-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 6px; border-radius: 10px; }
.rp-row + .rp-row { border-top: 1px solid #f0f0f0; }
.dark .rp-row + .rp-row { border-color: rgba(255,255,255,.06); }
.rp-row:hover { background: #f7f7f7; }
.dark .rp-row:hover { background: rgba(255,255,255,.04); }
.rp-row b { display: block; font-size: 14.5px; font-weight: 600; }
.rp-row small { display: block; font-size: 12.5px; color: #737373; }
@media (min-width: 768px) {
  .cm-sheet-panel { left: auto; right: 0; top: 0; bottom: 0; width: 420px; height: auto; max-height: none; border-radius: 0; transform: translateX(100%); }
  .rp-panel { top: auto; bottom: auto; right: 50%; top: 50%; width: 440px; border-radius: 16px; transform: translate(50%, -46%); opacity: 0; transition: opacity .18s, transform .18s; }
  .cm-sheet.open .rp-panel { transform: translate(50%, -50%); opacity: 1; }
}

/* v30: a post's own page fits a phone screen — the photo/video doesn't push the comments away */
.post-page img[data-lightbox].w-full { max-height: 58vh; object-fit: contain; background: #000; }
.post-page [data-post-video] video { max-height: 58vh; }
.post-page .post-grid { max-height: 62vh; overflow: hidden; }
/* v30: team badges, reports */
.admin-badge { background: #7c3aed !important; }
.dev-side-n, .dev-pill-n { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #e11d48; color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.dev-pill-n { margin-left: 4px; }
.dev-report { padding: 14px; border-radius: 14px; }
.dev-report + .dev-report { border-top: 1px solid rgba(0,0,0,.06); }
.dark .dev-report + .dev-report { border-top-color: rgba(255,255,255,.06); }
.dev-report-media { position: relative; display: flex; gap: 6px; margin-top: 8px; overflow: hidden; border-radius: 12px; width: fit-content; max-width: 100%; }
.dev-report-media img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.dev-report-media video { width: 360px; max-width: 100%; max-height: 300px; border-radius: 10px; background: #000; }
.dev-report-media.is-blur img, .dev-report-media.is-blur video { filter: blur(22px); }
.dev-report-cover { display: none; }
.dev-report-media.is-blur { cursor: pointer; }
.dev-report-media.is-blur .dev-report-cover { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; gap: 8px; color: #fff; font-size: 13px; font-weight: 600; background: rgba(0,0,0,.25); }
.reel-rp i { font-size: 20px !important; }

/* ===================== v31 ===================== */
/* Chichat: checklist bar + sheet, schedule picks */
.cc-todo-bar { flex-shrink: 0; display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 14px; font-size: 13px; text-align: left;
  background: #fff; border-bottom: 1px solid #e5e5e5; color: #404040; }
.cc-todo-bar > span { flex: 1; min-width: 0; }
.cc-todo-bar > i:first-child { color: #0284c7; }
.dark .cc-todo-bar { background: #111; border-color: rgba(255,255,255,.07); color: #d4d4d4; }
#ccActive.cc-has-bg > .cc-todo-bar { background: transparent; border-color: transparent; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
#ccActive.cc-tone-dark > .cc-todo-bar { background: rgba(0,0,0,.18); color: #fff; }
#ccActive.cc-tone-light > .cc-todo-bar { background: rgba(255,255,255,.35); color: #171717; }
.cc-todo { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 12px; }
.cc-todo + .cc-todo { border-top: 1px solid #f0f0f0; }
.dark .cc-todo + .cc-todo { border-color: rgba(255,255,255,.06); }
.cc-todo-box { width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; border: 2px solid #d4d4d4; display: grid; place-items: center; color: transparent; font-size: 12px; }
.dark .cc-todo-box { border-color: #525252; }
.cc-todo.done .cc-todo-box { background: #10b981; border-color: #10b981; color: #fff; }
.cc-todo-text { font-size: 14.5px; word-break: break-word; }
.cc-todo.done .cc-todo-text { text-decoration: line-through; color: #a3a3a3; }
.cc-todo-sub { font-size: 12px; color: #737373; }
.cc-todo-claim { flex-shrink: 0; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: #f0f9ff; color: #0369a1; }
.cc-todo-claim.on { background: #0284c7; color: #fff; }
.dark .cc-todo-claim { background: rgba(14,165,233,.15); color: #7dd3fc; }
.dark .cc-todo-claim.on { background: #0284c7; color: #fff; }
.cc-sc-pick { height: 38px; border-radius: 10px; font-size: 13px; font-weight: 600; background: #f5f5f5; border: 1px solid transparent; }
.dark .cc-sc-pick { background: rgba(255,255,255,.07); }
.cc-sc-pick.on { background: #f0f9ff; border-color: #7dd3fc; color: #0369a1; }
.dark .cc-sc-pick.on { background: rgba(14,165,233,.15); color: #7dd3fc; }
/* Posts: pinned comment, comments off, photo captions */
.cm-pin-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #737373; margin: 0 0 4px 40px; }
.cm-pin-label i { font-size: 10px; color: #0284c7; }
.cm-off { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; color: #737373; }
.cm-off-sheet { margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #ededed; flex-shrink: 0; }
.dark .cm-off-sheet { border-color: rgba(255,255,255,.07); }
.lb-cap { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: min(640px, 92vw); padding: 8px 14px;
  border-radius: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; line-height: 1.45; text-align: center; white-space: pre-line; z-index: 5; }
.pm-caps:empty { display: none; }
.pm-caps { margin-top: 10px; display: grid; gap: 6px; }
.pm-caps-h { font-size: 13px; font-weight: 700; }
.pm-caps-h span { font-weight: 400; color: #8a8a8a; }
.pm-cap { display: flex; align-items: center; gap: 8px; }
.pm-cap img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.pm-cap input { flex: 1; min-width: 0; height: 38px; border-radius: 10px; padding: 0 12px; font-size: 14px; background: #f5f5f5; outline: none; }
.dark .pm-cap input { background: rgba(255,255,255,.07); }
/* Profile: featured photos */
.pf-featured { display: grid; gap: 4px; border-radius: 12px; overflow: hidden; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pf-featured img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; cursor: zoom-in; grid-column: span 2; }
.pf-feat-1 img { grid-column: span 6; aspect-ratio: 4 / 3; }
.pf-feat-2 img { grid-column: span 3; aspect-ratio: 3 / 4; }
.pf-feat-4 img { grid-column: span 3; }
.pf-feat-5 img:nth-child(-n+2) { grid-column: span 3; }
.ft-panel { max-height: min(88dvh, 720px); }
.ft-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.ft-cell { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.ft-cell img { width: 100%; height: 100%; object-fit: cover; }
.ft-cell.on { box-shadow: inset 0 0 0 3px #0ea5e9; }
.ft-cell.on img { opacity: .85; }
.ft-cell b { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 99px; background: #0ea5e9; color: #fff; font-size: 12px; display: grid; place-items: center; }
.pm-capsule-chip.hidden { display: none; }     /* v31 fix: the empty Time capsule chip showed in every new post */