/* Hols — overlays: modals, drawer, menus, toasts, profile, gifts, wallet, admin, stories, effects */

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: var(--overlay); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fadeIn .25s ease both; }
.modal-back.closing { animation: fadeOut .22s ease both; }
.modal-back.closing .modal { animation: popOut .22s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.modal { width: min(440px, 100%); max-height: min(88vh, 860px); border-radius: var(--r-xl); display: flex; flex-direction: column; overflow: hidden; animation: pop .4s var(--spring) both; box-shadow: var(--shadow); background: color-mix(in srgb, var(--panel-solid) 82%, transparent); }
.modal.wide { width: min(640px, 100%); }
.modal.xwide { width: min(900px, 100%); }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(10px); } }
@keyframes popOut { to { opacity: 0; transform: scale(.95); } }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 6px; flex: none; min-height: 58px; }
.modal-head .mh-title { flex: 1; text-align: center; font-weight: 700; font-size: 1.05rem; }
.modal-head .icon-btn.ph { visibility: hidden; }
.modal-body { padding: 6px 18px 18px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 10px 18px 18px; display: flex; gap: 10px; flex: none; }
.modal-foot .btn { flex: 1; }
@media (max-width: 560px) {
  .modal-back { align-items: end; padding: 0; }
  .modal, .modal.wide, .modal.xwide { width: 100%; max-height: 92vh; border-radius: 26px 26px 0 0; animation: sheetUp .42s var(--ease) both; }
  .modal-back.closing .modal { animation: sheetDown .25s ease both; }
}
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes sheetDown { to { transform: translateY(100%); } }

/* ---------- drawer (main menu) ---------- */
.drawer-back { position: fixed; inset: 0; z-index: 90; background: var(--overlay); animation: fadeIn .25s ease both; }
.drawer { position: fixed; z-index: 91; left: 12px; top: 12px; bottom: 12px; width: 300px; border-radius: 26px; padding: 12px; overflow-y: auto; animation: drawerIn .42s var(--ease) both; background: color-mix(in srgb, var(--panel-solid) 80%, transparent); }
.drawer.closing { animation: drawerOut .25s ease both; }
.drawer-back.closing { animation: fadeOut .25s ease both; }
@keyframes drawerIn { from { transform: translateX(-110%); } }
@keyframes drawerOut { to { transform: translateX(-110%); } }
.drawer .me-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 12px; width: 100%; text-align: left; transition: background .2s; }
.drawer .me-card:hover { background: var(--hover); }
.drawer .me-card .ava { --s: 44px; }
.drawer .me-card b { display: block; font-size: 1rem; }
.drawer .me-card small { color: var(--text-2); }
@media (max-width: 560px) { .drawer { left: 0; top: 0; bottom: 0; border-radius: 0 24px 24px 0; width: 86vw; } }

/* ---------- context menu / popover ---------- */
.ctx { position: fixed; z-index: 200; min-width: 230px; max-width: 300px; padding: 6px; border-radius: 18px; animation: ctxIn .22s var(--spring) both; transform-origin: top left; background: color-mix(in srgb, var(--panel-solid) 78%, transparent); box-shadow: var(--shadow); }
@keyframes ctxIn { from { opacity: 0; transform: scale(.88); } }
.ctx-rx { display: flex; gap: 2px; padding: 4px 4px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow-x: auto; scrollbar-width: none; }
.ctx-rx button { font-size: 1.35rem; width: 38px; height: 38px; border-radius: 50%; flex: none; transition: transform .2s var(--spring), background .2s; }
.ctx-rx button:hover { transform: scale(1.25); background: var(--hover); }
.ctx-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: 12px; font-size: .92rem; font-weight: 500; text-align: left; transition: background .15s; }
.ctx-item:hover { background: var(--hover); }
.ctx-item .i { color: var(--text-2); }
.ctx-item.danger, .ctx-item.danger .i { color: var(--danger); }
.ctx-item.admin .i { color: #f59e0b; }
.ctx-item .sub { margin-left: auto; color: var(--text-3); font-size: .8rem; }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.ctx-title { font-size: .74rem; color: var(--text-3); font-weight: 700; padding: 6px 12px 4px; text-transform: uppercase; letter-spacing: .05em; }
.popover { position: fixed; z-index: 150; border-radius: 22px; padding: 10px; animation: ctxIn .25s var(--spring) both; background: color-mix(in srgb, var(--panel-solid) 80%, transparent); box-shadow: var(--shadow); }
.tip-pop { position: fixed; z-index: 210; padding: 10px 14px; border-radius: 14px; font-size: .86rem; max-width: 260px; animation: ctxIn .2s var(--spring) both; background: color-mix(in srgb, var(--panel-solid) 85%, transparent); box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; }
.tip-pop .verified { cursor: default; }

/* sticker & emoji panel */
.stk-panel { width: min(380px, calc(100vw - 24px)); height: 360px; display: flex; flex-direction: column; padding: 8px; }
.stk-tabs { display: flex; gap: 4px; padding-bottom: 8px; }
.stk-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; align-content: start; }
.stk-grid.emoji { grid-template-columns: repeat(8, 1fr); }
.stk { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; transition: background .2s, transform .2s var(--spring); }
.stk:hover { background: var(--hover); transform: scale(1.08); }
.stk img { width: 86%; height: 86%; }
.stk.e { font-size: 1.5rem; }
.ai-pop { width: 290px; }
.ai-pop .ai-head { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 4px 6px 10px; }
.ai-pop .ai-head .i { color: #a78bfa; }

/* ---------- toast ---------- */
.toasts { position: fixed; z-index: 300; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 16px; font-size: .9rem; font-weight: 500; max-width: min(420px, 92vw); animation: toastIn .4s var(--spring) both; background: color-mix(in srgb, var(--panel-solid) 85%, transparent); box-shadow: var(--shadow); }
.toast.out { animation: toastOut .25s ease both; }
.toast.danger { color: var(--danger); }
.toast.success .i { color: var(--success); }
.toast .ava { --s: 30px; }
.toast.clickable { cursor: pointer; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ---------- auth ---------- */
.auth-screen { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; overflow-y: auto; z-index: 50; }
.auth-card { width: min(420px, 100%); border-radius: 30px; padding: 28px 26px 24px; animation: pop .5s var(--spring) both; }
.auth-logo { width: 74px; height: 74px; display: block; margin: 0 auto 12px; filter: drop-shadow(0 10px 30px color-mix(in srgb, var(--accent) 55%, transparent)); animation: floaty 4s ease-in-out infinite; }
.auth-card h1 { text-align: center; margin: 0; font-size: 1.6rem; letter-spacing: -.02em; }
.auth-card .sub { text-align: center; color: var(--text-2); margin: 6px 0 22px; font-size: .92rem; }
.ava-picker { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 18px; }
.ava-picker .big { --s: 96px; cursor: pointer; transition: transform .25s var(--spring); }
.ava-picker .big:hover { transform: scale(1.05); }
.ava-picker .cam { position: absolute; right: 0; bottom: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: #fff; border: 3px solid var(--panel-solid); }
.ava-choices { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ava-choices button { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; border: 2px solid transparent; transition: transform .2s var(--spring), border-color .2s; }
.ava-choices button img { width: 100%; height: 100%; }
.ava-choices button.active { border-color: var(--accent); transform: scale(1.12); }
.ava-choices button:hover { transform: scale(1.12); }
.auth-accounts { display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.lock-screen .pin-dots { display: flex; gap: 14px; justify-content: center; margin: 18px 0; }
.lock-screen .pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--text-2); transition: background .2s, transform .2s var(--spring); }
.lock-screen .pin-dots i.on { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }
.lock-screen .pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pinpad { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; justify-content: center; }
.pinpad button { height: 72px; border-radius: 50%; font-size: 1.5rem; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); transition: background .15s, transform .15s; }
.pinpad button:active { transform: scale(.92); background: var(--active); }

/* blocked account screen */
.blocked-screen { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.blocked-card { width: min(420px, 100%); border-radius: 30px; padding: 34px 26px 24px; text-align: center; animation: pop .5s var(--spring) both; }
.blocked-card .bl-ico { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); box-shadow: 0 0 0 10px color-mix(in srgb, var(--danger) 6%, transparent); }
.blocked-card h1 { color: var(--danger); margin: 0 0 8px; font-size: 1.6rem; }
.blocked-card p { color: var(--text-2); margin: 0 0 6px; }
.blocked-card .reason { margin: 14px 0 20px; padding: 10px 14px; border-radius: 14px; background: var(--panel-2); font-size: .88rem; color: var(--text-2); }

/* ---------- profile ---------- */
.profile-modal .modal-body { padding: 0 0 18px; }
.pf-top { position: relative; padding: 18px 18px 6px; text-align: center; }
.pf-top .pf-cover { position: absolute; inset: 0 0 40%; background: radial-gradient(60% 80% at 50% 0%, color-mix(in srgb, var(--a2, var(--accent)) 45%, transparent), transparent 70%); opacity: .8; pointer-events: none; }
.pf-ava { --s: 116px !important; margin: 0 auto; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); font-size: 2.6rem !important; animation: pop .5s var(--spring) both; cursor: zoom-in; }
.pf-name { font-size: 1.35rem; font-weight: 800; margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.pf-pills { display: flex; justify-content: center; gap: 8px; margin-top: 8px; align-items: center; }
.lvl-badge { position: relative; width: 26px; height: 28px; display: grid; place-items: center; cursor: pointer; transition: transform .2s var(--spring); }
.lvl-badge:hover { transform: scale(1.12); }
.lvl-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; color: #fff; }
.lvl-badge b { position: relative; color: #111; font-size: .74rem; font-weight: 800; margin-top: -1px; }
.status-pill { height: 26px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: .8rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.status-pill.st-online::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.status-pill.st-blocked { border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.pf-actions { display: flex; gap: 8px; justify-content: center; padding: 14px 18px 4px; flex-wrap: wrap; }
.pf-act { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 78px; padding: 10px 4px 8px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); font-size: .74rem; font-weight: 600; transition: background .2s, transform .2s var(--spring); }
.pf-act:hover { background: var(--hover); transform: translateY(-2px); }
.pf-act .i { color: var(--accent); }
.pf-act.admin .i { color: #f59e0b; }
.pf-act.danger .i, .pf-act.danger { color: var(--danger); }
.pf-info { padding: 10px 22px 0; }
.pf-row { padding: 8px 0; }
.pf-row .v { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.pf-row .k { font-size: .8rem; color: var(--text-2); }
.pf-row .copy { color: var(--text-2); cursor: pointer; display: inline-flex; }
.pf-row .copy:hover { color: var(--text); }
.pf-meta { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .9rem; padding: 6px 0; }
.pf-badges { display: flex; gap: 6px; padding: 6px 0 2px; }
.pf-badges span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); font-size: 1rem; cursor: default; }
.pf-locked { text-align: center; padding: 26px 22px 10px; color: var(--text-2); }
.pf-locked .lk { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; background: var(--panel-3); color: var(--text); }
.pf-blur .pf-ava { filter: blur(10px) grayscale(.4); }

.tabs { position: relative; display: flex; gap: 4px; margin: 14px 14px 0; padding: 4px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); }
.tab { flex: 1; height: 36px; border-radius: 12px; font-weight: 600; font-size: .86rem; color: var(--text-2); position: relative; z-index: 1; transition: color .25s; }
.tab.active { color: var(--text); }
.tab-ink { position: absolute; top: 4px; bottom: 4px; border-radius: 12px; background: var(--panel-3); box-shadow: var(--shadow-sm); transition: left .35s var(--ease), width .35s var(--ease); z-index: 0; }
.tab-viewport { overflow: hidden; touch-action: pan-y; }
.tab-track { display: flex; transition: transform .4s var(--ease); }
.tab-page { flex: 0 0 100%; min-height: 160px; padding: 14px; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.media-grid > * { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--panel-3) center/cover; cursor: pointer; position: relative; }
.media-grid img, .media-grid video { width: 100%; height: 100%; object-fit: cover; }
.story-thumb { aspect-ratio: 9/16 !important; display: grid; place-items: center; text-align: center; padding: 6px; color: #fff; font-size: .7rem; font-weight: 700; }
.story-thumb .sv { position: absolute; left: 6px; bottom: 6px; font-size: .7rem; display: flex; gap: 3px; align-items: center; }
.track { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; transition: background .2s; }
.track:hover { background: var(--hover); }
.track .tcover { width: 42px; height: 42px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: #fff; flex: none; }

/* ---------- gifts ---------- */
.gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.gift-card { position: relative; border-radius: 20px; padding: 14px 8px 10px; text-align: center; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; cursor: pointer; transition: transform .25s var(--spring), box-shadow .25s; isolation: isolate; }
.gift-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(80% 60% at 50% 20%, color-mix(in srgb, var(--rc) 35%, transparent), transparent 70%); }
.gift-card::after { content: ''; position: absolute; top: -50%; left: -60%; width: 40%; height: 200%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent); transform: rotate(20deg); animation: shine 4s ease-in-out infinite; pointer-events: none; }
.gift-card.r-common::after { display: none; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 140%; } }
.gift-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 14px 30px color-mix(in srgb, var(--rc) 25%, transparent); }
.gift-card.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.gift-card .ge { font-size: 46px; line-height: 1.1; display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); }
.gift-card .gn { font-weight: 700; font-size: .86rem; margin-top: 6px; }
.gift-card .gr { font-size: .68rem; font-weight: 700; color: var(--rc); text-transform: uppercase; letter-spacing: .05em; }
.gift-card .gp { margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--rc) 18%, transparent); font-weight: 700; font-size: .8rem; }
.gift-card .gfrom { font-size: .7rem; color: var(--text-2); margin-top: 4px; }
.gift-card .seasonal { position: absolute; top: 8px; right: 8px; font-size: .62rem; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: #f97316; color: #fff; }
.gift-big { text-align: center; padding: 6px 0 10px; }
.gift-big .ge { font-size: 96px; display: inline-block; animation: giftFloat 3s ease-in-out infinite; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .35)); }
.craft-slots { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 6px 0 16px; }
.craft-slot { width: 86px; height: 86px; border-radius: 22px; border: 2px dashed var(--line-2); display: grid; place-items: center; font-size: 42px; transition: transform .3s var(--spring); }
.craft-slot.filled { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.craft-res { width: 96px; height: 96px; border-radius: 26px; display: grid; place-items: center; font-size: 52px; background: radial-gradient(circle, rgba(56, 189, 248, .35), transparent 70%); }
.crafting .craft-slot { animation: merge .9s var(--ease) forwards; }
.crafting .craft-slot:first-child { --dx: 50px; }
.crafting .craft-slot:nth-child(3) { --dx: -50px; }
@keyframes merge { to { transform: translateX(var(--dx, 0)) scale(.2) rotate(180deg); opacity: 0; } }
.reveal { animation: reveal .8s var(--spring) both; }
@keyframes reveal { 0% { transform: scale(0) rotate(-90deg); } 100% { transform: none; } }

/* rating */
.rating-modal { background: linear-gradient(180deg, #0b1a3a, #071027 60%, #050a1a) !important; color: #e8eefc; }
html[data-theme="light"] .rating-modal { background: linear-gradient(180deg, #e8f0ff, #f6f8ff) !important; color: var(--text); }
.rt-crown { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: linear-gradient(180deg, #fff, #cfd5e2); color: #111; font-weight: 800; font-size: 1.25rem; position: relative; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.rt-crown::after { content: ''; position: absolute; left: 18px; bottom: -8px; border: 8px solid transparent; border-top-color: #cfd5e2; border-bottom: 0; }
.rt-crown small { color: #666; font-weight: 700; font-size: .9rem; }
.rt-bar { margin-top: 16px; height: 30px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-weight: 700; font-size: .8rem; }
html[data-theme="light"] .rt-bar { background: rgba(15, 23, 42, .06); }
.rt-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #2f80ff, #7c5cff); transition: width 1s var(--ease); z-index: 0; }
.rt-bar span { position: relative; z-index: 1; }
.rt-item { display: flex; gap: 14px; margin: 16px 0; }
.rt-item .ri { width: 40px; height: 40px; border-radius: 12px; background: rgba(47, 128, 255, .18); display: grid; place-items: center; flex: none; color: #8ab8ff; }
.rt-item b { display: block; margin-bottom: 3px; }
.rt-item p { margin: 0; font-size: .86rem; opacity: .8; }
.rt-tag { font-size: .66rem; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: #e5e7eb; color: #111; margin-right: 4px; text-transform: uppercase; }
.rt-tag.minus { background: #6b7280; color: #fff; }

/* ---------- wallet mini-app ---------- */
.miniapp-back { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: var(--overlay); animation: fadeIn .25s ease both; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.miniapp { width: min(420px, 100%); height: min(760px, 94vh); border-radius: 30px; display: flex; flex-direction: column; overflow: hidden; animation: sheetUp .45s var(--ease) both; background: linear-gradient(180deg, #1a1033 0%, #0c0a18 45%, #07060d 100%); color: #f2efff; box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .08); }
.miniapp.closing { animation: sheetDown .25s ease both; }
.ma-head { display: flex; align-items: center; gap: 8px; padding: 12px; }
.ma-head .icon-btn { color: #e9e4ff; background: rgba(255, 255, 255, .08); }
.ma-head .t { flex: 1; text-align: center; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
.ma-head .t img { width: 24px; height: 24px; border-radius: 50%; }
.ma-body { flex: 1; overflow-y: auto; padding: 4px 16px 20px; }
.ma-balance { text-align: center; padding: 22px 0 18px; }
.ma-balance .lbl { opacity: .7; font-size: .88rem; }
.ma-balance .val { font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; }
.ma-balance .val .ruby svg { width: 34px; height: 34px; }
.ma-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.ma-act { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 20px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); font-size: .8rem; font-weight: 600; color: #f2efff; transition: background .2s, transform .2s var(--spring); }
.ma-act:hover { background: rgba(255, 255, 255, .1); transform: translateY(-2px); }
.ma-act .c { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #a855f7, #ec4899); color: #fff; }
.tx { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.tx .ti { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .07); flex: none; font-size: 1.1rem; }
.tx .tb { flex: 1; min-width: 0; }
.tx .tb b { font-size: .9rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tx .tb small { opacity: .6; font-size: .76rem; }
.tx .ta { font-weight: 700; font-variant-numeric: tabular-nums; }
.tx .ta.plus { color: #4ade80; }
.tx .ta.minus { color: #fda4af; }

/* ---------- admin ---------- */
.admin-modal .modal-body { padding-top: 0; }
.adm-tabs { display: flex; gap: 6px; padding: 0 0 12px; overflow-x: auto; position: sticky; top: 0; z-index: 2; background: transparent; }
.adm-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; transition: background .2s; }
.adm-row:hover { background: var(--hover); }
.adm-row .ava { --s: 40px; }
.adm-row .grow b { display: flex; align-items: center; gap: 5px; font-size: .94rem; }
.adm-row .grow small { color: var(--text-2); font-size: .78rem; }
.adm-row .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.adm-log { font-size: .85rem; padding: 10px 12px; border-radius: 14px; background: var(--panel-2); margin-bottom: 6px; display: flex; gap: 10px; }
.adm-log .t { color: var(--text-3); font-size: .76rem; white-space: nowrap; }
.adm-pill { font-size: .66rem; font-weight: 800; padding: 2px 7px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }
.adm-pill.red { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.adm-pill.amber { background: rgba(245, 158, 11, .18); color: #f59e0b; }
.admin-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(245, 158, 11, .12); color: #f59e0b; font-size: .84rem; font-weight: 600; margin-bottom: 12px; }

/* ---------- stories ---------- */
.sv-back { position: fixed; inset: 0; z-index: 140; background: rgba(0, 0, 0, .92); display: grid; place-items: center; animation: fadeIn .25s ease both; }
.sv { position: relative; width: min(420px, 100vw); height: min(780px, 100vh); border-radius: 24px; overflow: hidden; background: #111; animation: pop .35s var(--spring) both; user-select: none; }
@media (max-width: 560px) { .sv { border-radius: 0; } }
.sv-prog { position: absolute; z-index: 3; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; }
.sv-seg { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.sv-seg i { display: block; height: 100%; width: 0; background: #fff; }
.sv-seg.done i { width: 100%; }
.sv-head { position: absolute; z-index: 3; top: 22px; left: 12px; right: 8px; display: flex; align-items: center; gap: 10px; color: #fff; }
.sv-head .ava { --s: 36px; }
.sv-head small { opacity: .75; }
.sv-head .icon-btn { color: #fff; }
.sv-content { position: absolute; inset: 0; display: grid; place-items: center; }
.sv-content img, .sv-content video { width: 100%; height: 100%; object-fit: cover; }
.sv-text { padding: 30px; text-align: center; color: #fff; font-size: 1.6rem; font-weight: 800; line-height: 1.3; white-space: pre-wrap; text-shadow: 0 4px 20px rgba(0, 0, 0, .35); }
.sv-caption { position: absolute; left: 0; right: 0; bottom: 70px; padding: 12px 18px; color: #fff; text-align: center; font-weight: 600; background: linear-gradient(transparent, rgba(0, 0, 0, .5)); white-space: pre-wrap; }
.sv-nav { position: absolute; top: 70px; bottom: 70px; width: 35%; z-index: 2; }
.sv-nav.l { left: 0; } .sv-nav.r { right: 0; }
.sv-foot { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 14px; display: flex; align-items: center; gap: 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.sv-views { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 700; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sv-reply { flex: 1; height: 42px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .25); color: #fff; padding: 0 16px; outline: none; }
.sv-reply::placeholder { color: rgba(255, 255, 255, .7); }
.sv-sheet { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; max-height: 65%; border-radius: 24px 24px 0 0; display: flex; flex-direction: column; animation: sheetUp .35s var(--ease) both; background: color-mix(in srgb, var(--panel-solid) 90%, transparent); }
.sv-sheet .sh-head { padding: 14px 18px 8px; font-weight: 700; display: flex; align-items: center; }
.sv-sheet .sh-body { overflow-y: auto; padding: 0 10px 14px; }
.story-editor-prev { aspect-ratio: 9/16; max-height: 360px; border-radius: 18px; overflow: hidden; margin: 0 auto 12px; position: relative; display: grid; place-items: center; background: #111; }
.story-editor-prev img { width: 100%; height: 100%; object-fit: cover; }
.story-editor-prev .sv-text { font-size: 1.1rem; padding: 18px; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.filter-row button { flex: none; width: 62px; text-align: center; font-size: .72rem; font-weight: 600; color: var(--text-2); }
.filter-row button .fx { width: 62px; height: 62px; border-radius: 14px; background: linear-gradient(135deg, #f59e0b, #ec4899 50%, #3b82f6); margin-bottom: 4px; border: 2px solid transparent; }
.filter-row button.active { color: var(--accent); }
.filter-row button.active .fx { border-color: var(--accent); }

/* ---------- media viewer & disappearing ---------- */
.viewer-back { position: fixed; inset: 0; z-index: 160; background: rgba(0, 0, 0, .94); display: grid; place-items: center; animation: fadeIn .2s ease both; }
.viewer-back img, .viewer-back video { max-width: 94vw; max-height: 88vh; border-radius: 12px; animation: pop .35s var(--spring) both; }
.viewer-back .vclose { position: absolute; top: 14px; right: 14px; color: #fff; background: rgba(255, 255, 255, .12); }
.dz-view { position: relative; }
.dz-view .dz-media { max-width: 92vw; max-height: 84vh; border-radius: 16px; overflow: hidden; }
.dz-view.dissolve .dz-media { animation: dissolve 1.2s ease forwards; }
@keyframes dissolve { 0% { filter: blur(0); opacity: 1; transform: scale(1); } 60% { filter: blur(14px) saturate(2); opacity: .5; } 100% { filter: blur(40px); opacity: 0; transform: scale(1.12); } }
.dz-ring { position: absolute; top: 14px; right: 14px; width: 54px; height: 54px; z-index: 2; }
.dz-ring svg { transform: rotate(-90deg); }
.dz-ring .n { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; }
.dz-particles { position: absolute; inset: 0; pointer-events: none; }

/* ---------- full-screen effects ---------- */
.fx-layer { position: fixed; inset: 0; z-index: 250; pointer-events: none; overflow: hidden; }
.fx-p { position: absolute; will-change: transform, opacity; }
.burst-p { position: fixed; z-index: 260; pointer-events: none; font-size: 22px; will-change: transform, opacity; }
.big-emoji-fx { position: absolute; left: 50%; top: 50%; font-size: 180px; transform: translate(-50%, -50%); animation: bigFx 1.6s var(--ease) forwards; filter: drop-shadow(0 20px 50px rgba(0, 0, 0, .4)); }
@keyframes bigFx { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; } 25% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 60% { transform: translate(-50%, -50%) scale(1); } 100% { transform: translate(-50%, -60%) scale(1.4); opacity: 0; } }

/* ---------- misc lists ---------- */
.pick-list { display: grid; gap: 2px; }
.pick-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; cursor: pointer; transition: background .15s; width: 100%; text-align: left; }
.pick-item:hover { background: var(--hover); }
.pick-item .ava { --s: 40px; }
.pick-item .grow b { font-weight: 600; display: flex; align-items: center; gap: 5px; }
.pick-item .grow small { color: var(--text-2); font-size: .8rem; }
.pick-item.sel { background: var(--accent-soft); }
.pick-item .chk { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--text-3); flex: none; display: grid; place-items: center; }
.pick-item.sel .chk { background: var(--accent); border-color: var(--accent); color: #fff; }
.notif { display: flex; gap: 12px; padding: 12px; border-radius: 16px; cursor: pointer; transition: background .2s; }
.notif:hover { background: var(--hover); }
.notif.unread { background: var(--accent-soft); }
.notif .ni { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--panel-3); font-size: 1.1rem; }
.notif .nt { font-size: .9rem; }
.notif small { color: var(--text-3); font-size: .76rem; }
.feed-post { border-radius: 20px; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 10px; cursor: pointer; transition: background .2s, transform .2s var(--ease); }
.feed-post:hover { background: var(--hover); transform: translateY(-1px); }
.feed-post .fp-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.feed-post .fp-head .ava { --s: 34px; }
.feed-post .fp-text { font-size: .93rem; max-height: 9.5em; overflow: hidden; }
.premium-hero { text-align: center; padding: 10px 0 6px; }
.premium-hero .star { width: 96px; height: 96px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(247, 178, 27, .35), transparent 70%); color: #f7b21b; animation: floaty 3s ease-in-out infinite; }
.perk { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.perk .ico-sq { margin-top: 2px; }
.perk b { display: block; }
.perk small { color: var(--text-2); }
.color-dots { display: flex; gap: 10px; flex-wrap: wrap; }
.color-dots button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; transition: transform .2s var(--spring); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .2); }
.color-dots button.active { border-color: var(--text); transform: scale(1.12); }
.range { width: 100%; accent-color: var(--accent); }
.ai-result { white-space: pre-wrap; line-height: 1.5; padding: 14px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); min-height: 80px; }
.ai-caret::after { content: '▍'; animation: blink 1s infinite; color: #a78bfa; }
.comment { display: flex; gap: 10px; padding: 8px 0; }
.comment .ava { --s: 32px; }
.comment .cb { background: var(--panel-2); padding: 7px 12px; border-radius: 14px; font-size: .9rem; }
.comment .cb b { font-size: .8rem; display: block; color: var(--accent); }

/* ---------- gift send dialog ---------- */
.gsend { display: flex; flex-direction: column; gap: 14px; }
.gsend-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; border-radius: 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--rc) 18%, transparent), color-mix(in srgb, var(--rc) 6%, var(--panel-2)));
  border: 1px solid color-mix(in srgb, var(--rc) 28%, transparent);
}
.gsend-art { flex: none; width: 96px; height: 96px; display: grid; place-items: center; filter: drop-shadow(0 10px 18px color-mix(in srgb, var(--rc) 35%, transparent)); }
.gsend-art .gift-img, .gsend-art svg { width: 96px; height: 96px; }
.gsend-meta { min-width: 0; flex: 1; }
.gsend-name { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.gsend-rare { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.gsend-price { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 1.05rem; }
.gsend-section { display: flex; flex-direction: column; gap: 6px; }
.gsend-label { font-size: .78rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.gsend-to {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border-radius: 16px; border: 1px solid var(--border);
  background: var(--panel-2); color: inherit; cursor: pointer; text-align: left;
  transition: background .15s, border-color .15s;
}
.gsend-to:hover { background: var(--hover); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.gsend-to-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gsend-to-txt b { font-size: .95rem; }
.gsend-to-txt small { color: var(--text-2); font-size: .78rem; }
.gsend-change { color: var(--text-3); font-size: .8rem; display: inline-flex; align-items: center; gap: 2px; flex: none; }
.gsend-note { border-radius: 14px !important; }
.gsend-anon {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--border);
  cursor: pointer;
}
.gsend-anon-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.gsend-anon-txt b { font-size: .9rem; }
.gsend-anon-txt small { color: var(--text-2); font-size: .76rem; }
.gsend-hint { font-size: .78rem; color: var(--text-3); text-align: center; }
.gsend-btn { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; height: 48px; font-size: 1rem; border-radius: 16px !important; }

/* nicer gift bubble in chat */
.b-gift {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 16px 10px; min-width: 160px;
  border-radius: 18px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent);
}
.b-gift .ge { filter: drop-shadow(0 8px 16px rgba(0,0,0,.25)); }
.b-gift .gt { font-weight: 800; font-size: .95rem; margin-top: 4px; }
.b-gift .gs { font-size: .78rem; color: var(--text-2); text-align: center; }

/* ---------- top-up (Stars) ---------- */
.tp-modal .modal-body { padding: 0 0 12px; max-height: min(86vh, 720px); }
.tp-hero {
  text-align: center; padding: 28px 20px 12px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,80,100,.22), transparent 70%),
              linear-gradient(180deg, #1a0a0e 0%, transparent 100%);
  border-radius: 22px 22px 0 0; position: relative; overflow: hidden;
}
.tp-diamond {
  font-size: 56px; line-height: 1; display: inline-block;
  filter: drop-shadow(0 0 24px rgba(255,60,90,.7)) drop-shadow(0 8px 16px rgba(0,0,0,.4));
  animation: tpPulse 2.4s ease-in-out infinite;
}
@keyframes tpPulse {
  0%, 100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 20px rgba(255,60,90,.6)); }
  50% { transform: scale(1.08) rotate(4deg); filter: drop-shadow(0 0 36px rgba(255,80,110,.9)); }
}
.tp-hero h2 { margin: 10px 0 14px; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.tp-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.tp-tab { border: 0; background: transparent; color: var(--text-3); font: 600 .88rem/1 inherit; padding: 8px 18px; border-radius: 999px; cursor: default; }
.tp-tab.on { background: linear-gradient(135deg, #f5c542, #e8a317); color: #1a1200; box-shadow: 0 4px 14px rgba(245,197,66,.35); }
.tp-hint { margin: 12px 0 0; font-size: .82rem; color: var(--text-3); }
.tp-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  padding: 16px 16px 8px;
}
@media (min-width: 480px) { .tp-grid { grid-template-columns: repeat(4, 1fr); } }
.tp-card {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding: 16px 10px 12px; border-radius: 18px;
  background: linear-gradient(165deg, rgba(40,20,28,.9), rgba(18,10,14,.95));
  border: 1px solid rgba(255,100,120,.18);
  box-shadow: 0 8px 24px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.04);
  cursor: pointer; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
  color: inherit; text-align: center;
}
.tp-card:hover, .tp-card:active { transform: translateY(-3px) scale(1.02); border-color: rgba(255,120,140,.45); }
.tp-card.best {
  border-color: rgba(245,197,66,.45);
  background: linear-gradient(165deg, rgba(50,35,12,.95), rgba(22,14,6,.98));
  box-shadow: 0 10px 28px rgba(245,197,66,.18), inset 0 1px 0 rgba(255,230,150,.08);
}
.tp-disc {
  position: absolute; top: 8px; right: 8px; font-size: .68rem; font-weight: 800;
  padding: 2px 7px; border-radius: 999px; background: rgba(255,80,100,.2); color: #ff8a9b;
}
.tp-best {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  font-size: .68rem; font-weight: 800; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px;
  background: linear-gradient(135deg, #f5c542, #e8a317); color: #1a1200;
  box-shadow: 0 4px 12px rgba(245,197,66,.4);
}
.tp-gems { height: 42px; display: flex; align-items: center; justify-content: center; gap: 2px; margin-bottom: 6px; }
.tp-gem {
  font-size: 22px; display: inline-block;
  animation: tpGem 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * .18s);
  filter: drop-shadow(0 0 8px rgba(255,60,90,.55));
}
@keyframes tpGem {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-5px) scale(1.12); }
  60% { transform: translateY(-2px) scale(1.05); }
}
.tp-amt { font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.tp-lbl { font-size: .75rem; color: var(--text-3); margin-bottom: 10px; }
.tp-btn {
  width: 100%; padding: 8px 0; border-radius: 12px; font-weight: 700; font-size: .9rem;
  background: linear-gradient(135deg, #f5c542, #e0a010); color: #1a1200;
  box-shadow: 0 4px 14px rgba(245,197,66,.3);
}
.tp-card.best .tp-btn { background: linear-gradient(135deg, #ffe066, #f5c542); }
.tp-rate { margin-top: 6px; font-size: .68rem; color: var(--text-3); }
.tp-legal { text-align: center; font-size: .72rem; color: var(--text-3); padding: 4px 18px 8px; line-height: 1.4; }
.tp-legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal-text { font-size: .88rem; line-height: 1.55; color: var(--text-2); max-height: 60vh; overflow-y: auto; padding-right: 6px; }
.legal-text p { margin: 0 0 14px; }
.legal-text b { color: var(--text); }
