/* ===== COMMUNITY CHAT ===== */
.cc-shell {
    height: calc(100dvh - 120px);
    min-height: 420px;
    display: flex;
    border-radius: 18px;
    overflow: hidden;
    background: color-mix(in srgb, var(--bg-2) 82%, transparent);
    border: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent);
    backdrop-filter: blur(18px);
    position: relative;
}
@media (max-width: 640px) { .cc-shell { height: calc(100dvh - 150px); border-radius: 14px; } }

.cc-btn {
    font-family: inherit; font-size: 0.82rem; color: var(--bright-text);
    background: color-mix(in srgb, var(--bright-text) 8%, transparent); border: 1px solid color-mix(in srgb, var(--bright-text) 8%, transparent);
    border-radius: 8px; padding: 8px 14px; transition: background 0.15s, opacity 0.15s;
}
.cc-btn:hover { background: color-mix(in srgb, var(--bright-text) 14%, transparent); }
.cc-btn:disabled { opacity: 0.5; }
.cc-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.cc-btn-primary:hover { background: var(--accent-2); }
.cc-btn-ghost { background: transparent; }
.cc-btn-danger { background: transparent; border-color: rgba(237, 66, 69, 0.5); color: #f38688; }
.cc-btn-danger:hover { background: rgba(237, 66, 69, 0.15); }
.cc-icon-btn {
    background: none; border: none; color: color-mix(in srgb, var(--bright-text) 60%, transparent); font-size: 1.15rem;
    width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background 0.15s, color 0.15s; font-family: inherit;
}
.cc-icon-btn:hover { background: color-mix(in srgb, var(--bright-text) 8%, transparent); color: var(--bright-text); }
.cc-link-btn { background: none; border: none; color: var(--accent); font-size: 0.75rem; font-family: inherit; padding: 4px; }
.cc-link-btn:hover { text-decoration: underline; }
.cc-error {
    color: #fa777c; background: rgba(237, 66, 69, 0.1); border: 1px solid rgba(237, 66, 69, 0.3);
    border-radius: 8px; padding: 8px 12px; font-size: 0.8rem;
}
.cc-error a, .cc-composer-error a { color: var(--accent); }
.cc-hint { color: color-mix(in srgb, var(--bright-text) 35%, transparent); font-size: 0.7rem; }

/* Login */
.cc-login { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cc-login-card {
    width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 10px;
    background: color-mix(in srgb, var(--bg-3) 75%, transparent); border: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent);
    border-radius: 16px; padding: 30px 26px; text-align: center;
}
.cc-login-card h2 { color: var(--bright-text); font-weight: 600; font-size: 1.4rem; }
.cc-login-card label { display: block; text-align: left; color: color-mix(in srgb, var(--bright-text) 55%, transparent); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 6px; }
.cc-login-card input, .cc-settings-form input:not([type]), .cc-settings-form textarea, .cc-settings-form select, .cc-status-row input {
    width: 100%; background: var(--bg-2); border: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent); border-radius: 8px;
    color: var(--bright-text); padding: 11px 12px; font-family: inherit; font-size: 0.9rem; outline: none;
}
.cc-login-card input:focus, .cc-settings-form input:focus, .cc-settings-form textarea:focus { border-color: var(--accent); }
.cc-login-card .cc-hint { text-align: left; margin-top: 4px; }
.cc-login-sub { color: color-mix(in srgb, var(--bright-text) 50%, transparent); font-size: 0.85rem; margin-bottom: 8px; }
.cc-login-icon { width: 64px; height: 64px; margin: 0 auto 4px; color: var(--accent-text); background: var(--accent); border-radius: 20px; display: flex; align-items: center; justify-content: center; }
.cc-login-icon svg { width: 36px; height: 36px; }
.cc-login-card .cc-btn-primary { padding: 11px; font-size: 0.9rem; margin-top: 4px; }
/* Secret owner login: a faint crown in the card's top-right corner */
.cc-login-card { position: relative; }
.cc-owner-login-btn {
    position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: none; border-radius: 8px;
    background: none; font-size: 1rem; line-height: 1; cursor: pointer; opacity: 0.22; filter: grayscale(0.6);
    transition: opacity 0.2s, filter 0.2s, background 0.2s;
}
.cc-owner-login-btn:hover, .cc-owner-login-btn:focus-visible { opacity: 0.9; filter: none; }
.cc-owner-login-btn.on { opacity: 1; filter: none; background: rgba(255, 215, 0, 0.12); box-shadow: 0 0 12px rgba(255, 215, 0, 0.35); }
.cc-owner-mode { border-color: rgba(255, 215, 0, 0.35); box-shadow: 0 0 24px rgba(255, 215, 0, 0.12); }
.cc-owner-mode .cc-login-icon { background: linear-gradient(135deg, #b8860b, #ffd700); color: #3a2600; }
.cc-owner-mode .cc-auth-tabs, .cc-owner-mode #ccLoginModeToggle { display: none; }
.cc-owner-mode .cc-btn-primary { background: linear-gradient(90deg, #b8860b, #ffd700); border-color: #d4a017; color: #3a2600; }
.cc-owner-mode input:focus { border-color: #ffd700; }

/* Chat layout */
.cc-chat { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
.cc-header {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent); background: color-mix(in srgb, var(--bg) 15%, transparent);
}
.cc-channel { flex: 1; color: var(--bright-text); font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.cc-hash { color: color-mix(in srgb, var(--bright-text) 35%, transparent); font-size: 1.3rem; font-weight: 400; }
.cc-online { color: color-mix(in srgb, var(--bright-text) 40%, transparent); font-size: 0.72rem; font-weight: 400; margin-left: 8px; display: inline-flex; align-items: center; gap: 5px; }
.cc-online i { width: 8px; height: 8px; border-radius: 50%; background: #23a55a; display: inline-block; }
.cc-me { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 10px; min-width: 0; }
.cc-me:hover { background: color-mix(in srgb, var(--bright-text) 6%, transparent); }
.cc-me-info { display: flex; flex-direction: column; min-width: 0; }
.cc-me-info .cc-name { font-size: 0.82rem; }
.cc-xpbar { width: 110px; height: 5px; border-radius: 4px; background: color-mix(in srgb, var(--bright-text) 10%, transparent); overflow: hidden; margin-top: 3px; }
.cc-xpbar > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 4px; transition: width 0.4s; }
.cc-xptext { font-size: 0.6rem; color: color-mix(in srgb, var(--bright-text) 40%, transparent); }
@media (max-width: 640px) { .cc-xpbar { width: 70px; } .cc-online { display: none; } }

.cc-messages { flex: 1; overflow-y: auto; padding: 8px 0 12px; overscroll-behavior: contain; }
.cc-messages::-webkit-scrollbar { width: 8px; }
.cc-messages::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--bright-text) 12%, transparent); border-radius: 8px; }
.cc-history-status { text-align: center; color: color-mix(in srgb, var(--bright-text) 35%, transparent); font-size: 0.75rem; padding: 10px 16px; }
.cc-history-status h3 { color: var(--bright-text); font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.cc-day { display: flex; align-items: center; gap: 10px; margin: 14px 16px 6px; color: color-mix(in srgb, var(--bright-text) 35%, transparent); font-size: 0.68rem; font-weight: 600; }
.cc-day::before, .cc-day::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--bright-text) 7%, transparent); }

/* Messages: others on the left, your own on the right */
.cc-msg { display: flex; gap: 12px; padding: 2px 16px; margin-top: 12px; align-items: flex-start; }
.cc-msg.cc-cont { margin-top: 1px; }
.cc-msg:hover { background: color-mix(in srgb, var(--bg) 12%, transparent); }
.cc-msg.cc-own { flex-direction: row-reverse; }
.cc-msg-gutter { width: 40px; flex-shrink: 0; }
.cc-msg.cc-cont .cc-msg-gutter { height: 0; }
.cc-msg-body { min-width: 0; max-width: min(75%, 640px); display: flex; flex-direction: column; align-items: flex-start; }
.cc-own .cc-msg-body { align-items: flex-end; }
.cc-msg-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 3px; flex-wrap: wrap; }
.cc-own .cc-msg-head { flex-direction: row-reverse; }
.cc-time { color: color-mix(in srgb, var(--bright-text) 30%, transparent); font-size: 0.65rem; }
.cc-bubble {
    color: var(--text); font-size: 0.9rem; line-height: 1.45; padding: 7px 12px; border-radius: 4px 14px 14px 14px;
    background: color-mix(in srgb, var(--bright-text) 5%, transparent); word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap;
}
.cc-own .cc-bubble { background: var(--accent); color: var(--accent-text); border-radius: 14px 4px 14px 14px; }
.cc-cont .cc-bubble { border-radius: 14px; }
.cc-bubble.cc-jumbo { background: none !important; font-size: 2.6rem; line-height: 1.15; padding: 0 2px; }
.cc-bubble.cc-mention { background: rgba(240, 177, 50, 0.15); border-left: 3px solid #f0b232; }
.cc-bubble a { color: var(--accent); }
.cc-own .cc-bubble a { color: var(--accent-text); text-decoration: underline; }
.cc-bubble code { background: color-mix(in srgb, var(--bg) 35%, transparent); border-radius: 4px; padding: 1px 4px; font-family: Consolas, monospace; font-size: 0.82rem; }
.cc-at { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--bright-text); border-radius: 3px; padding: 0 2px; font-weight: 600; }
.cc-msg-img { max-width: min(320px, 100%); max-height: 300px; border-radius: 10px; margin-top: 4px; display: block; border: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent); }

.cc-name { font-weight: 600; font-size: 0.88rem; color: var(--bright-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cc-name.cc-grad { -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cc-clickable:hover { text-decoration: underline; }
.cc-lvl { font-size: 0.6rem; font-weight: 700; color: var(--accent-text); background: linear-gradient(90deg, var(--accent), var(--accent-2)); padding: 1px 6px; border-radius: 6px; }
.cc-lvl.cc-max { background: linear-gradient(90deg, #f0b232, #ff7a00); }
.cc-status { font-size: 0.7rem; color: color-mix(in srgb, var(--bright-text) 40%, transparent); }

/* Name fonts */
.cc-font-bold { font-weight: 800; letter-spacing: 0.2px; }
.cc-font-mono { font-family: Consolas, "Courier New", monospace; }
.cc-font-serif { font-family: Georgia, "Times New Roman", serif; }
.cc-font-cursive { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 1.05em; }
.cc-font-pixel { font-family: "Orbitron", monospace; font-size: 0.8em; letter-spacing: 1px; }

/* Avatars & decorations */
.cc-avatar { position: relative; width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.cc-avatar.cc-sm { width: 32px; height: 32px; }
.cc-avatar.cc-lg { width: 84px; height: 84px; }
.cc-avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 0.95rem; overflow: hidden; }
.cc-lg .cc-avatar-img { font-size: 2rem; }
.cc-avatar::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; pointer-events: none; }
.cc-deco-glow::after { box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.55); border: 2px solid rgba(255, 255, 255, 0.8); }
.cc-deco-rainbow::after { inset: -4px; padding: 3px; background: conic-gradient(#ff004c, #ffb300, #3cff00, #00d0ff, #a100ff, #ff004c); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: cc-spin 3s linear infinite; }
.cc-deco-fire::after { inset: -4px; border: 3px solid #ff6a00; box-shadow: 0 0 12px #ff3d00, 0 -4px 14px #ffb300; animation: cc-flicker 0.9s ease-in-out infinite alternate; }
.cc-deco-ice::after { border: 3px solid #9be7ff; box-shadow: 0 0 10px #4fc3f7, inset 0 0 6px #e1f5fe; }
.cc-deco-gold::after { inset: -4px; padding: 3px; background: linear-gradient(135deg, #fff1a8, #d4a017, #fff1a8, #b8860b); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.cc-deco-neon::after { border: 2px solid #ff2bd6; box-shadow: 0 0 8px #ff2bd6, 0 0 16px #00f0ff; animation: cc-pulse 1.6s ease-in-out infinite; }
.cc-deco-sakura::after { content: "🌸"; inset: auto -6px -6px auto; font-size: 18px; line-height: 1; filter: drop-shadow(0 0 2px rgba(0,0,0,0.6)); }
.cc-lg.cc-deco-sakura::after { font-size: 30px; }
/* Current built-in set (lib/chatroom.ts DECORATIONS). The rules above are kept for older saved values. */
.cc-deco-halo::after { border: 2px solid #ffe08a; box-shadow: 0 0 10px #ffd54f, inset 0 0 6px rgba(255, 224, 138, 0.6); animation: cc-halo 2.4s ease-in-out infinite; }
.cc-deco-pixel::after { inset: -4px; border-radius: 22%; border: 3px dashed #7cff6b; box-shadow: 0 0 0 1px #1b5e20; }
.cc-deco-catears::before { content: ""; position: absolute; left: 2%; right: 2%; top: -26%; height: 42%; background: linear-gradient(#f8b4d9, #e46ba6); clip-path: polygon(4% 100%, 16% 0, 40% 100%, 60% 100%, 84% 0, 96% 100%); pointer-events: none; }
.cc-deco-catears::after { border: 2px solid #f8b4d9; }
.cc-deco-vines::after { border: 2px dotted #66bb6a; box-shadow: 0 0 6px rgba(102, 187, 106, 0.6); }
.cc-deco-vines::before { content: "🌿"; position: absolute; left: -6px; bottom: -6px; font-size: 16px; line-height: 1; transform: scaleX(-1); z-index: 1; pointer-events: none; filter: drop-shadow(0 0 2px rgba(0,0,0,0.6)); }
.cc-lg.cc-deco-vines::before { font-size: 28px; }
.cc-deco-flame::after { inset: -4px; border: 3px solid #ff6a00; box-shadow: 0 0 12px #ff3d00, 0 -4px 14px #ffb300; animation: cc-flicker 0.9s ease-in-out infinite alternate; }
.cc-deco-glitch::after { border: 2px solid #fff; animation: cc-glitch 1.2s steps(2, end) infinite; }
.cc-deco-crown::after { inset: -4px; padding: 3px; background: linear-gradient(135deg, #fff1a8, #d4a017, #fff1a8, #b8860b); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.cc-deco-crown::before { content: "👑"; position: absolute; left: 50%; top: -14px; transform: translateX(-50%) rotate(-8deg); font-size: 16px; line-height: 1; z-index: 1; pointer-events: none; filter: drop-shadow(0 0 3px rgba(255, 213, 79, 0.8)); }
.cc-lg.cc-deco-crown::before { top: -26px; font-size: 30px; }
/* Image decorations (Discord avatar decorations, flag frames): drawn 120% of the avatar, like Discord does. */
.cc-deco-image::after { display: none; }
.cc-deco-img { position: absolute; top: -10%; left: -10%; width: 120%; height: 120%; max-width: none; pointer-events: none; user-select: none; z-index: 1; }
@keyframes cc-halo { 50% { box-shadow: 0 0 18px #ffd54f, inset 0 0 8px rgba(255, 224, 138, 0.8); } }
@keyframes cc-glitch { 0% { box-shadow: -2px 0 #ff004c, 2px 0 #00f0ff; } 50% { box-shadow: 2px 1px #ff004c, -2px -1px #00f0ff; } 100% { box-shadow: -1px -1px #ff004c, 1px 1px #00f0ff; } }
@keyframes cc-spin { to { transform: rotate(360deg); } }
@keyframes cc-flicker { from { box-shadow: 0 0 8px #ff3d00, 0 -3px 10px #ffb300; } to { box-shadow: 0 0 16px #ff3d00, 0 -6px 20px #ffd54f; } }
@keyframes cc-pulse { 50% { box-shadow: 0 0 14px #ff2bd6, 0 0 26px #00f0ff; } }

/* Typing indicator */
.cc-typing { height: 22px; padding: 0 16px; font-size: 0.72rem; color: color-mix(in srgb, var(--bright-text) 55%, transparent); display: flex; align-items: center; gap: 6px; }
.cc-typing b { color: var(--bright-text); font-weight: 600; }
.cc-dots { display: inline-flex; gap: 3px; }
.cc-dots span { width: 5px; height: 5px; border-radius: 50%; background: color-mix(in srgb, var(--bright-text) 70%, transparent); animation: cc-bounce 1.2s infinite; }
.cc-dots span:nth-child(2) { animation-delay: 0.15s; }
.cc-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes cc-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-3px); opacity: 1; } }

.cc-jump {
    position: absolute; left: 50%; transform: translateX(-50%); bottom: 96px; z-index: 3;
    background: var(--accent); color: var(--accent-text); border: none; border-radius: 20px; padding: 6px 14px; font-size: 0.75rem; font-family: inherit; font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* Composer */
.cc-composer-wrap { padding: 0 14px 14px; position: relative; }
.cc-composer { display: flex; align-items: flex-end; gap: 4px; background: var(--bg-4); border-radius: 12px; padding: 4px 6px; }
.cc-composer textarea {
    flex: 1; resize: none; background: none; border: none; outline: none; color: var(--bright-text); font-family: inherit;
    font-size: 0.9rem; line-height: 1.4; padding: 8px 4px; max-height: 160px; min-height: 36px;
}
.cc-composer textarea::placeholder { color: color-mix(in srgb, var(--bright-text) 35%, transparent); }
.cc-gif-btn { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.02em; border: 1.5px solid currentColor; border-radius: 5px; padding: 1px 4px; margin: 0 2px; line-height: 1.2; height: auto; width: auto; align-self: center; }
.cc-upload-btn { background: color-mix(in srgb, var(--bright-text) 12%, transparent); border-radius: 50%; width: 26px; height: 26px; margin: 5px; font-size: 1rem; color: var(--bright-text); }
.cc-send-btn { color: var(--accent); }
.cc-composer-error { color: #fa777c; font-size: 0.78rem; padding: 8px 12px; margin-bottom: 8px; background: rgba(237, 66, 69, 0.1); border: 1px solid rgba(237, 66, 69, 0.3); border-radius: 8px; }
.cc-image-preview { display: flex; align-items: center; gap: 10px; background: var(--bg-3); border-radius: 10px; padding: 8px; margin-bottom: 8px; color: color-mix(in srgb, var(--bright-text) 60%, transparent); font-size: 0.75rem; }
.cc-image-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }

/* Emoji picker */
.cc-emoji-picker {
    position: absolute; right: 14px; bottom: 62px; width: 330px; max-width: calc(100% - 28px); height: 340px; z-index: 5;
    background: var(--bg-3); border: 1px solid color-mix(in srgb, var(--bright-text) 8%, transparent); border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    display: flex; flex-direction: column; overflow: hidden;
}
.cc-emoji-picker.hidden { display: none; }
.cc-emoji-picker-inline { position: relative; right: auto; bottom: auto; width: 100%; max-width: none; height: 260px; margin-top: 8px; }
.cc-emoji-search { margin: 8px; background: var(--bg-2); border: none; border-radius: 6px; color: var(--bright-text); padding: 7px 10px; font-family: inherit; font-size: 0.8rem; outline: none; }
.cc-emoji-tabs { display: flex; gap: 2px; padding: 0 6px 6px; border-bottom: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent); }
.cc-emoji-tabs button { background: none; border: none; font-size: 1.05rem; padding: 4px; border-radius: 6px; flex: 1; }
.cc-emoji-tabs button:hover, .cc-emoji-tabs button.active { background: color-mix(in srgb, var(--bright-text) 8%, transparent); }
.cc-emoji-grid { flex: 1; overflow-y: auto; padding: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); align-content: start; }
.cc-emoji-grid h5 { grid-column: 1 / -1; color: color-mix(in srgb, var(--bright-text) 45%, transparent); font-size: 0.65rem; font-weight: 600; text-transform: uppercase; margin: 6px 4px 4px; }
.cc-emoji-grid button { background: none; border: none; font-size: 1.45rem; padding: 3px; border-radius: 6px; line-height: 1.2; }
.cc-emoji-grid button:hover { background: color-mix(in srgb, var(--bright-text) 10%, transparent); }

/* Modal / settings */
.cc-modal { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.7); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cc-modal-card { width: 100%; max-width: 920px; max-height: 92vh; display: flex; flex-direction: column; background: var(--bg-3); border-radius: 14px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent); }
.cc-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent); }
.cc-modal-head h3 { color: var(--bright-text); font-weight: 600; font-size: 1.05rem; }
.cc-settings-body { display: flex; gap: 20px; padding: 18px; overflow-y: auto; }
.cc-settings-form { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.cc-settings-form section { display: flex; flex-direction: column; gap: 6px; }
.cc-settings-form h4 { color: var(--bright-text); font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent); }
.cc-settings-form label { color: color-mix(in srgb, var(--bright-text) 60%, transparent); font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.cc-settings-form label.cc-check { text-transform: none; font-size: 0.8rem; margin: 0; color: color-mix(in srgb, var(--bright-text) 75%, transparent); }
.cc-settings-form textarea { resize: vertical; }
.cc-settings-form input[type="color"] { width: 42px; height: 34px; border: none; border-radius: 8px; background: none; padding: 0; }
.cc-nitro-tag { text-transform: none; letter-spacing: 0; font-size: 0.6rem; font-weight: 700; color: var(--accent-text); background: linear-gradient(90deg, var(--accent), var(--accent-2)); padding: 1px 7px; border-radius: 8px; }
.cc-upload-row, .cc-key-row, .cc-status-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cc-key-row input { flex: 1; min-width: 140px; }
.cc-status-row input { flex: 1; }
.cc-status-emoji { font-size: 1.1rem; padding: 6px 10px; }
.cc-deco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.cc-deco-opt { background: var(--bg-3); border: 2px solid transparent; border-radius: 10px; padding: 10px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: color-mix(in srgb, var(--bright-text) 60%, transparent); font-size: 0.65rem; font-family: inherit; text-transform: capitalize; }
.cc-deco-opt.active { border-color: var(--accent); color: var(--bright-text); }
.cc-deco-opt .cc-avatar { margin-top: 4px; }
.cc-deco-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-deco-grid-scroll { max-height: 290px; overflow-y: auto; padding: 4px 4px 4px 0; }
.cc-deco-empty { grid-column: 1 / -1; color: color-mix(in srgb, var(--bright-text) 50%, transparent); font-size: 0.8rem; padding: 8px 2px; }
.cc-deco-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cc-deco-tabs { display: flex; gap: 4px; background: var(--bg-2); padding: 3px; border-radius: 8px; }
.cc-deco-tabs button { background: none; border: none; color: color-mix(in srgb, var(--bright-text) 60%, transparent); font: inherit; font-size: 0.75rem; font-weight: 600; padding: 5px 10px; border-radius: 6px; cursor: pointer; position: relative; }
.cc-deco-tabs button.active { background: var(--accent); color: var(--accent-text); }
.cc-deco-tabs button.has-active:not(.active)::after { content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cc-settings-form #ccDecoSearch { flex: 1; min-width: 140px; background: var(--bg-2); border: 1px solid transparent; border-radius: 8px; color: var(--bright-text); padding: 7px 10px; font: inherit; font-size: 0.8rem; outline: none; }
.cc-settings-form #ccDecoSearch:focus { border-color: var(--accent); }
.cc-settings-actions { display: flex; justify-content: space-between; gap: 10px; }
.cc-settings-preview { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 760px) { .cc-settings-body { flex-direction: column-reverse; } .cc-settings-preview { width: 100%; } }

/* Profile card (popout + settings preview) */
.cc-card { width: 300px; max-width: 100%; border-radius: 12px; overflow: hidden; padding: 4px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); }
.cc-card-inner { border-radius: 9px; overflow: hidden; background: color-mix(in srgb, var(--bg-2) 60%, transparent); }
.cc-card-banner { height: 100px; background-size: cover; background-position: center; }
.cc-card-avatar { margin: -46px 0 0 14px; padding: 5px; border-radius: 50%; background: inherit; display: inline-block; }
.cc-card-body { padding: 6px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.cc-card-body .cc-name { font-size: 1.15rem; }
.cc-card-section { background: color-mix(in srgb, var(--bg) 25%, transparent); border-radius: 8px; padding: 10px; color: var(--text); font-size: 0.8rem; display: flex; flex-direction: column; gap: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cc-card-section h6 { color: color-mix(in srgb, var(--bright-text) 70%, transparent); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; }
.cc-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.cc-badge { font-size: 0.62rem; font-weight: 600; color: var(--bright-text); background: color-mix(in srgb, var(--bright-text) 8%, transparent); padding: 2px 7px; border-radius: 6px; }
.cc-popout { position: fixed; z-index: 70; }
.cc-lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center; padding: 20px; }
.cc-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* Floating chat button + toast */
.cc-fab {
    position: fixed; right: 22px; bottom: 96px; z-index: 30; width: 56px; height: 56px; border-radius: 50%;
    background: var(--accent); color: var(--accent-text); border: none; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 45%, transparent); transition: transform 0.15s, background 0.15s;
}
.cc-fab:hover { transform: scale(1.07); background: var(--accent-2); }
.cc-fab svg { width: 28px; height: 28px; }
.cc-fab.hidden { display: none; }
.cc-fab-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #ed4245; color: #fff; font-size: 0.68rem; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-2); }
@media (max-width: 640px) { .cc-fab { bottom: 84px; right: 14px; width: 50px; height: 50px; } }
.cc-toast {
    position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 90;
    background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: var(--accent-text); font-weight: 600; font-size: 0.85rem;
    padding: 10px 18px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); animation: fadeIn 0.3s ease;
}

/* Log In / Sign Up */
.cc-auth-tabs { display: flex; background: var(--bg-2); border-radius: 10px; padding: 4px; gap: 4px; margin-bottom: 4px; }
.cc-auth-tab { flex: 1; background: none; border: none; color: color-mix(in srgb, var(--bright-text) 55%, transparent); font-family: inherit; font-size: 0.85rem; font-weight: 600; padding: 8px; border-radius: 7px; transition: background 0.15s, color 0.15s; }
.cc-auth-tab.active { background: var(--accent); color: var(--accent-text); }
.cc-auth-tab:not(.active):hover { background: color-mix(in srgb, var(--bright-text) 6%, transparent); color: var(--bright-text); }
.cc-pass-wrap { position: relative; }
.cc-pass-wrap input { padding-right: 42px !important; }
.cc-settings-form .cc-pass-wrap input { width: 100%; background: var(--bg-2); border: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent); border-radius: 8px; color: var(--bright-text); padding: 11px 12px; font-family: inherit; font-size: 0.9rem; outline: none; }
.cc-pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 1rem; opacity: 0.55; padding: 4px 6px; }
.cc-pass-toggle:hover, .cc-pass-toggle.on { opacity: 1; }

/* Upload thumbnails in settings */
.cc-thumb { background: var(--bg-2) center / cover no-repeat; border: 1px solid color-mix(in srgb, var(--bright-text) 8%, transparent); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: color-mix(in srgb, var(--bright-text) 30%, transparent); font-size: 0.65rem; }
.cc-thumb-avatar { width: 46px; height: 46px; border-radius: 50%; }
.cc-thumb-banner { width: 92px; height: 40px; border-radius: 8px; }

/* XP details on profile cards */
.cc-xp-need { font-size: 0.75rem; color: var(--text); }
.cc-xp-need b { color: var(--bright-text); }

/* Display name effects */
.cc-fx-glow { filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.65)); }
.cc-fx-neon { filter: drop-shadow(0 0 3px #ff2bd6) drop-shadow(0 0 6px #00f0ff); animation: cc-neon 1.8s ease-in-out infinite; }
.cc-fx-shimmer { background-image: linear-gradient(110deg, var(--cc-c1) 30%, #ffffff 50%, var(--cc-c2) 70%); background-size: 250% 100%; animation: cc-shimmer 2.6s linear infinite; }
.cc-fx-rainbow { background-image: linear-gradient(90deg, #ff004c, #ffb300, #3cff00, #00d0ff, #a100ff, #ff004c); background-size: 200% 100%; animation: cc-shimmer 3s linear infinite; }
.cc-fx-wave { display: inline-block; animation: cc-wave 1.6s ease-in-out infinite; }
.cc-fx-pop { filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.85)); font-weight: 800; }
@keyframes cc-neon { 50% { filter: drop-shadow(0 0 6px #ff2bd6) drop-shadow(0 0 12px #00f0ff); } }
@keyframes cc-shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes cc-wave { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-2px) rotate(-2deg); } 75% { transform: translateY(1px) rotate(2deg); } }
.cc-namefx-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.cc-fx-sample { max-width: 100%; overflow: hidden; display: block; padding: 2px 4px; }
.cc-fx-sample .cc-name { font-size: 0.8rem; text-transform: none; }
.cc-effect-icon { font-size: 1.4rem; line-height: 1.3; }

/* Profile effects (animated overlay on the whole profile card) */
.cc-card { position: relative; }
.cc-pfx { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; border-radius: inherit; }
.cc-pfx span { position: absolute; line-height: 1; opacity: 0; animation-iteration-count: infinite; animation-timing-function: linear; }
.cc-pfx-fall span { top: -24px; animation-name: cc-pfx-fall; }
.cc-pfx-rise span { bottom: -24px; animation-name: cc-pfx-rise; }
.cc-pfx-twinkle span { animation-name: cc-pfx-twinkle; animation-timing-function: ease-in-out; }
.cc-pfx-twinkle span:nth-child(odd) { top: 12%; } .cc-pfx-twinkle span:nth-child(3n) { top: 45%; } .cc-pfx-twinkle span:nth-child(4n) { top: 78%; } .cc-pfx-twinkle span:nth-child(5n) { top: 28%; }
.cc-pfx-orbs span { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.7); background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.05)); }
.cc-pfx-aurora span, .cc-pfx-glitch span { inset: 0; opacity: 1; }
.cc-pfx-aurora span { inset: -20% -40%; background: linear-gradient(115deg, transparent 20%, rgba(60, 255, 180, 0.28), rgba(90, 120, 255, 0.3), rgba(220, 80, 255, 0.24), transparent 80%); filter: blur(14px); animation: cc-pfx-aurora 7s ease-in-out infinite alternate; }
.cc-pfx-glitch span { background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px); animation: cc-pfx-glitch 2.4s steps(1) infinite; }
@keyframes cc-pfx-aurora { from { transform: translateX(-12%) skewY(-4deg); } to { transform: translateX(12%) skewY(4deg); } }
@keyframes cc-pfx-glitch { 0%, 100% { transform: none; box-shadow: none; } 8% { transform: translateX(-3px); box-shadow: inset 3px 0 rgba(255, 0, 80, 0.35), inset -3px 0 rgba(0, 240, 255, 0.35); } 10% { transform: translateX(2px); } 12%, 60% { transform: none; box-shadow: none; } 62% { transform: translateY(2px); box-shadow: inset -2px 0 rgba(255, 0, 80, 0.3), inset 2px 0 rgba(0, 240, 255, 0.3); } }
/* Official Discord effects: full-width APNG layers anchored to the top of the card */
.cc-pfx-discord img { position: absolute; top: 0; left: 0; width: 100%; height: auto; opacity: 0; }
.cc-pfx-discord .cc-pfx-still { display: none; }
@keyframes cc-pfx-on { to { opacity: 1; } }
@keyframes cc-pfx-once { 0%, 99.9% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .cc-pfx-discord .cc-pfx-layer { display: none; }
    .cc-pfx-discord .cc-pfx-still { display: block; opacity: 1; }
    .cc-pfx-aurora span, .cc-pfx-glitch span { animation: none; }
}
.cc-settings-form .cc-effect-select { margin-top: 8px; width: 100%; }
@keyframes cc-pfx-fall { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: 0.9; } 90% { opacity: 0.9; } 100% { transform: translateY(560px) translateX(24px) rotate(320deg); opacity: 0; } }
@keyframes cc-pfx-rise { 0% { transform: translateY(0) scale(0.7); opacity: 0; } 15% { opacity: 0.9; } 85% { opacity: 0.7; } 100% { transform: translateY(-560px) translateX(-16px) scale(1.1); opacity: 0; } }
@keyframes cc-pfx-twinkle { 0%, 100% { transform: scale(0.4); opacity: 0; } 50% { transform: scale(1.1); opacity: 1; } }

/* Roles: Verified is green (given by staff), the owner is gold, mods are red-gold */
.cc-verified {
    display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%;
    background: #23a55a; color: #fff; font-size: 0.55rem; font-weight: 700; align-self: center; flex-shrink: 0;
}
.cc-role {
    font-size: 0.6rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; padding: 1px 7px; border-radius: 6px;
    align-self: center; white-space: nowrap; background-size: 200% 100%; animation: cc-role-shine 4s linear infinite;
}
.cc-role-owner {
    color: #3a2600; background-image: linear-gradient(90deg, #b8860b, #ffd700, #fff3b0, #ffd700, #b8860b);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.45); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.cc-role-mod {
    color: #fff; background-image: linear-gradient(90deg, #8b0000, #e0262b, #ffb627, #e0262b, #8b0000);
    box-shadow: 0 0 10px rgba(224, 38, 43, 0.4); text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}
.cc-role-coowner {
    color: #fff; background-image: linear-gradient(90deg, #4b2a9b, #9b7bff, #ffe48a, #9b7bff, #4b2a9b);
    box-shadow: 0 0 10px rgba(155, 123, 255, 0.45); text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}
@keyframes cc-role-shine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .cc-role { animation: none; } }
.cc-card-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cc-roles { display: flex; flex-wrap: wrap; gap: 5px; }
.cc-role-pill {
    display: inline-flex; align-items: center; gap: 5px; font-size: 0.7rem; font-weight: 600; color: var(--text);
    background: color-mix(in srgb, var(--bright-text) 6%, transparent); border: 1px solid color-mix(in srgb, var(--bright-text) 8%, transparent); border-radius: 6px; padding: 2px 8px; white-space: nowrap;
}
.cc-role-pill i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.cc-role-pill-verified i { background: #23a55a; }
.cc-role-pill-owner { color: #ffd700; border-color: rgba(255, 215, 0, 0.45); }
.cc-role-pill-owner i { background: linear-gradient(135deg, #ffd700, #b8860b); }
.cc-role-pill-mod { color: #ffb627; border-color: rgba(224, 38, 43, 0.5); }
.cc-role-pill-mod i { background: linear-gradient(135deg, #e0262b, #ffb627); }
.cc-role-pill-coowner { color: #c9b6ff; border-color: rgba(150, 120, 255, 0.5); }
.cc-role-pill-coowner i { background: linear-gradient(135deg, #9b7bff, #ffd700); }
.cc-role-pill-banned { color: #fa777c; border-color: rgba(237, 66, 69, 0.5); }
.cc-role-pill-banned i { background: #ed4245; }

/* Profile popout actions */
.cc-card-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cc-card-actions .cc-btn { padding: 6px 10px; font-size: 0.76rem; }
.cc-card-actions h6 { width: 100%; color: color-mix(in srgb, var(--bright-text) 70%, transparent); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; }
.cc-card-mod { background: color-mix(in srgb, var(--bg) 25%, transparent); border-radius: 8px; padding: 10px; }
.cc-btn-mod { background: linear-gradient(90deg, #b3121b, #e0262b 50%, #d98a00); border-color: transparent; color: #fff; font-weight: 600; }
.cc-btn-mod:hover { filter: brightness(1.1); }
.cc-btn-verify { background: #23a55a; border-color: transparent; color: #fff; font-weight: 600; }
.cc-btn-verify:hover { filter: brightness(1.1); }

/* Header people button + count badges */
.cc-people-btn { position: relative; }
.cc-people-btn.active { background: color-mix(in srgb, var(--bright-text) 10%, transparent); color: var(--bright-text); }
.cc-count-badge {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ed4245; color: #fff;
    font-size: 0.62rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.cc-people-btn .cc-count-badge { position: absolute; top: -2px; right: -4px; border: 2px solid var(--bg-2); }

/* Online / friends side panel */
.cc-side {
    width: 250px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0;
    background: color-mix(in srgb, var(--bg) 20%, transparent); border-left: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent);
}
.cc-side-tabs { display: flex; align-items: center; gap: 4px; padding: 10px 8px; border-bottom: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent); }
.cc-side-tab {
    font-family: inherit; font-size: 0.75rem; font-weight: 600; color: color-mix(in srgb, var(--bright-text) 55%, transparent); background: none; border: none;
    padding: 6px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.cc-side-tab:hover { background: color-mix(in srgb, var(--bright-text) 6%, transparent); color: var(--bright-text); }
.cc-side-tab.active { background: color-mix(in srgb, var(--bright-text) 10%, transparent); color: var(--bright-text); }
.cc-side-close { margin-left: auto; width: 28px; height: 28px; font-size: 0.85rem; }
.cc-side-body { flex: 1; overflow-y: auto; padding: 4px 8px 12px; overscroll-behavior: contain; }
.cc-side-body h5 { color: color-mix(in srgb, var(--bright-text) 45%, transparent); font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 14px 6px 6px; }
.cc-side-empty { color: color-mix(in srgb, var(--bright-text) 40%, transparent); font-size: 0.78rem; padding: 10px 6px; line-height: 1.4; }
.cc-person { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 8px; cursor: pointer; }
.cc-person:hover { background: color-mix(in srgb, var(--bright-text) 6%, transparent); }
.cc-person-avatar { position: relative; flex-shrink: 0; }
.cc-person-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cc-person-name { display: flex; align-items: center; gap: 4px; min-width: 0; }
.cc-person-name .cc-name { font-size: 0.84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cc-person-name .cc-verified { width: 13px; height: 13px; font-size: 0.5rem; }
.cc-person-name .cc-role { font-size: 0.52rem; padding: 1px 5px; }
.cc-person-status { color: color-mix(in srgb, var(--bright-text) 45%, transparent); font-size: 0.7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: #80848e; border: 2.5px solid var(--bg-2); }
.cc-dot.on { background: #23a55a; }
.cc-mini-btn {
    flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: none; font-family: inherit; font-size: 0.8rem;
    background: color-mix(in srgb, var(--bright-text) 8%, transparent); color: var(--bright-text); display: inline-flex; align-items: center; justify-content: center;
}
.cc-mini-btn:hover { background: color-mix(in srgb, var(--bright-text) 16%, transparent); }
.cc-mini-ok { background: rgba(35, 165, 90, 0.25); color: #57f287; }
@media (max-width: 999px) {
    .cc-side { position: absolute; top: 0; right: 0; bottom: 0; z-index: 8; width: min(280px, 88%); background: var(--bg-2); box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5); }
}

/* Private messages view (sits over #general) */
.cc-dm { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; background: var(--bg-2); }
.cc-dm-who { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--bright-text); font-weight: 600; }
.cc-dm-who .cc-name { cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-at-sign { color: color-mix(in srgb, var(--bright-text) 35%, transparent); font-size: 1.2rem; font-weight: 400; }
.cc-online.cc-offline i { background: #80848e; }
@media (max-width: 640px) { .cc-dm-who .cc-online { display: inline-flex; } }

/* ===== Message actions, reactions & replies ===== */
.cc-msg { position: relative; }
.cc-msg-actions {
    position: absolute; top: -14px; right: 16px; z-index: 2; display: none; gap: 2px; padding: 2px;
    background: var(--bg-3); border: 1px solid color-mix(in srgb, var(--bright-text) 8%, transparent); border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.cc-own .cc-msg-actions { right: auto; left: 16px; }
.cc-msg:hover .cc-msg-actions, .cc-msg:focus-within .cc-msg-actions { display: flex; }
.cc-msg-actions button { background: none; border: none; font-size: 0.95rem; width: 30px; height: 28px; border-radius: 6px; line-height: 1; }
.cc-msg-actions button:hover { background: color-mix(in srgb, var(--bright-text) 10%, transparent); }
.cc-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cc-reactions:empty { display: none; }
.cc-own .cc-reactions { justify-content: flex-end; }
.cc-reaction {
    display: inline-flex; align-items: center; gap: 4px; font-family: inherit; font-size: 0.85rem; line-height: 1;
    padding: 3px 7px; border-radius: 8px; background: color-mix(in srgb, var(--bright-text) 6%, transparent); border: 1px solid transparent; color: var(--text);
}
.cc-reaction b { font-size: 0.72rem; font-weight: 600; color: color-mix(in srgb, var(--bright-text) 70%, transparent); }
.cc-reaction:hover { border-color: color-mix(in srgb, var(--bright-text) 20%, transparent); }
.cc-reaction.mine { background: color-mix(in srgb, var(--accent) 25%, transparent); border-color: var(--accent); }
.cc-reaction.mine b { color: var(--bright-text); }
.cc-reaction-add { color: color-mix(in srgb, var(--bright-text) 50%, transparent); opacity: 0; transition: opacity 0.15s; }
.cc-msg:hover .cc-reaction-add { opacity: 1; }
.cc-reply-ref {
    display: flex; align-items: baseline; gap: 6px; max-width: 100%; font-size: 0.72rem; color: color-mix(in srgb, var(--bright-text) 50%, transparent);
    margin-bottom: 3px; cursor: pointer; overflow: hidden; white-space: nowrap;
}
.cc-reply-ref b { color: color-mix(in srgb, var(--bright-text) 80%, transparent); font-weight: 600; flex-shrink: 0; }
.cc-reply-ref span { overflow: hidden; text-overflow: ellipsis; }
.cc-reply-ref:hover span { color: var(--bright-text); }
.cc-reply-gone { cursor: default; font-style: italic; }
.cc-msg-hidden .cc-bubble { opacity: 0.55; border: 1px dashed rgba(240, 177, 50, 0.6); }
.cc-hidden-note { font-size: 0.68rem; color: #f0b232; margin-top: 3px; }
.cc-msg.cc-flash { animation: cc-flash 1.6s ease-out; }
@keyframes cc-flash { 0%, 30% { background: color-mix(in srgb, var(--accent) 25%, transparent); } 100% { background: transparent; } }
.cc-reply-bar, .cc-room-notice {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.78rem; color: color-mix(in srgb, var(--bright-text) 70%, transparent);
    background: var(--bg-3); border-radius: 10px 10px 0 0; padding: 4px 4px 4px 12px; margin-bottom: -4px;
}
.cc-reply-bar b { color: var(--bright-text); }
.cc-reply-snip { color: color-mix(in srgb, var(--bright-text) 45%, transparent); }
.cc-reply-bar .cc-icon-btn { width: 26px; height: 26px; font-size: 0.8rem; }
.cc-room-notice { flex-direction: column; align-items: stretch; gap: 2px; padding: 7px 12px; border-radius: 10px; margin-bottom: 8px; font-size: 0.74rem; }
.cc-room-notice.cc-room-muted { background: rgba(240, 177, 50, 0.12); border: 1px solid rgba(240, 177, 50, 0.35); color: #f5c76a; }

/* Reaction picker */
.cc-react-pop { position: fixed; z-index: 75; width: 320px; max-width: calc(100vw - 16px); background: var(--bg-3); border: 1px solid color-mix(in srgb, var(--bright-text) 8%, transparent); border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); padding: 6px; }
.cc-react-quick { display: flex; justify-content: space-between; padding: 2px 2px 6px; border-bottom: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent); }
.cc-react-quick button { background: none; border: none; font-size: 1.35rem; padding: 3px; border-radius: 6px; }
.cc-react-quick button:hover { background: color-mix(in srgb, var(--bright-text) 10%, transparent); transform: scale(1.1); }
.cc-react-pop .cc-emoji-picker-inline { height: 240px; margin-top: 6px; border: none; box-shadow: none; }

/* Profile card: block / report row */
.cc-card-safety { margin-top: -4px; }
.cc-card-safety .cc-btn { padding: 5px 10px; font-size: 0.74rem; }

/* Settings: blocked list */
.cc-blocked-list { display: flex; flex-direction: column; gap: 6px; }
.cc-blocked-row { display: flex; align-items: center; gap: 10px; color: var(--bright-text); font-size: 0.85rem; }
.cc-blocked-row span { flex: 1; }
.cc-blocked-row .cc-btn { padding: 5px 10px; font-size: 0.74rem; }

/* Header mod button */
.cc-mod-btn .cc-count-badge { position: absolute; top: -2px; right: -4px; border: 2px solid var(--bg-2); }

/* ===== Mod tools panel ===== */
.cc-mod-card { max-width: 760px; height: 86vh; }
.cc-mod-tabs { display: flex; gap: 4px; padding: 8px 12px; border-bottom: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent); flex-wrap: wrap; }
.cc-mod-body { flex: 1; overflow-y: auto; padding: 14px 18px 20px; display: flex; flex-direction: column; gap: 10px; color: var(--text); font-size: 0.85rem; }
.cc-mod-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cc-seg { display: flex; gap: 2px; background: color-mix(in srgb, var(--bg) 20%, transparent); border-radius: 8px; padding: 2px; }
.cc-report-item { background: var(--bg-3); border: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.cc-report-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cc-report-kind { font-weight: 600; color: var(--bright-text); font-size: 0.8rem; }
.cc-report-reason { background: rgba(237, 66, 69, 0.15); color: #f38688; border-radius: 6px; padding: 1px 7px; font-size: 0.7rem; font-weight: 600; }
.cc-report-top .cc-time { margin-left: auto; }
.cc-report-who { font-size: 0.78rem; color: color-mix(in srgb, var(--bright-text) 60%, transparent); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cc-user-chip { color: var(--bright-text); font-weight: 600; cursor: pointer; }
.cc-user-chip:hover { text-decoration: underline; }
.cc-report-snap { margin: 0; padding: 8px 10px; border-left: 3px solid color-mix(in srgb, var(--bright-text) 20%, transparent); background: color-mix(in srgb, var(--bg) 20%, transparent); border-radius: 0 8px 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 160px; overflow-y: auto; font-size: 0.82rem; }
.cc-report-details { font-size: 0.78rem; color: color-mix(in srgb, var(--bright-text) 70%, transparent); font-style: italic; }
.cc-report-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cc-report-actions .cc-btn { padding: 5px 10px; font-size: 0.74rem; }
.cc-filter-form { display: flex; gap: 6px; }
.cc-filter-form input, .cc-filter-form select, .cc-room-row select {
    background: var(--bg-2); border: 1px solid color-mix(in srgb, var(--bright-text) 6%, transparent); border-radius: 8px; color: var(--bright-text); padding: 8px 10px; font: inherit; font-size: 0.82rem; outline: none;
}
.cc-filter-form input { flex: 1; min-width: 0; }
.cc-filter-form input:focus { border-color: var(--accent); }
.cc-mod-h { color: color-mix(in srgb, var(--bright-text) 50%, transparent); font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 6px; }
.cc-filter-list { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-filter-chip { display: inline-flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--bright-text) 8%, transparent); border-radius: 14px; padding: 3px 4px 3px 10px; font-size: 0.78rem; color: var(--bright-text); }
.cc-filter-chip button { background: none; border: none; color: color-mix(in srgb, var(--bright-text) 50%, transparent); width: 20px; height: 20px; border-radius: 50%; font-size: 0.7rem; }
.cc-filter-chip button:hover { background: rgba(237, 66, 69, 0.3); color: var(--bright-text); }
.cc-room-tools { display: flex; flex-direction: column; gap: 8px; }
.cc-room-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--bg-3); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.cc-room-row span { display: flex; flex-direction: column; gap: 2px; }
.cc-room-row b { color: var(--bright-text); font-weight: 600; }
.cc-room-row small { color: color-mix(in srgb, var(--bright-text) 45%, transparent); font-size: 0.72rem; }
.cc-room-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.cc-log-row { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--bright-text) 4%, transparent); font-size: 0.8rem; }
.cc-log-row .cc-time { flex-shrink: 0; width: 120px; }
.cc-log-row b { color: var(--bright-text); }
.cc-log-details { color: color-mix(in srgb, var(--bright-text) 50%, transparent); }

/* Report dialog */
.cc-report-card { max-width: 440px; }
.cc-report-body { padding: 16px 18px; gap: 6px; }
.cc-report-preview { background: var(--bg-3); border-radius: 8px; padding: 8px 10px; font-size: 0.82rem; color: var(--text); overflow-wrap: anywhere; max-height: 120px; overflow-y: auto; }
.cc-report-preview b { color: var(--bright-text); }

@media (max-width: 640px) {
    .cc-msg-actions { top: -12px; }
    .cc-log-row { flex-direction: column; gap: 2px; }
    .cc-filter-form { flex-wrap: wrap; }
}

/* Co-owner button, display name and pinned messages */
.cc-btn-coowner { background: linear-gradient(135deg, #6a46d8, #9b7bff); border-color: transparent; color: #fff; font-weight: 600; }
.cc-card-username { margin-top: -4px; color: color-mix(in srgb, var(--bright-text) 55%, transparent); font-size: 0.78rem; }
.cc-msg.cc-pinned { background: color-mix(in srgb, #ffd54f 6%, transparent); box-shadow: inset 2px 0 0 #ffd54f; }
.cc-pin-tag { font-size: 0.66rem; font-weight: 700; color: #ffd54f; margin-bottom: 2px; letter-spacing: 0.02em; }
.cc-pins {
    position: absolute; top: 56px; right: 12px; z-index: 30; width: min(380px, calc(100% - 24px)); max-height: min(70vh, 520px);
    display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid color-mix(in srgb, var(--bright-text) 10%, transparent);
    border-radius: 12px; box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5); overflow: hidden;
}
.cc-pins-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; color: var(--bright-text); border-bottom: 1px solid color-mix(in srgb, var(--bright-text) 8%, transparent); }
.cc-pins-body { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.cc-pin-row { background: var(--bg-3); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; color: var(--text); font-size: 0.85rem; }
.cc-pin-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cc-pin-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.cc-pin-img { max-width: 100%; max-height: 160px; border-radius: 8px; object-fit: contain; align-self: flex-start; }
.cc-pin-actions { display: flex; gap: 6px; justify-content: flex-end; }
.cc-pin-actions .cc-btn { padding: 4px 10px; font-size: 0.74rem; }
