:root { color-scheme:dark; --bg:#0a0b10; --surface:#12151e; --raised:#1a1e2a; --line:#282d3d; --text:#f1f2f7; --muted:#9aa2b8; --accent:#7964ff; --success:#64ddae; font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif; }
* { box-sizing:border-box; } [hidden] { display:none!important; }
html,body { margin:0; min-width:320px; min-height:100%; background:var(--bg); color:var(--text); }
body { background:radial-gradient(ellipse at 15% 0,#39286830,transparent 45%),var(--bg); }
button,input,textarea { font:inherit; } button,a,input,textarea,summary { -webkit-tap-highlight-color:transparent; }
a { color:#beb3ff; text-underline-offset:4px; } button,summary { cursor:pointer; }
button:disabled { cursor:wait; opacity:.5; } :focus-visible { outline:2px solid #a494ff; outline-offset:3px; }
.forum-shell { max-width:1280px; margin:auto; } .brand-mark { display:grid; place-items:center; width:44px; height:44px; flex:0 0 44px; border-radius:14px; font-size:26px; font-weight:850; color:white; text-decoration:none; background:linear-gradient(140deg,#9c62ff,#5263f4); }
.chat-app { display:flex; flex-direction:column; height:100vh; height:100dvh; border-inline:1px solid var(--line); background:var(--bg); }
.chat-header { display:flex; align-items:center; gap:14px; min-height:86px; padding:16px 28px; background:#11141df0; border-bottom:1px solid var(--line); flex-shrink:0; }
.chat-heading { min-width:0; } h1 { letter-spacing:-.035em; } .chat-heading h1 { font-size:20px; margin:0 0 6px; display:flex; align-items:center; gap:10px; }
.chat-heading p { margin:0; color:var(--muted); font-size:12px; } .live-dot { height:7px; width:7px; border-radius:50%; background:var(--success); }
.chat-header nav { margin-left:auto; display:flex; align-items:center; gap:18px; font-size:13px; } .chat-header nav a { text-decoration:none; }
.button { display:inline-flex; justify-content:center; align-items:center; gap:12px; min-height:44px; padding:11px 17px; border:1px solid var(--line); border-radius:11px; text-decoration:none; font-weight:650; font-size:13px; color:var(--text); background:var(--raised); }
.button.primary { background:var(--accent); border-color:var(--accent); color:#fff; } .button.primary:hover { filter:brightness(1.13); } .button.compact { min-height:36px; padding:8px 12px; } .button.subtle { background:transparent; color:var(--muted); }
.forum-announcement { padding:11px 24px; background:#7964ff0d; color:#beb6e2; border-bottom:1px solid #7964ff22; font-size:12px; line-height:1.6; flex-shrink:0; white-space:pre-wrap; }
.membership-status { padding:8px 24px; font-size:12px; color:var(--muted); flex-shrink:0; } .membership-status a { margin-left:8px; }
.chat-timeline { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:20px 34px; scrollbar-width:thin; scrollbar-color:#333448 transparent; }
#olderMessages { display:flex; margin:0 auto 24px; } #messages { list-style:none; margin:0; padding:0; } .empty-chat { color:var(--muted); text-align:center; margin:10vh 0; font-size:14px; }
.chat-message { display:flex; align-items:flex-end; gap:10px; margin:18px 0; } .chat-message.own { flex-direction:row-reverse; }
.avatar { display:grid; place-items:center; flex:0 0 32px; width:32px; height:32px; border-radius:11px; background:#28233e; color:#c4b7ff; font-size:13px; font-weight:700; }
.bubble { max-width:min(76%,640px); padding:12px 16px 9px; border:1px solid var(--line); border-radius:16px 16px 16px 4px; background:var(--surface); min-width:100px; }
.own .bubble { border-radius:16px 16px 4px 16px; border-color:#7864fe55; background:#28203f; } .sender { display:block; color:#b6a6ff; font-size:12px; margin-bottom:6px; font-weight:650; }
.message-text { white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.65; margin:0; } .message-text a { color:#c5baff; }
.message-footer { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-top:6px; color:var(--muted); font-size:10px; }
.report-button,.delete-message-button { border:0; padding:3px 0; background:none; color:var(--muted); font-size:10px; }
.delete-message-button { color:#f2a3af; }
.day-divider { display:flex; justify-content:center; margin:28px 0; color:#8e95ab; font-size:11px; }
.chat-photo { display:block; width:auto; max-width:100%; max-height:350px; border-radius:10px; margin:6px 0; cursor:zoom-in; }
.video-card { width:min(380px,65vw); max-width:100%; } .video-card iframe { width:100%; height:280px; border:0; border-radius:10px; background:#000; } .video-card small { display:block; margin:8px 0; color:var(--muted); line-height:1.5; } .video-card .button { width:100%; margin:8px 0; }
.video-card iframe { display:block; }
.link-preview { display:grid; grid-template-columns:40px minmax(0,1fr); gap:5px 12px; align-items:center; width:min(340px,65vw); max-width:100%; margin:8px 0; padding:14px; border:1px solid var(--line); border-radius:12px; background:#1a1e2a; color:var(--text); text-decoration:none; overflow-wrap:anywhere; }
.link-preview-icon { grid-row:span 2; display:grid; place-items:center; width:40px; height:40px; border-radius:10px; background:#7964ff22; color:#c4b7ff; font-size:24px; }
.link-preview strong { font-size:13px; } .link-preview>span:last-child { color:var(--muted); font-size:11px; }
.link-preview-description { display:-webkit-box; overflow:hidden; color:var(--muted); font-size:11px; line-height:1.4; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.link-preview-image { grid-row:span 2; width:40px; height:40px; border-radius:10px; object-fit:cover; background:#0e1119; }
.forum-announcement[hidden],.membership-status[hidden] { display:none; }
.link-preview.has-image { grid-template-columns:minmax(0,1fr); width:min(380px,65vw); gap:8px; padding:0; }
.link-preview.has-image .link-preview-image { grid-row:auto; width:100%; height:190px; border-radius:11px 11px 0 0; }
.link-preview.has-image strong,.link-preview.has-image .link-preview-description,.link-preview.has-image>span:last-child { margin-inline:14px; }
.link-preview.has-image>span:last-child,.link-preview.has-image .link-preview-description { margin-bottom:12px; }
.link-preview:hover { border-color:var(--accent); }
.composer { position:relative; padding:14px 24px max(14px,env(safe-area-inset-bottom)); background:var(--surface); border-top:1px solid var(--line); flex-shrink:0; }
.composer-row { display:flex; align-items:flex-end; gap:8px; padding:7px; border:1px solid var(--line); border-radius:15px; background:#0e1119; }
.composer textarea { display:block; flex:1; min-width:0; max-height:130px; min-height:42px; padding:11px 6px; resize:none; border:0; background:transparent; color:var(--text); line-height:1.4; outline-offset:0; }
.icon-button { display:grid; place-items:center; flex:0 0 36px; width:36px; height:42px; color:#a6a1bf; font-size:22px; background:none; border:0; border-radius:8px; cursor:pointer; }
.composer-footer { display:flex; gap:12px; align-items:center; justify-content:space-between; color:var(--muted); font-size:10px; margin:9px 8px 0; } .composer-footer progress { width:130px; height:6px; accent-color:var(--accent); }
.guest-name { display:flex; align-items:center; gap:10px; margin:0 0 10px; font-size:11px; color:var(--muted); } .guest-name input { max-width:220px; width:100%; padding:7px 10px; border:1px solid var(--line); border-radius:7px; background:#0e1119; color:var(--text); font-size:12px; }
.media-preview { display:flex; align-items:center; gap:12px; padding:8px; margin-bottom:10px; color:var(--muted); font-size:12px; } .media-preview img,.media-preview video { width:70px; height:60px; object-fit:contain; } .media-preview button { margin-left:auto; color:white; background:none; border:0; font-size:24px; }
.emoji-picker { position:absolute; left:24px; bottom:100%; display:grid; grid-template-columns:repeat(6,1fr); padding:12px; border:1px solid var(--line); border-radius:14px; background:var(--raised); } .emoji-picker button { padding:8px; background:none; border:0; font-size:22px; }
dialog { max-width:95vw; max-height:95dvh; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--text); } dialog::backdrop { background:#000c; } dialog img { max-width:85vw; max-height:82dvh; display:block; } dialog button { display:block; margin:0 0 10px auto; color:white; border:0; background:none; font-size:28px; }
.page-card { width:min(540px,calc(100% - 32px)); margin:7vh auto; padding:36px; background:var(--surface); border:1px solid var(--line); border-radius:24px; box-shadow:0 25px 100px #0004; }
.page-card h1 { font-size:clamp(26px,5vw,36px); line-height:1.2; margin:24px 0 18px; } .page-card h2 { font-size:17px; } .page-card p { color:var(--muted); font-size:14px; line-height:1.75; } .eyebrow { font-size:10px!important; letter-spacing:.15em; margin-top:28px; } .muted { color:var(--muted); font-size:12px!important; }
.form-stack { display:grid; gap:20px; margin:24px 0; } .form-stack label { display:grid; gap:9px; font-size:13px; } .form-stack input { width:100%; min-width:0; min-height:46px; padding:11px 12px; border:1px solid var(--line); border-radius:9px; background:#0c0e15; color:var(--text); } .form-stack p { margin:0; }
.notice { padding:12px 15px; border:1px solid #7964ff55; border-radius:10px; color:#c6baff!important; background:#7964ff15; } .notice.error { color:#ffb9c0!important; border-color:#ff718855; }
.recovery-secret { background:#7964ff15; border:1px solid #7964ff66; border-radius:12px; padding:16px; } .recovery-secret code { display:block; overflow-wrap:anywhere; user-select:all; line-height:1.8; font-size:14px; }
.price { color:var(--text)!important; font-size:36px!important; font-weight:750; } .price span { display:block; color:var(--muted); font-size:12px; font-weight:400; } .qris { display:block; width:min(100%,320px); height:auto; margin:24px auto; border-radius:10px; background:#fff; } .account-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:20px; }
.rules { padding-left:20px; color:var(--muted); font-size:14px; line-height:1.8; } .rules li+li { margin-top:15px; }
@media(max-width:600px) { .chat-app { border:0; } .chat-header { padding:12px; gap:10px; min-height:74px; } .chat-header nav { gap:10px; font-size:11px; } .chat-heading h1 { font-size:17px; } .chat-heading p { font-size:10px; } .brand-mark { width:36px; height:36px; flex-basis:36px; border-radius:11px; font-size:22px; } .chat-timeline { padding:14px 12px; } .bubble { max-width:82%; padding:10px 12px 8px; } .avatar { width:26px; height:26px; flex-basis:26px; font-size:11px; } .chat-message { gap:7px; } .composer { padding:10px 8px max(10px,env(safe-area-inset-bottom)); } .composer-row { gap:2px; padding:5px; } .composer .button { padding:9px 11px; min-height:40px; font-size:12px; } .icon-button { flex-basis:29px; width:29px; } .forum-announcement,.membership-status { padding:8px 12px; font-size:11px; } .page-card { margin:24px auto; padding:24px; } }
@media(max-width:360px) { .chat-header nav { gap:7px; } .chat-header nav .button { padding:7px 9px; } .chat-heading p { max-width:125px; } .chat-header { gap:8px; } .message-text { font-size:13px; } }
@media(prefers-reduced-motion:reduce) { * { scroll-behavior:auto!important; } }

/* V3: the timeline remains the sole scroll container. */
.chat-header { padding:14px 24px; gap:14px; background:#11141d; }
.chat-header nav { gap:16px; min-width:0; }
.watch-videos { display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:8px 12px; border:1px solid #7564b955; border-radius:10px; background:#211e31; color:#e1dbff; white-space:nowrap; }
.watch-videos:hover { background:#2b2640; }
.watch-videos>span { font-size:21px; line-height:1; }
.profile-link { display:flex; align-items:center; gap:8px; max-width:180px; }
.profile-link>span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.forum-announcement,.membership-status { width:min(100%,760px); margin-inline:auto; text-align:center; box-sizing:border-box; overflow-wrap:anywhere; }
.forum-announcement { border:1px solid #7964ff22; border-radius:10px; margin-block:10px 0; padding:9px 14px; }
.membership-status { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:5px; padding:9px 14px; line-height:1.5; }
.membership-status a { margin:0; }
.timeline-wrap { position:relative; flex:1; min-height:0; }
.chat-timeline { height:100%; position:relative; overflow-anchor:none; }
.latest-messages { position:absolute; z-index:5; bottom:14px; right:20px; min-width:46px; height:46px; border:1px solid #8b80be66; border-radius:24px; background:#29253c; box-shadow:0 5px 18px #0005; color:#fff; display:flex; align-items:center; justify-content:center; gap:8px; padding:0 14px; animation:latest-appear .15s ease; }
.latest-messages>span:first-child { font-size:24px; }
#unreadMessages { font-size:11px; font-weight:650; }
@keyframes latest-appear { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
.avatar { position:relative; border-radius:50%; overflow:hidden; align-self:flex-end; }
.avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.header-avatar { flex:0 0 32px; width:32px; height:32px; align-self:center; }
.bubble { min-width:0; overflow-wrap:anywhere; box-shadow:0 2px 6px #0001; }
.chat-message.admin-message .bubble { border-color:#a18a4c55; }
.chat-message.admin-message .sender { color:#e7cf8c; }
.message-footer { flex-wrap:wrap; }
.message-views { display:inline-flex; align-items:center; gap:1px; color:var(--muted); font-variant-numeric:tabular-nums; }
.eye-icon { font-size:13px; line-height:1; color:#b9afd6; }
.reply-button { border:0; background:none; color:#b7acd7; min-height:28px; padding:4px; font-size:11px; }
.reply-quote,.reply-draft { border:0; border-left:3px solid #9b88dc; border-radius:4px 9px 9px 4px; padding:9px 11px; background:#ffffff08; color:var(--text); text-align:left; min-width:0; }
.reply-quote { display:flex; width:100%; gap:8px; margin:3px 0 9px; cursor:pointer; }
.reply-quote .avatar { width:24px; height:24px; flex-basis:24px; align-self:center; }
.reply-quote>span:last-child { min-width:0; }
.reply-quote strong,.reply-draft strong { display:block; font-size:11px; color:#c4b5f0; }
.reply-quote small,.reply-draft p { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; margin:3px 0 0; line-height:1.5; font-size:12px; color:var(--muted); white-space:pre-wrap; }
.reply-draft { display:flex; justify-content:space-between; align-items:center; margin-bottom:9px; }
.reply-draft>div { min-width:0; }
.reply-draft button { background:none; border:0; color:var(--text); font-size:23px; min-width:38px; min-height:38px; }
.chat-message.is-target .bubble { outline:2px solid #b8a3ff; outline-offset:4px; }
.chat-photo { height:auto; object-fit:contain; }
.video-card { width:min(420px,65vw,calc(60dvh * var(--video-aspect,1.777778))); position:relative; }
.video-card iframe { display:block; width:100%; height:auto; aspect-ratio:var(--video-aspect,1.777778); border-radius:10px; }
.video-card.is-expanded { position:fixed; inset:0; z-index:100; width:100vw; height:100dvh; max-width:none; padding:0; background:#000; }
.video-card.is-expanded iframe { width:100%; height:100%; aspect-ratio:auto; border-radius:0; }
.video-card.is-expanded small { display:none; }
.video-close { display:none; }
.video-card.is-expanded .video-close { display:block; position:absolute; z-index:2; top:12px; left:12px; border:1px solid #fff5; border-radius:9px; color:#fff; background:#111d; padding:9px 12px; font:12px inherit; }
body.video-expanded { overflow:hidden; }
.avatar-editor { padding:18px; margin:22px 0; border:1px solid var(--line); border-radius:14px; background:#11131c; }
.avatar-editor-heading { display:flex; align-items:center; gap:16px; margin-bottom:16px; }
.avatar-editor h2 { font-size:17px; margin:0 0 6px; }
.avatar-editor p { font-size:12px; color:var(--muted); line-height:1.5; }
.profile-avatar { width:96px; height:96px; flex:0 0 96px; position:relative; display:grid; place-items:center; overflow:hidden; border-radius:50%; background:#30283f; font-size:28px; color:#c9b6ed; }
.profile-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.avatar-file-label { display:grid; gap:8px; font-size:13px; }
.avatar-file-label input { min-width:0; max-width:100%; font-size:12px; }
#avatarCrop { margin-top:15px; }
#avatarCrop label { display:grid; gap:5px; margin-top:10px; font-size:12px; color:var(--muted); }
#avatarCrop input { width:100%; }
@media(hover:hover) { .reply-button { opacity:0; } .chat-message:hover .reply-button,.reply-button:focus-visible { opacity:1; } }
@media(max-width:700px) {
 .chat-header { display:grid; grid-template-columns:36px minmax(0,1fr); gap:9px 12px; padding:12px; }
 .chat-header nav { grid-column:1/-1; width:100%; margin:0; gap:12px; justify-content:flex-end; font-size:11px; }
 .watch-videos { margin-right:auto; padding:7px 9px; gap:5px; font-size:11px; min-height:38px; }
 .profile-link { max-width:125px; }
 .forum-announcement { width:calc(100% - 24px); }
 .latest-messages { right:12px; bottom:12px; }
 .bubble { max-width:calc(100% - 38px); }
 .profile-avatar { width:76px; height:76px; flex-basis:76px; }
}
@media(max-width:360px) { .chat-header nav { gap:8px; } .watch-videos { font-size:10px; padding:7px; } .profile-link { max-width:100px; } }
@media(prefers-reduced-motion:reduce) { .latest-messages { animation:none; } }
